Android Quick Compilation

The person in charge of the module usually uses mm or mmm to compile and debug their own module code, so we expect the compilation to be as fast as possible to speed up our debugging.
When we use mm to compile, the system will automatically include a lot of system mk files, which will cause our compilation to be very slow. It actually takes a few seconds to actually compile our code.
Below we will use the ninja command to quickly compile system modules:

// An highlighted block
1.cp prebuilts/build-tools/linux-x86/bin/ninja out/host/linux-x86/bin/
//xxxx表示你Lunch的项目名字
2.ln -sf out/combined-xxxx.ninja build.ninja
3.sudo cp prebuilts/build-tools/linux-x86/lib64/libjemalloc5.so /usr/lib
4.ninja trustzone -j8  //这个会非常快,这个会编译trustzone
ninja您想编译的模块,在不修改Android.mk的情况下编译时非常快的。
如ninja vold

Guess you like

Origin blog.csdn.net/weixin_47139576/article/details/128781234