Reputation: 2661
I have been trying to compile Chromium for multiple target by specifying target_cpu to Build.gn
as given below but nothing works, only single options like arm or arm64 are able to compile.
target_cpu = ['arm64','arm']
not supported by gn
target_cpu = "arm64" | "arm"
not supported by gn
target_cpu = "arm64"
// works
target_cpu = "arm"
// works
How to compile chromium apk both arm64
and arm
platforms
Upvotes: 1
Views: 1147
Reputation: 3361
The target_cpu
must specify a single target, it doesn't support multiple targets. If it did, the debug symbols and files would be over written in your build folder.
So, you have to create a different build folder for each target
// For Arm architecture
gn gen out/arm
// For x86
gn gen out/x86
Then specify the arguments for each build target by executing:
gn args out/BUILD_FOLDER
Basically, it will open args.gn
file located in BUILD_FOLDER
. It will open that file in a text editor where you can specify target_cpu
architecture along with other build flags. Then start the compilation process by executing
ninja -C out/BUILD_FOLDER chrome
Upvotes: 2