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

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

Issue 117863003: Work on GN toolchain definitions and build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
Index: build/toolchain/mac/BUILD.gn
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 4150ae694a3c416124799779da1f8d746c404204..166e4d57f009663d1bd51a314a5f711963648991 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -2,11 +2,25 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+# TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires
+# some enhancements since the commands on Mac are slightly different than on
+# Linux.
+
# Should only be running on Mac.
assert(is_mac || is_ios)
-cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang", ".", root_build_dir)
-cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++", ".", root_build_dir)
+# Clang variables.
+import("../clang.gni")
+
+if (is_clang) {
+ cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang", ".", root_build_dir)
+ cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++", ".", root_build_dir)
+
+ # Set the GYP header for all toolchains when running under Clang.
+ if (is_gyp) {
+ gyp_header = make_clang_global_settings
+ }
+}
ld = cxx
# This will copy the gyp-mac-tool to the build directory. We pass in the source

Powered by Google App Engine
This is Rietveld 408576698