diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-10 06:09:59 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-10 06:09:59 +0000 |
commit | 76ccdcd0575a7b2517d215b50dbf9de8d552418f (patch) | |
tree | 38b206d24a6efcc964d84aa3acd6641035857bbb /build/toolchain/android | |
parent | 3557927cd25e1e9f9586f74d925f036e6ada28d7 (diff) | |
download | chromium_src-76ccdcd0575a7b2517d215b50dbf9de8d552418f.zip chromium_src-76ccdcd0575a7b2517d215b50dbf9de8d552418f.tar.gz chromium_src-76ccdcd0575a7b2517d215b50dbf9de8d552418f.tar.bz2 |
Improves GN's make_global_settings
This makes make_global_settings closer to the GYP version. Previously it had relied on GYP concatenating two lists when running with goma, but it doesn't actually behave this way, resulting in unexpected output.
TBR=scottmg
Review URL: https://codereview.chromium.org/132833002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244104 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/toolchain/android')
-rw-r--r-- | build/toolchain/android/BUILD.gn | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/build/toolchain/android/BUILD.gn b/build/toolchain/android/BUILD.gn index 021fdaf..8f84f69 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 + "]," } } |