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

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

Issue 2209713002: Fix compilation with Xcode version of clang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change conditional. Created 4 years, 4 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
« no previous file with comments | « no previous file | build/toolchain/toolchain.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/mac/BUILD.gn
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index e08b7dff9ac48599e6aee8248aee7c883dd00abd..a08e568ad8f9d77436685c977dfe252c659af5d2 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -21,20 +21,6 @@ import("//build/toolchain/goma.gni")
import("//build/toolchain/toolchain.gni")
import("//build/toolchain/concurrent_links.gni")
-if (use_goma) {
- assert(cc_wrapper == "", "Goma and cc_wrapper can't be used together.")
- compiler_prefix = "$goma_dir/gomacc "
-} else if (cc_wrapper != "") {
- compiler_prefix = cc_wrapper + " "
-} else {
- compiler_prefix = ""
-}
-
-if (!use_xcode_clang) {
- compiler_prefix =
- compiler_prefix + rebase_path("$clang_base_path/bin/", root_build_dir)
-}
-
declare_args() {
# Reduce the number of tasks using the copy_bundle_data and compile_xcassets
# tools as they can cause lots of I/O contention when invoking ninja with a
@@ -86,8 +72,21 @@ template("mac_toolchain") {
# concurrent_links is picked up from the declare_arg().
- cc = "${compiler_prefix}clang"
- cxx = "${compiler_prefix}clang++"
+ if (use_goma) {
+ assert(cc_wrapper == "", "Goma and cc_wrapper can't be used together.")
+ _compiler_prefix = "$goma_dir/gomacc "
+ } else if (cc_wrapper != "") {
+ _compiler_prefix = cc_wrapper + " "
+ } else {
+ _compiler_prefix = ""
+ }
+
+ if (invoker.toolchain_os != "ios" || !use_xcode_clang) {
+ _compiler_prefix += rebase_path("$clang_base_path/bin/", root_build_dir)
+ }
+
+ cc = "${_compiler_prefix}clang"
+ cxx = "${_compiler_prefix}clang++"
ld = cxx
linker_driver =
« no previous file with comments | « no previous file | build/toolchain/toolchain.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698