Compile the template madness with -O0. This significantly (by an order of
magnitude) reduces the compile time. It's almost acceptable now. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11497 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -9,12 +9,22 @@ UsePrivateHeaders shared ;
|
|||||||
|
|
||||||
local straceSources = strace.cpp MemoryReader.cpp TypeHandler.cpp ;
|
local straceSources = strace.cpp MemoryReader.cpp TypeHandler.cpp ;
|
||||||
|
|
||||||
|
# Our compiler badly chokes when compiling the generated file. So will
|
||||||
|
# split up the job into 20 pieces.
|
||||||
local straceSyscallsIndices
|
local straceSyscallsIndices
|
||||||
= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ;
|
= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ;
|
||||||
|
|
||||||
local straceSyscallsSource = [ FGristFiles strace_syscalls.cpp ] ;
|
local straceSyscallsSource = [ FGristFiles strace_syscalls.cpp ] ;
|
||||||
local straceSyscallsObjects ;
|
local straceSyscallsObjects ;
|
||||||
|
|
||||||
|
# Whatever our compiler (gcc 2.95.3) thinks it is doing when compiling the
|
||||||
|
# generated files, it really takes it time when optimization is enabled.
|
||||||
|
# A lot with -O1, even more with -O2. Also the object sizes are amazing.
|
||||||
|
# -O0 fares significantly better; at least speed-wise. I would almost think
|
||||||
|
# about reverting to compiling all in one object file again. Almost...
|
||||||
|
local oldOptim = $(OPTIM) ;
|
||||||
|
OPTIM = -O0 ;
|
||||||
|
|
||||||
local i ;
|
local i ;
|
||||||
for i in $(straceSyscallsIndices) {
|
for i in $(straceSyscallsIndices) {
|
||||||
local object = [ FGristFiles strace_syscalls$(i).o ] ;
|
local object = [ FGristFiles strace_syscalls$(i).o ] ;
|
||||||
@@ -26,6 +36,9 @@ for i in $(straceSyscallsIndices) {
|
|||||||
: GET_SYSCALLS=get_syscalls$(i) SYSCALLS_CHUNK_$(i) ;
|
: GET_SYSCALLS=get_syscalls$(i) SYSCALLS_CHUNK_$(i) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# reset OPTIM
|
||||||
|
OPTIM = $(oldOptim) ;
|
||||||
|
|
||||||
BinCommand strace : $(straceSources)
|
BinCommand strace : $(straceSources)
|
||||||
: $(straceSyscallsObjects) libroot.so libstdc++.r4.so ;
|
: $(straceSyscallsObjects) libroot.so libstdc++.r4.so ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user