| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("../clang.gni") | 5 import("../clang.gni") |
| 6 import("../goma.gni") | 6 import("../goma.gni") |
| 7 import("../gcc_toolchain.gni") | 7 import("../gcc_toolchain.gni") |
| 8 | 8 |
| 9 if (is_gyp) { | 9 if (is_gyp) { |
| 10 # Set the compilers for GYP to use. This logic is only relevant to GYP where | 10 # Set the compilers for GYP to use. This logic is only relevant to GYP where |
| 11 # there is "a" target compiler. In native GN builds, we have separate | 11 # there is "a" target compiler. In native GN builds, we have separate |
| 12 # compilers for the toolchains below, any or all of which could be active in | 12 # compilers for the toolchains below, any or all of which could be active in |
| 13 # any given build. | 13 # any given build. |
| 14 if (is_clang) { | 14 if (is_clang) { |
| 15 # Set the GYP header for all toolchains when running under Clang. | 15 # Set the GYP header for all toolchains when running under Clang. |
| 16 gyp_header = make_clang_global_settings | 16 make_global_settings = make_clang_global_settings |
| 17 } else { | 17 } else { |
| 18 gyp_header = "" | 18 make_global_settings = "" |
| 19 } | 19 } |
| 20 | 20 |
| 21 if (use_goma) { | 21 if (use_goma) { |
| 22 # There is a TODO(yyanagisawa) in common.gypi about the make generator not | 22 # There is a TODO(yyanagisawa) in common.gypi about the make generator not |
| 23 # supporting CC_wrapper without CC. As a result, we must add a condition | 23 # supporting CC_wrapper without CC. As a result, we must add a condition |
| 24 # when on the generator when we're not explicitly setting the variables | 24 # when on the generator when we're not explicitly setting the variables |
| 25 # above (which happens when gyp_header is empty at this point). | 25 # above (which happens when gyp_header is empty at this point). |
| 26 # | 26 # |
| 27 # GYP will interpret the file once for each generator, so we have to write | 27 # GYP will interpret the file once for each generator, so we have to write |
| 28 # this condition into the GYP file since the user could have more than one | 28 # this condition into the GYP file since the user could have more than one |
| 29 # generator set. | 29 # generator set. |
| 30 if (gyp_header == "") { | 30 gyp_header = |
| 31 gyp_header += | 31 "'conditions':" + |
| 32 "'conditions':" + | 32 "['\"<(GENERATOR)\"==\"ninja\"', { 'make_global_settings': [" + |
| 33 "['\"<(GENERATOR)\"==\"ninja\"', {" + | 33 make_global_settings + |
| 34 make_goma_global_settings + | 34 make_goma_global_settings + |
| 35 "}]," | 35 "]}]," |
| 36 } else { | 36 } else { |
| 37 gyp_header += make_goma_global_settings | 37 gyp_header = "'make_global_settings': [" + make_global_settings + "]," |
| 38 } | |
| 39 } | 38 } |
| 40 } | 39 } |
| 41 | 40 |
| 42 # ARM -------------------------------------------------------------------------- | 41 # ARM -------------------------------------------------------------------------- |
| 43 | 42 |
| 44 gcc_toolchain("arm") { | 43 gcc_toolchain("arm") { |
| 45 cc = "arm-linux-gnueabi-gcc" | 44 cc = "arm-linux-gnueabi-gcc" |
| 46 cxx = "arm-linux-gnueabi-g++" | 45 cxx = "arm-linux-gnueabi-g++" |
| 47 ar = "arm-linux-gnueabi-ar" | 46 ar = "arm-linux-gnueabi-ar" |
| 48 ld = cxx | 47 ld = cxx |
| (...skipping 16 matching lines...) Expand all Loading... |
| 65 | 64 |
| 66 gcc_toolchain("x64") { | 65 gcc_toolchain("x64") { |
| 67 cc = "gcc" | 66 cc = "gcc" |
| 68 cxx = "g++" | 67 cxx = "g++" |
| 69 ar = "ar" | 68 ar = "ar" |
| 70 ld = cxx | 69 ld = cxx |
| 71 | 70 |
| 72 toolchain_cpu_arch = "x64" | 71 toolchain_cpu_arch = "x64" |
| 73 toolchain_os = "linux" | 72 toolchain_os = "linux" |
| 74 } | 73 } |
| OLD | NEW |