Chromium Code Reviews| Index: build/toolchain/linux/BUILD.gn |
| diff --git a/build/toolchain/linux/BUILD.gn b/build/toolchain/linux/BUILD.gn |
| index 74d287fec689eece71a3270f5771895f76434e11..38f4b184cee5bfe65b4e30f702ed8bbf4e79fbe7 100644 |
| --- a/build/toolchain/linux/BUILD.gn |
| +++ b/build/toolchain/linux/BUILD.gn |
| @@ -2,10 +2,10 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| -import("../clang.gni") |
| -import("../goma.gni") |
| -import("../gcc_toolchain.gni") |
| import("//build/config/sysroot.gni") |
| +import("//build/toolchain/clang.gni") |
| +import("//build/toolchain/gcc_toolchain.gni") |
| +import("//build/toolchain/goma.gni") |
| if (is_gyp) { |
| # Set the compilers for GYP to use. This logic is only relevant to GYP where |
| @@ -47,8 +47,6 @@ if (is_gyp) { |
| } |
| } |
| -# ARM -------------------------------------------------------------------------- |
| - |
| gcc_toolchain("arm") { |
|
Nico
2014/01/29 18:45:48
clang can target arm too fwiw (the same clang bina
|
| cc = "arm-linux-gnueabi-gcc" |
| cxx = "arm-linux-gnueabi-g++" |
| @@ -59,11 +57,22 @@ gcc_toolchain("arm") { |
| toolchain_os = "linux" |
| } |
| -# 32-bit ----------------------------------------------------------------------- |
| - |
| gcc_toolchain("x86") { |
| - cc = "gcc" |
| - cxx = "g++" |
| + if (is_clang) { |
| + if (use_clang_type_profiler) { |
| + prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin", |
| + ".", root_build_dir) |
| + } else { |
| + prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
| + ".", root_build_dir) |
| + } |
| + cc = "$prefix/clang" |
| + 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.
|
| + } else { |
| + cc = "gcc" |
| + cxx = "g++" |
| + } |
| + |
| ar = "ar" |
| ld = cxx |
| @@ -72,8 +81,21 @@ gcc_toolchain("x86") { |
| } |
| gcc_toolchain("x64") { |
| - cc = "gcc" |
| - cxx = "g++" |
| + if (is_clang) { |
| + if (use_clang_type_profiler) { |
| + prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", |
| + ".", root_build_dir) |
| + } else { |
| + prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
| + ".", root_build_dir) |
| + } |
| + cc = "$prefix/clang" |
| + cxx = "$prefix/clang++" |
| + } else { |
| + cc = "gcc" |
| + cxx = "g++" |
| + } |
| + |
| ar = "ar" |
| ld = cxx |
| @@ -81,8 +103,6 @@ gcc_toolchain("x64") { |
| toolchain_os = "linux" |
| } |
| -# MIPS ----------------------------------------------------------------------- |
| - |
| gcc_toolchain("mipsel") { |
| cc = "mipsel-linux-gnu-gcc" |
| cxx = "mipsel-linux-gnu-g++" |