Index: build/toolchain/mac/BUILD.gn |
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn |
index 75e84d88eb0b0f25a6de0a5083c751612b611f00..c473404ba46835fee5db19ccb16ea401cc771a8f 100644 |
--- a/build/toolchain/mac/BUILD.gn |
+++ b/build/toolchain/mac/BUILD.gn |
@@ -32,6 +32,13 @@ if (current_toolchain == default_toolchain) { |
} |
} |
+if (use_system_clang) { |
+ _clang_prefix = "" |
+} else { |
+ _clang_prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin/", |
+ root_build_dir) |
+} |
+ |
# This will copy the gyp-mac-tool to the build directory. We pass in the source |
# file of the mac tool. |
gyp_mac_tool_source = |
@@ -350,81 +357,71 @@ template("mac_toolchain") { |
mac_toolchain("clang_arm") { |
toolchain_cpu = "arm" |
toolchain_os = "mac" |
- prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
- root_build_dir) |
- cc = "${goma_prefix}$prefix/clang" |
- cxx = "${goma_prefix}$prefix/clang++" |
+ cc = "${goma_prefix}${_clang_prefix}clang" |
+ cxx = "${goma_prefix}${_clang_prefix}clang++" |
ld = cxx |
is_clang = true |
} |
-mac_toolchain("ios_clang_arm") { |
+mac_toolchain("arm") { |
toolchain_cpu = "arm" |
toolchain_os = "mac" |
- |
- # TODO(GYP): We need to support being able to use the version of clang |
- # shipped w/ XCode instead of the one pulled from upstream. |
- prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
- root_build_dir) |
- cc = "${goma_prefix}$prefix/clang" |
- cxx = "${goma_prefix}$prefix/clang++" |
+ cc = "${goma_prefix}gcc" |
+ cxx = "${goma_prefix}g++" |
ld = cxx |
- is_clang = true |
+ is_clang = false |
} |
-mac_toolchain("ios_clang_armv7") { |
- toolchain_cpu = "armv7" |
+mac_toolchain("clang_x64") { |
+ toolchain_cpu = "x64" |
toolchain_os = "mac" |
- |
- # TODO(GYP): We need to support being able to use the version of clang |
- # shipped w/ XCode instead of the one pulled from upstream. |
- prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
- root_build_dir) |
- cc = "${goma_prefix}$prefix/clang" |
- cxx = "${goma_prefix}$prefix/clang++" |
+ cc = "${goma_prefix}${_clang_prefix}clang" |
+ cxx = "${goma_prefix}${_clang_prefix}clang++" |
ld = cxx |
is_clang = true |
} |
-mac_toolchain("ios_clang_arm64") { |
- toolchain_cpu = "arm64" |
+mac_toolchain("x64") { |
+ toolchain_cpu = "x64" |
toolchain_os = "mac" |
+ cc = "${goma_prefix}gcc" |
+ cxx = "${goma_prefix}g++" |
+ ld = cxx |
+ is_clang = false |
+} |
Dirk Pranke
2016/06/20 16:31:22
Where do we use gcc toolchains on the mac? Why add
sdefresne
2016/06/21 11:31:29
I didn't add them, I moved the ios ones below this
|
- # TODO(GYP): We need to support being able to use the version of clang |
- # shipped w/ XCode instead of the one pulled from upstream. |
- prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
- root_build_dir) |
- cc = "${goma_prefix}$prefix/clang" |
- cxx = "${goma_prefix}$prefix/clang++" |
+mac_toolchain("ios_clang_arm") { |
+ toolchain_cpu = "arm" |
+ toolchain_os = "mac" |
+ cc = "${goma_prefix}${_clang_prefix}clang" |
+ cxx = "${goma_prefix}${_clang_prefix}clang++" |
ld = cxx |
is_clang = true |
} |
-mac_toolchain("arm") { |
- toolchain_cpu = "arm" |
+mac_toolchain("ios_clang_arm64") { |
+ toolchain_cpu = "arm64" |
toolchain_os = "mac" |
- cc = "${goma_prefix}/gcc" |
- cxx = "${goma_prefix}/g++" |
+ cc = "${goma_prefix}${_clang_prefix}clang" |
+ cxx = "${goma_prefix}${_clang_prefix}clang++" |
ld = cxx |
- is_clang = false |
+ is_clang = true |
} |
-mac_toolchain("clang_x64") { |
- toolchain_cpu = "x64" |
+mac_toolchain("ios_clang_x86") { |
+ toolchain_cpu = "x86" |
toolchain_os = "mac" |
- prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
- root_build_dir) |
- cc = "${goma_prefix}$prefix/clang" |
- cxx = "${goma_prefix}$prefix/clang++" |
+ cc = "${goma_prefix}${_clang_prefix}clang" |
+ cxx = "${goma_prefix}${_clang_prefix}clang++" |
ld = cxx |
is_clang = true |
} |
-mac_toolchain("x64") { |
+mac_toolchain("ios_clang_x64") { |
toolchain_cpu = "x64" |
toolchain_os = "mac" |
- cc = "${goma_prefix}/gcc" |
- cxx = "${goma_prefix}/g++" |
+ cc = "${goma_prefix}${_clang_prefix}clang" |
+ cxx = "${goma_prefix}${_clang_prefix}clang++" |
ld = cxx |
- is_clang = false |
+ is_clang = true |
} |