(The command examples assume OS X).
Just about everything that happens when you enter scons
is for Android. So anything you can do to speed up the Android part of our build will be useful.
-
Android NDK r7 can use ccache. We get huge improvements in build time with it. So install it (if you have HomeBrew,
brew install ccache
) then set a shell variableNDK_CCACHE
to point to it. I.e., for me, having installed it withbrew
, it would beexport NDK_CCACHE=/usr/local/bin/ccache
. -
NDK can also parallelize while compiling. Set a shell variable
NUM_CPUS
to (according to Opie) 2x the number of cores in your machine. A quick way to get the # cores on your machine in OS X issystem_profiler | grep "Number Of Cores"
in terminal. I have 2 cores, so my shell var setting isexport NUM_CPUS=4
. -
Skip building the JSCA files (the files used by Titanium Studio's code assist feature). You don't need them if you're just making a build for yourself for testing. To skip, run scons like this:
scons build_jsca=0
.