Chromium Code Reviews| 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") | |
| 6 import("../goma.gni") | |
| 7 import("../gcc_toolchain.gni") | |
| 8 import("//build/config/sysroot.gni") | 5 import("//build/config/sysroot.gni") |
| 6 import("//build/toolchain/clang.gni") | |
| 7 import("//build/toolchain/gcc_toolchain.gni") | |
| 8 import("//build/toolchain/goma.gni") | |
| 9 | 9 |
| 10 if (is_gyp) { | 10 if (is_gyp) { |
| 11 # 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 |
| 12 # 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 |
| 13 # 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 |
| 14 # any given build. | 14 # any given build. |
| 15 if (is_clang) { | 15 if (is_clang) { |
| 16 # Set the GYP header for all toolchains when running under Clang. | 16 # Set the GYP header for all toolchains when running under Clang. |
| 17 make_global_settings = make_clang_global_settings | 17 make_global_settings = make_clang_global_settings |
| 18 } else { | 18 } else { |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 40 "'conditions':" + | 40 "'conditions':" + |
| 41 "[['\"<(GENERATOR)\"==\"ninja\"', { 'make_global_settings': [" + | 41 "[['\"<(GENERATOR)\"==\"ninja\"', { 'make_global_settings': [" + |
| 42 make_global_settings + | 42 make_global_settings + |
| 43 make_goma_global_settings + | 43 make_goma_global_settings + |
| 44 "]}]]," | 44 "]}]]," |
| 45 } else { | 45 } else { |
| 46 gyp_header = "'make_global_settings': [" + make_global_settings + "]," | 46 gyp_header = "'make_global_settings': [" + make_global_settings + "]," |
| 47 } | 47 } |
| 48 } | 48 } |
| 49 | 49 |
| 50 # ARM -------------------------------------------------------------------------- | |
| 51 | |
| 52 gcc_toolchain("arm") { | 50 gcc_toolchain("arm") { |
|
Nico
2014/01/29 18:45:48
clang can target arm too fwiw (the same clang bina
| |
| 53 cc = "arm-linux-gnueabi-gcc" | 51 cc = "arm-linux-gnueabi-gcc" |
| 54 cxx = "arm-linux-gnueabi-g++" | 52 cxx = "arm-linux-gnueabi-g++" |
| 55 ar = "arm-linux-gnueabi-ar" | 53 ar = "arm-linux-gnueabi-ar" |
| 56 ld = cxx | 54 ld = cxx |
| 57 | 55 |
| 58 toolchain_cpu_arch = "arm" | 56 toolchain_cpu_arch = "arm" |
| 59 toolchain_os = "linux" | 57 toolchain_os = "linux" |
| 60 } | 58 } |
| 61 | 59 |
| 62 # 32-bit ----------------------------------------------------------------------- | 60 gcc_toolchain("x86") { |
| 61 if (is_clang) { | |
| 62 if (use_clang_type_profiler) { | |
| 63 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin", | |
| 64 ".", root_build_dir) | |
| 65 } else { | |
| 66 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | |
| 67 ".", root_build_dir) | |
| 68 } | |
| 69 cc = "$prefix/clang" | |
| 70 cxx = "$prefix/clang++" | |
|
Nico
2014/01/29 18:45:48
Will this harmonize with use_goma=1?
brettw
2014/01/30 00:24:03
No, I haven't looked at Goma yet.
| |
| 71 } else { | |
| 72 cc = "gcc" | |
| 73 cxx = "g++" | |
| 74 } | |
| 63 | 75 |
| 64 gcc_toolchain("x86") { | |
| 65 cc = "gcc" | |
| 66 cxx = "g++" | |
| 67 ar = "ar" | 76 ar = "ar" |
| 68 ld = cxx | 77 ld = cxx |
| 69 | 78 |
| 70 toolchain_cpu_arch = "x86" | 79 toolchain_cpu_arch = "x86" |
| 71 toolchain_os = "linux" | 80 toolchain_os = "linux" |
| 72 } | 81 } |
| 73 | 82 |
| 74 gcc_toolchain("x64") { | 83 gcc_toolchain("x64") { |
| 75 cc = "gcc" | 84 if (is_clang) { |
| 76 cxx = "g++" | 85 if (use_clang_type_profiler) { |
| 86 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", | |
| 87 ".", root_build_dir) | |
| 88 } else { | |
| 89 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | |
| 90 ".", root_build_dir) | |
| 91 } | |
| 92 cc = "$prefix/clang" | |
| 93 cxx = "$prefix/clang++" | |
| 94 } else { | |
| 95 cc = "gcc" | |
| 96 cxx = "g++" | |
| 97 } | |
| 98 | |
| 77 ar = "ar" | 99 ar = "ar" |
| 78 ld = cxx | 100 ld = cxx |
| 79 | 101 |
| 80 toolchain_cpu_arch = "x64" | 102 toolchain_cpu_arch = "x64" |
| 81 toolchain_os = "linux" | 103 toolchain_os = "linux" |
| 82 } | 104 } |
| 83 | 105 |
| 84 # MIPS ----------------------------------------------------------------------- | |
| 85 | |
| 86 gcc_toolchain("mipsel") { | 106 gcc_toolchain("mipsel") { |
| 87 cc = "mipsel-linux-gnu-gcc" | 107 cc = "mipsel-linux-gnu-gcc" |
| 88 cxx = "mipsel-linux-gnu-g++" | 108 cxx = "mipsel-linux-gnu-g++" |
| 89 ar = "mipsel-linux-gnu-ar" | 109 ar = "mipsel-linux-gnu-ar" |
| 90 ld = cxx | 110 ld = cxx |
| 91 | 111 |
| 92 toolchain_cpu_arch = "mipsel" | 112 toolchain_cpu_arch = "mipsel" |
| 93 toolchain_os = "linux" | 113 toolchain_os = "linux" |
| 94 } | 114 } |
| OLD | NEW |