diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-18 00:09:15 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-18 00:09:15 +0000 |
commit | 58680cec807bec4cbca35cfad74439a7653040c4 (patch) | |
tree | 1b22d316f591fce655f7e91dc43462534d9af577 /build/common.gypi | |
parent | 784ea1ab3797a0aade739c3d80f9f12b41160aef (diff) | |
download | chromium_src-58680cec807bec4cbca35cfad74439a7653040c4.zip chromium_src-58680cec807bec4cbca35cfad74439a7653040c4.tar.gz chromium_src-58680cec807bec4cbca35cfad74439a7653040c4.tar.bz2 |
Support for building Chrome using Clang.
To build, set the clang=1 gyp_define.
This patch is the culmination of many months of effort and many
patches. It contains the minimal changes to Chrome that
are Clang-specific.
With this, I can build the "chrome" target. Once this patch
is in, we can incrementally fix bits of Chrome and various
tests and remove the Clang-specific workarounds.
Review URL: http://codereview.chromium.org/522020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/common.gypi')
-rw-r--r-- | build/common.gypi | 23 |
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', |