objcache

objcache is a Perl module that caches results of running gcc/ghs on argument list.
Download

objcache Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Wilson Snyder
  • Publisher web site:
  • http://search.cpan.org/~wsnyder/Verilog-Perl-3.035/Parser/Parser.pm

objcache Tags


objcache Description

objcache is a Perl module that caches results of running gcc/ghs on argument list. objcache is a Perl module that caches results of running gcc/ghs on argument list.SYNOPSIS objcache --read --write g++ objcache is called with a full g++ or cxppc command line. It acts as if the compiler is called directly with all arguments.With --read and --write, objcache returns almost instantly when the same source is recompiled. It does this by caching a hash of the preprocessed gcc source files. If gcc is invoked with the same inputs, the cache returns the object files without needing to invoke the compiler.DETAILSGCC is run in preprocessor mode to create a single source file. This source file is then hashed. Likewise any compiler switches are hashed, but with any define related switches (-Dfoo -Dfoo=value -Ufoo) stripped out as they are represented in the preprocessor output. (This increases cache hits when there are many #ifdef controlled compiles going on.)The source hash is then looked up in the cache. If it hits, the objects are copied from the cache into the local directory, and objcache exits. The files on disk will thus look like the compile finished, but much faster.If the source hash misses, the compiler is invoked. The output of the compiler is written to the cache. objcache also determines how long the compile took (for informing the user), and may run the compile on another machine.EXAMPLE MAKEFILEThis example will use the cache, and compile on all machines in the network with the "gcc" class. It's also written to work if the objcache is not installed. This uses the Schedule::Load package to determine what machines have free resources in the network. ifeq ($(SLCHOOSED_HOST),) export OBJCACHE := else export OBJCACHE_HOSTS := $(shell rschedule --class class_gcc hostnames) export OBJCACHE_JOBS := -j $(shell objcache --jobs "$(OBJCACHE_HOSTS)") export OBJCACHE := @objcache --read --write endif %.o: %.cpp $(OBJCACHE) ${CXX} ${CPPFLAGS} -c $


objcache Related Software