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

Unified Diff: build/common.gypi

Issue 7779039: Set CC to clang when GYP_DEFINES=clang=1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 14e78d11b0d17b8227d7dc70c6b7c5df9f515c5a..23ccc7411609fbf147d4933370692840d500120c 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1676,6 +1676,9 @@
{'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
],
['clang==1', {
+ 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
+ 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
Evan Martin 2011/09/06 17:41:16 Where does SOURCE_ROOT come from?
Nico 2011/09/06 17:47:08 I think it's one of the many magic environment var
+ 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'WARNING_CFLAGS': [
'-Wheader-hygiene',
# Don't die on dtoa code that uses a char as an array index.
@@ -1703,6 +1706,13 @@
}],
],
},
+ 'conditions': [
+ ['clang==1', {
+ 'variables': {
+ 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
+ },
+ }],
+ ],
'target_conditions': [
['_type!="static_library"', {
'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
@@ -2010,6 +2020,16 @@
],
},
}],
+ ['clang==1', {
+ 'make_global_settings': [
+ ['CC', 'third_party/llvm-build/Release+Asserts/bin/clang'],
+ ['CXX', 'third_party/llvm-build/Release+Asserts/bin/clang++'],
+ ['LINK', 'third_party/llvm-build/Release+Asserts/bin/clang++'],
Mark Mentovai 2011/09/07 01:36:24 This is fine for now. We’ll need to split this up
+ ['CC.host', '$(CC)'],
+ ['CXX.host', '$(CXX)'],
+ ['LINK.host', '$(LINK)'],
+ ],
+ }],
],
'xcode_settings': {
# DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698