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

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: merge 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..612d8bf3461ea51642c6e94f42df3ea439c5fae8 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -2,11 +2,28 @@
# 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
+ }
+} else {
+ cc = "gcc"
+ cxx = "g++"
+}
ld = cxx
# This will copy the gyp-mac-tool to the build directory. We pass in the source
« no previous file with comments | « build/toolchain/linux/find_android_compilers.py ('k') | tools/gn/secondary/third_party/WebKit/Source/wtf/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698