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

Unified Diff: build/common.gypi

Issue 6487005: clang: Set clang-specific flags on linux only if the target compiler is used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 23a47531e533c8bf5341740d7beaa7227fef5b08..d34148502c98d80383291a588a60a6509af00471 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1187,28 +1187,34 @@
}]]
}],
['clang==1', {
- 'cflags': [
- # Clang spots more unused functions.
- '-Wno-unused-function',
- # Don't die on dtoa code that uses a char as an array index.
- '-Wno-char-subscripts',
- # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
- # http://code.google.com/p/googletest/source/detail?r=446 .
- # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
- '-Wno-unnamed-type-template-args',
- # TODO(thakis): Turn on -- http://crbug.com/72205
- '-Wno-overloaded-virtual',
- ],
- 'cflags!': [
- # Clang doesn't seem to know know this flag.
- '-mfpmath=sse',
- ],
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'cflags': [
+ # Clang spots more unused functions.
+ '-Wno-unused-function',
+ # Don't die on dtoa code that uses a char as an array index.
+ '-Wno-char-subscripts',
+ # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
+ # http://code.google.com/p/googletest/source/detail?r=446 .
+ # TODO(thakis): Use -isystem instead (http://crbug.com/58751 )
+ '-Wno-unnamed-type-template-args',
+ # TODO(thakis): Turn on -- http://crbug.com/72205
+ '-Wno-overloaded-virtual',
+ ],
+ 'cflags!': [
+ # Clang doesn't seem to know know this flag.
+ '-mfpmath=sse',
+ ],
+ }]],
}],
['clang==1 and clang_load!="" and clang_add_plugin!=""', {
- 'cflags': [
- '-Xclang', '-load', '-Xclang', '<(clang_load)',
- '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
- ],
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'cflags': [
+ '-Xclang', '-load', '-Xclang', '<(clang_load)',
+ '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
+ ],
+ }]],
}],
['no_strict_aliasing==1', {
'cflags': [
« 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