How to find the list of all files required for building android apk?

51 views
Skip to first unread message

Kalpaj Chaudhari

unread,
Dec 7, 2021, 1:54:06 PM12/7/21
to Chromium-dev
Hi,
I've been building Chromium browser for past couple of months. However, I wanted to know which all files are being included during the compilation.

I tried finding in build.ninja and build.ninja.d but those are quite some large file to open and read.

Is there a more streamlined way to see the list of files required for building Android APK?

Regards,
Kalpaj Chaudhari

uazo

unread,
Dec 8, 2021, 8:09:41 PM12/8/21
to Chromium-dev, daed...@gmail.com
I am currently having the same need, linked in my case to the generation of the clangd and kythe index.
my solution was to patch ninja to have a compdb linked only to the target of my interest, you can probably get what you need from there.
here you can find the patch, the command to run is

ninja -C <output-dir> -a chrome_public_apk -t compdb cc cxx objc objcxx >compile_commands.json

alternatively you can try to use ninjatracing and extract the information

ninjatracing .ninja_log >ninja_log_trace.json
third_party/catapult/tracing/bin/trace2html ninja_log_trace.json 
 
uazo

Kalpaj Chaudhari

unread,
Dec 13, 2021, 10:38:16 AM12/13/21
to Chromium-dev, uazo, Kalpaj Chaudhari
Thanks for the answer!

However I was wondering would this also print the modules compiled using the java compiler?

uazo

unread,
Dec 14, 2021, 11:03:18 AM12/14/21
to Chromium-dev, daed...@gmail.com, uazo
> However I was wondering would this also print the modules compiled using the java compile

Reply all
Reply to author
Forward
0 new messages