1 May 2000 21:58
Re: interprocedure optimizations
Matt Armstrong <matt <at> corp.phone.com>
2000-05-01 19:58:52 GMT
2000-05-01 19:58:52 GMT
First I'd try to create a new .cpp that just #included the other two source files. If that own't work you'll probably want to write your own rule/action pair to do the compiling. The key is to use the "together" modifier on the compilation action. The existing rules will always call the C++ rule for .cpp files, so you'll have to somehow avoid that. On Sat, Apr 29, 2000 at 07:47:29PM -0500, Nikolas Kauer wrote: > > I would like to facilitate more interprocedure optimizations by > compiling several source files in one compiler call. I've been > using jam for a while essentially compiling my program like this: > cxx -c -O src1.cpp > cxx -c -O src2.cpp > cxx -c -O src3.cpp > cxx -o executable src1.o src2.o src3.o > > Say, I know code in file src1.cpp calls functions defined in file src2.cpp > and interprocedure optimizations would strongly increase program performance. > I would then manually compile in the following way: > cxx -c -O4 src2.cpp src1.cpp > cxx -c -O src3.cpp > cxx -o executable src1.o src2.o src3.o > > or in cases with a small number of source files (in one programming language): > cxx -o executable -O4 src1.cpp src2.cpp src3.cpp > > How would I write a Jamfile that results in these actions? Do I need rules > that are not defined in the default Jambase?(Continue reading)
RSS Feed