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

Unified Diff: build/common.gypi

Issue 522020: clang support (Closed)
Patch Set: lgtm Created 10 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
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 0f721ed7ec0e1ed515367d2cf17d3fa8ec698800..226a4fbc010334c88567eaffd23dd0bafe694edb 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -251,6 +251,11 @@
# Set this to true to enable SELinux support.
'selinux%': 0,
+ # Set this to true when building with Clang.
+ # 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 +1119,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',

Powered by Google App Engine
This is Rietveld 408576698