With AOSP 9.0.0_r30 source code, first use these commands to output a detailed build log during build:
make clean
make showcommands -j8 > ~/BuildAndroid.txt
Then search in ~/BuildAndroid.txt
for "lld" (whole word match). I can't find anything. Clang linker should have the lld keyword.Search "ld" there are 50 results but they are hardly be the link commands.One of them is "ld.mc" which is a candidate,though.
And search for some cpp source file name like "TextDropShadowCache". I only get 2 commands, both of which are clang++ compilation commands.
The link command of libhwui.so references a file "libhwui.so.rsp" which seems to possibly (only guess) contains "TextDropShadowCache.o":
prebuilts/clang/host/linux-x86/clang-4691093/bin/clang++ /OpenSource/Build/Android/9.0.0_r30/soong/.intermediates/bionic/libc/crtbegin_so/android_x86_64_core/crtbegin_so.o @/OpenSource/Build/Android/9.0.0_r30/soong/.intermediates/frameworks/base/libs/hwui/libhwui/android_x86_64_core_shared/libhwui.so.rsp ......
If this is true, then how is libhwui.so.rsp produced?
The command also give rise to this question: What does @ mean in this clang command in AOSP build log?
according to the above question, @ means read a long command from a file, so it is highly possibly be a file that list all the obj files that libhwui.so needs.
So the problem is basically answered, but not verified because libhwui.so.rsp seems to be removed after build.
How does the AOSP 9.0 build system link the executable?