When building Android 9.0.0_r30, I lunch "aosp_x86_64-eng", but it builts both x86 and x64 targets, i.e. there are two clang invokes for each C/C++ source in the build log:
...clang...-target i686-linux-android...
...clang...-target x86_64-linux-android...
which generates two sets of binaries which wastes time and disk space.
Can I/how to only build x64 target?
You will probably not have success with building an x64 Android without any x86 binaries. Every module can decide to be built in the target architecture, a fixed one or both and a lot of modules do that.
If you start to grep for LOCAL_MULTILIB
in Android.mk
and compile_multilib
in Android.bp
, you will find lots of modules and have to figure out the reason for every one of them to build for x86, x64 or both.
grep -rn "compile_multilib" --include="Android.bp"
grep -rn "LOCAL_MULTILIB" --include="Android.mk"
You can find out what the configurations mean here: https://source.android.com/setup/develop/64-bit-builds