summaryrefslogtreecommitdiffstats
path: root/build/common.gypi
diff options
context:
space:
mode:
Diffstat (limited to 'build/common.gypi')
-rw-r--r--build/common.gypi23
1 files changed, 23 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 0f721ed..d81c567 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -251,6 +251,12 @@
# Set this to true to enable SELinux support.
'selinux%': 0,
+ # Set this to true when building with Clang.
+ # See http://code.google.com/p/chromium/wiki/Clang for details.
+ # TODO: eventually clang should behave identically to gcc, and this
+ # won't be necessary.
+ 'clang%': 0,
+
# Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
'linux_breakpad%': 0,
# And if we want to dump symbols for Breakpad-enabled builds.
@@ -1114,6 +1120,23 @@
],
}]]
}],
+ ['clang==1', {
+ 'cflags': [
+ # Don't warn about unused variables, due to a common pattern:
+ # scoped_deleter unused_variable(&thing_to_delete);
+ '-Wno-unused-variable',
+ # Clang spots more unused functions.
+ '-Wno-unused-function',
+ # gtest confuses clang.
+ '-Wno-bool-conversions',
+ # Don't die on dtoa code that uses a char as an array index.
+ '-Wno-char-subscripts',
+ ],
+ 'cflags!': [
+ # Clang doesn't seem to know know this flag.
+ '-mfpmath=sse',
+ ],
+ }],
['no_strict_aliasing==1', {
'cflags': [
'-fno-strict-aliasing',