Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(972)

Unified Diff: build/toolchain/linux/BUILD.gn

Issue 147923010: Work on Clang for pure GN build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« build/config/linux/pkg-config.py ('K') | « build/config/linux/pkg_config.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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++"
« build/config/linux/pkg-config.py ('K') | « build/config/linux/pkg_config.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698