| 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 import("//build/config/sysroot.gni") |
| 8 | 9 |
| 9 if (is_gyp) { | 10 if (is_gyp) { |
| 10 # Set the compilers for GYP to use. This logic is only relevant to GYP where | 11 # 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 | 12 # 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 | 13 # compilers for the toolchains below, any or all of which could be active in |
| 13 # any given build. | 14 # any given build. |
| 14 if (is_clang) { | 15 if (is_clang) { |
| 15 # Set the GYP header for all toolchains when running under Clang. | 16 # Set the GYP header for all toolchains when running under Clang. |
| 16 make_global_settings = make_clang_global_settings | 17 make_global_settings = make_clang_global_settings |
| 17 } else { | 18 } else { |
| 18 make_global_settings = "" | 19 if (cpu_arch == "mipsel") { |
| 20 make_global_settings = |
| 21 "['CC', '$sysroot/../bin/mipsel-linux-gnu-gcc']," + |
| 22 "['CXX', '$sysroot/../bin/mipsel-linux-gnu-g++']," + |
| 23 "['CC.host', '/usr/bin/gcc']," + |
| 24 "['CXX.host', '/usr/bin/g++']," |
| 25 } else { |
| 26 make_global_settings = "" |
| 27 } |
| 19 } | 28 } |
| 20 | 29 |
| 21 if (use_goma) { | 30 if (use_goma) { |
| 22 # There is a TODO(yyanagisawa) in common.gypi about the make generator not | 31 # 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 | 32 # 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 | 33 # when on the generator when we're not explicitly setting the variables |
| 25 # above (which happens when gyp_header is empty at this point). | 34 # above (which happens when gyp_header is empty at this point). |
| 26 # | 35 # |
| 27 # GYP will interpret the file once for each generator, so we have to write | 36 # 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 | 37 # this condition into the GYP file since the user could have more than one |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 85 |
| 77 gcc_toolchain("mipsel") { | 86 gcc_toolchain("mipsel") { |
| 78 cc = "mipsel-linux-gnu-gcc" | 87 cc = "mipsel-linux-gnu-gcc" |
| 79 cxx = "mipsel-linux-gnu-g++" | 88 cxx = "mipsel-linux-gnu-g++" |
| 80 ar = "mipsel-linux-gnu-ar" | 89 ar = "mipsel-linux-gnu-ar" |
| 81 ld = cxx | 90 ld = cxx |
| 82 | 91 |
| 83 toolchain_cpu_arch = "mipsel" | 92 toolchain_cpu_arch = "mipsel" |
| 84 toolchain_os = "linux" | 93 toolchain_os = "linux" |
| 85 } | 94 } |
| OLD | NEW |