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

Unified Diff: build/toolchain/android/BUILD.gn

Issue 132833002: Improves GN's make_global_settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « build/config/compiler/BUILD.gn ('k') | build/toolchain/clang.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/android/BUILD.gn
diff --git a/build/toolchain/android/BUILD.gn b/build/toolchain/android/BUILD.gn
index 021fdaf61c07069a0d86c15407c4f6ad76d6a269..8f84f69b99ac03c8ffe33b6cd53e4911451f0126 100644
--- a/build/toolchain/android/BUILD.gn
+++ b/build/toolchain/android/BUILD.gn
@@ -23,7 +23,7 @@ if (is_gyp) {
# any given build.
if (is_clang) {
# Set the GYP header for all toolchains when running under Clang.
- gyp_header = make_clang_global_settings
+ make_global_settings = make_clang_global_settings
} else {
# Find the compiler for GYP for non-Clang Android.
if (cpu_arch == "x86") {
@@ -47,13 +47,11 @@ if (is_gyp) {
# directory.
android_compilers = exec_script("find_android_compiler.py",
[android_toolchain], "value")
- gyp_header =
- "'make_global_settings': [" +
+ make_global_settings =
"['CC', '" + android_compilers[0] + "']," +
"['CXX', '" + android_compilers[1] + "']," +
"['CC.host', '" + android_compilers[2] + "']," +
- "['CXX.host', '" + android_compilers[3] + "']," +
- "],"
+ "['CXX.host', '" + android_compilers[3] + "'],"
}
if (use_goma) {
@@ -65,15 +63,14 @@ if (is_gyp) {
# GYP will interpret the file once for each generator, so we have to write
# this condition into the GYP file since the user could have more than one
# generator set.
- if (gyp_header == "") {
- gyp_header +=
- "'conditions':" +
- "['\"<(GENERATOR)\"==\"ninja\"', {" +
- make_goma_global_settings +
- "}],"
- } else {
- gyp_header += make_goma_global_settings
- }
+ gyp_header =
+ "'conditions': [" +
+ "['\"<(GENERATOR)\"==\"ninja\"', { 'make_global_settings': [" +
+ make_global_settings +
+ make_goma_global_settings +
+ "]}]],"
+ } else {
+ gyp_header = "'make_global_settings': [" + make_global_settings + "],"
}
}
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/toolchain/clang.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698