Reputation: 577
I am trying to build Chromium for Android by following the instructions here. When I finally run
~/chromium/src$ ninja -C out/Release chrome_public_apk
I get this error:
ninja: error: unknown target 'chrome_public_apk'
It seems that target is not built. In this link, it says to run build/gyp_chromium -DOS=android
before running the ninja command. However, I had followed the instructions for gn
. What should I be calling in that case?
Thank you very much!
Upvotes: 1
Views: 2116
Reputation: 2297
Run gn args out/${name}
to set up the build parameters for GN that'll build into out/${name}
(e.g. out/ChromeRelease
, don't use Release
or Debug
since they'll conflict with GYP). Here's some the parameters I use:
target_os = "android"
target_cpu = "arm" # (default)
is_debug = false # (set to true for Debug build)
symbol_level = 1 # 2 includes more symbols useful
# for debugging but increase binary size.
# 0 strips it down even more.
is_component_build = true
is_clang = true
Additionally, you'll want to add target_os = ["android"]
to the .gclient file in your chromium directory and run gclient sync
.
Upvotes: 1