1. Assembly of modules + dependencies
mmma
is slower than mmm
, because the former check that all dependencies for the module match and if they do not compile them. So, initially, instead of the full make
create dependencies for the module you are interested in using the following:
mmma -j4 adir/yourmoduledir
2. Assembly module
Now that the dependencies are satisfied, continue to recompile only the module you are interested in. Skipping dependency checks saves valuable time. However, the directory you use may contain more than one compilation target. To compile one goal, use something like:
mmm -j4 adir/yourmoduledir:moduletargetname
Example
Build libart
Create a library and all its dependencies
once :
mmma -j4 art/runtime
Modify the libart code and quickly create it:
mmm -j4 art/runtime:libart
You will get half the compilation time compared to the approach of Yuri, since, for example, the debugging flavor of libart
( libartd
) will be completely omitted.
Further acceleration?
Of course you should enable caching as aultbot
.
In addition, depending on the modules you are interested in, there may be compilation goals that you can disable by digging out makefiles. For example, libart
compiled for both the host and the target. If you change the variable in makefiles, you can force compilation for only one of the two, which will save you half the time.
Additional Information:
source share