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 + "]," |
} |
} |