Index: build/common.gypi |
diff --git a/build/common.gypi b/build/common.gypi |
index 3e2d983660be1fab5870783e1c943986dd7a6e0b..c79e8e76ee7ce79ea4b8f3becf125a1544c84c49 100644 |
--- a/build/common.gypi |
+++ b/build/common.gypi |
@@ -1099,11 +1099,10 @@ |
'clang%': '<(clang)', |
'make_clang_dir%': 'third_party/llvm-build/Release+Asserts', |
- # Control which version of clang to use when 'clang' is set to 1 when |
- # building for iOS (Apple has not yet open-sourced support for "arm64" |
- # so when building for that 'target_arch' we have to use clang shipped |
- # with Xcode that does not supports some flags). |
- # TODO(sdefresne): remove this once http://crbug.com/341453 is fixed. |
+ # Control which version of clang to use when building for iOS. If set to |
+ # '1', uses the version of clang that ships with Xcode. If set to '0', uses |
+ # the version of clang that ships with the Chromium source. This variable |
+ # is automatically set to '1' when using the Xcode generator. |
'clang_xcode%': 0, |
# These two variables can be set in GYP_DEFINES while running |
@@ -1523,8 +1522,6 @@ |
'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt', |
}], |
['OS=="mac"', { |
- # Enable clang on mac by default! |
- 'clang%': 1, |
'conditions': [ |
# All Chrome builds have breakpad symbols, but only process the |
# symbols from official builds. |
@@ -1534,6 +1531,9 @@ |
], |
}], # OS=="mac" |
['OS=="mac" or OS=="ios"', { |
+ # Enable clang on mac by default! All iOS builds already use clang. |
Nico
2014/03/13 15:43:38
nit: This comment can probably go away. It was (ma
|
+ 'clang%': 1, |
+ |
'variables': { |
# Mac OS X SDK and deployment target support. The SDK identifies |
# the version of the system headers that will be used, and |
@@ -1752,16 +1752,15 @@ |
'-w', '<(DEPTH)/build/ios/grit_whitelist.txt' |
], |
- # Enable clang and host builds when generating with ninja-ios. |
+ # Enable host builds when generating with ninja-ios. |
'conditions': [ |
['"<(GENERATOR)"=="ninja"', { |
- 'clang%': 1, |
'host_os%': "mac", |
}], |
- # Apple has not upstreamed the support for "arm64" yet, so when |
- # building for "arm64" or "both", we need to use the clang that |
- # is provided with Xcode. |
- ['target_subarch!="arm32"', { |
+ |
+ # TODO(sdefresne): Remove the target_subarch check once Apple has |
+ # upstreamed the support for "arm64". http://crbug.com/341453 |
+ ['target_subarch!="arm32" or "<(GENERATOR)"=="xcode"', { |
'clang_xcode%': 1, |
}], |
], |
@@ -4136,23 +4135,17 @@ |
# Warns when a const char[] is converted to bool. |
'-Wstring-conversion', |
+ |
+ # Clang considers the `register` keyword as deprecated, but |
+ # e.g. code generated by flex (used in angle) contains that |
+ # keyword. http://crbug.com/255186 |
+ '-Wno-deprecated-register', |
], |
'conditions': [ |
['clang_xcode==0', { |
'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', |
'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', |
- |
- 'WARNING_CFLAGS': [ |
- # Clang considers the `register` keyword as deprecated, but |
- # e.g. code generated by flex (used in angle) contains that |
- # keyword. http://crbug.com/255186 |
- # |
- # Note: clang as shipped with Xcode is older and does not |
- # treat the `register` as deprecated and does not define |
- # this flag, so don't enable it if "clang_xcode" is "1". |
- '-Wno-deprecated-register', |
- ], |
}], |
], |
}], |
@@ -4426,31 +4419,9 @@ |
['OS=="ios"', { |
'target_defaults': { |
'xcode_settings' : { |
- 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
- |
- # This next block is mostly common with the 'mac' section above, |
- # but keying off (or setting) 'clang' isn't valid for iOS as it |
- # also means using Chromium's build of clang. |
- |
# TODO(stuartmorgan): switch to c++0x (see TODOs in the clang |
# section above). |
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', |
- # Warn if automatic synthesis is triggered with |
- # the -Wobjc-missing-property-synthesis flag. |
- 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES', |
- 'WARNING_CFLAGS': [ |
- '-Wheader-hygiene', |
- # Don't die on dtoa code that uses a char as an array index. |
- # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
- '-Wno-char-subscripts', |
- # See comment in the mac clang section above for this flag. |
- '-Wno-unneeded-internal-declaration', |
- # Match OS X clang C++11 warning settings. |
- '-Wno-c++11-narrowing', |
- # As of Xcode 5.1, the register keyword is deprecated, but Chromium |
- # code still uses it. |
- '-Wno-deprecated-register', |
- ], |
'conditions': [ |
# Older Xcodes do not support -Wno-deprecated-register, so pass an |
@@ -4460,7 +4431,7 @@ |
# continue failing on unknown compiler options. |
# TODO(rohitrao): This flag is temporary and should be removed as |
# soon as the iOS bots are updated to use Xcode 5.1. |
- ['"<(GENERATOR)"=="xcode" or clang_xcode==1', { |
+ ['clang_xcode==1', { |
'WARNING_CFLAGS': [ |
'-Wno-unknown-warning-option', |
], |