Commit a7697bcf authored by cjhopman's avatar cjhopman Committed by Commit bot

GN: add target_arch build arg for android

This changes android to use the target_arch build arg for setting the
target architecture instead of cpu_arch.

Some benefits of this:
non-target toolchains have knowledge of the target architecture
(required for the relocation packer host executable)
allows us to have a default target_arch different from build_cpu_arch

BUG=359249,344767

Review URL: https://codereview.chromium.org/634403004

Cr-Commit-Position: refs/heads/master@{#300136}
parent fe5233e8
......@@ -71,6 +71,16 @@ declare_args() {
# toolchains.
cros_use_custom_toolchain = false
}
# TODO(cjhopman): Make target_arch work for all platforms.
# Architecture of the target device. For Android builds, this will be equal to
# the cpu_arch of the default toolchain. When checking the CPU architecture
# for source files and build dependencies you should almost alway use cpu_arch
# instead. cpu_arch is the architecture of the current toolchain and allows
# cross-compiles (compiling the same target for multiple toolchains in the
# same build) to work.
target_arch = "arm"
}
# =============================================================================
......@@ -174,6 +184,14 @@ if (is_win) {
}
}
if (is_android) {
# TODO(cjhopman): enable this assert once bots are updated to not set
# cpu_arch.
#assert(cpu_arch == build_cpu_arch, "Android device target architecture should
# be set with 'target_arch', not 'cpu_arch'")
cpu_arch = target_arch
}
# =============================================================================
# SOURCES FILTERS
# =============================================================================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment