Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: build/config/BUILDCONFIG.gn

Issue 946683002: Fix GN os, cpu defaults for Android builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/relocation_packer/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILDCONFIG.gn
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 782226158745fe5ad90e46efab4aad2cc2b02348..a554f12dc5b427ddbff8a0fff1116eb9bc6cbbdd 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -37,6 +37,12 @@ if (target_cpu == "") {
# If cpu_arch is defined, it was set in an args file and needs to be
# used for backwards-compatibility.
target_cpu = cpu_arch
+ } else if (target_os == "android") {
+ # If we're building for Android, we should assume that we want to
+ # build for ARM by default, not the host_cpu (which is likely x64).
+ # This allows us to not have to specify both target_os and target_cpu
+ # on the command line.
+ target_cpu = "arm"
} else {
target_cpu = host_cpu
}
@@ -108,17 +114,6 @@ declare_args() {
cros_use_custom_toolchain = false
}
- # TODO(dpranke): Replace target_arch with target_cpu.
-
- # Architecture of the target device. For Android builds, this will be
- # equal to the current_cpu of the default toolchain. When checking
- # the CPU architecture for source files and build dependencies you
- # should almost alway use current_cpu instead. current_cpu 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"
Dirk Pranke 2015/02/20 20:06:50 I think it's perhaps best to just cut straight to
cjhopman 2015/02/20 20:28:19 Make them use target_cpu sgtm.
-
# TODO(brettw) remove this flag (and therefore enable linking all targets) on
# Windows when we have sufficient bot capacity. In the meantime, you can
# enable linking for local compiles.
@@ -216,18 +211,6 @@ if (current_os == "win") {
}
# =============================================================================
-# CPU ARCHITECTURE
-# =============================================================================
-
-if (is_android) {
- # TODO(cjhopman): enable this assert once bots are updated to not set
- # current_cpu.
- #assert(current_cpu == host_cpu, "Android device target architecture should
- # be set with 'target_arch', not 'current_cpu'")
- current_cpu = target_arch
Dirk Pranke 2015/02/20 20:06:50 This was the thing I broke in https://codereview.c
-}
-
-# =============================================================================
# SOURCES FILTERS
# =============================================================================
#
« no previous file with comments | « no previous file | tools/relocation_packer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698