OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # IMPORTANT: | 5 # IMPORTANT: |
6 # Please don't directly include this file if you are building via gyp_chromium, | 6 # Please don't directly include this file if you are building via gyp_chromium, |
7 # since gyp_chromium is automatically forcing its inclusion. | 7 # since gyp_chromium is automatically forcing its inclusion. |
8 { | 8 { |
9 # Variables expected to be overriden on the GYP command line (-D) or by | 9 # Variables expected to be overriden on the GYP command line (-D) or by |
10 # ~/.gyp/include.gypi. | 10 # ~/.gyp/include.gypi. |
(...skipping 3119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3130 | 3130 |
3131 # Clang spots more unused functions. | 3131 # Clang spots more unused functions. |
3132 '-Wno-unused-function', | 3132 '-Wno-unused-function', |
3133 | 3133 |
3134 # Warns on switches on enums that cover all enum values but | 3134 # Warns on switches on enums that cover all enum values but |
3135 # also contain a default: branch. Chrome is full of that. | 3135 # also contain a default: branch. Chrome is full of that. |
3136 '-Wno-covered-switch-default', | 3136 '-Wno-covered-switch-default', |
3137 | 3137 |
3138 # Warns when a const char[] is converted to bool. | 3138 # Warns when a const char[] is converted to bool. |
3139 '-Wstring-conversion', | 3139 '-Wstring-conversion', |
3140 ], | 3140 |
3141 'cflags!': [ | 3141 # C++11-related flags: |
3142 # Clang doesn't seem to know know this flag. | 3142 |
3143 '-mfpmath=sse', | |
3144 ], | |
3145 }], | |
3146 ['clang==1 and OS!="android"', { | |
3147 # Turn on C++11. | |
3148 'cflags': [ | |
3149 # This warns on using ints as initializers for floats in | 3143 # This warns on using ints as initializers for floats in |
3150 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), | 3144 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), |
3151 # which happens in several places in chrome code. Not sure if | 3145 # which happens in several places in chrome code. Not sure if |
3152 # this is worth fixing. | 3146 # this is worth fixing. |
3153 '-Wno-c++11-narrowing', | 3147 '-Wno-c++11-narrowing', |
3154 | 3148 |
3155 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11 | 3149 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11 |
3156 # user-defined literals, this is now a string literal with a UD | 3150 # user-defined literals, this is now a string literal with a UD |
3157 # suffix. However, this is used heavily in NaCl code, so disable | 3151 # suffix. However, this is used heavily in NaCl code, so disable |
3158 # the warning for now. | 3152 # the warning for now. |
3159 '-Wno-reserved-user-defined-literal', | 3153 '-Wno-reserved-user-defined-literal', |
3160 | 3154 |
3161 # Clang considers the `register` keyword as deprecated, but e.g. | 3155 # Clang considers the `register` keyword as deprecated, but e.g. |
3162 # code generated by flex (used in angle) contains that keyword. | 3156 # code generated by flex (used in angle) contains that keyword. |
3163 # http://crbug.com/255186 | 3157 # http://crbug.com/255186 |
3164 '-Wno-deprecated-register', | 3158 '-Wno-deprecated-register', |
3165 ], | 3159 ], |
| 3160 'cflags!': [ |
| 3161 # Clang doesn't seem to know know this flag. |
| 3162 '-mfpmath=sse', |
| 3163 ], |
3166 'cflags_cc': [ | 3164 'cflags_cc': [ |
3167 # See the comment in the Mac section for what it takes to move | 3165 # See the comment in the Mac section for what it takes to move |
3168 # this to -std=c++11. | 3166 # this to -std=c++11. |
3169 '-std=gnu++11', | 3167 '-std=gnu++11', |
3170 ], | 3168 ], |
3171 }], | 3169 }], |
3172 ['clang==1 and OS=="android"', { | 3170 ['clang==1 and OS=="android"', { |
3173 # Android uses gcc4.4, and clang isn't compatible with gcc4.4's | 3171 # Android uses stlport, whose include/new defines |
3174 # libstdc++ in C++11 mode. So no C++11 mode for Android yet. | 3172 # `void operator delete[](void* ptr) throw();`, which |
3175 # Doesn't work with asan for some reason either: crbug.com/233464 | 3173 # clang's -Wimplicit-exception-spec-mismatch warns about for some |
3176 'cflags': [ | 3174 # reason -- http://llvm.org/PR16638. TODO(thakis): Include stlport |
3177 # Especially needed for gtest macros using enum values from Mac | 3175 # via -isystem instead. |
3178 # system headers. | 3176 'cflags_cc': [ |
3179 # TODO(pkasting): In C++11 this is legal, so this should be | 3177 '-Wno-implicit-exception-spec-mismatch', |
3180 # removed when we change to that. (This is also why we don't | |
3181 # bother fixing all these cases today.) | |
3182 '-Wno-unnamed-type-template-args', | |
3183 # This (rightfully) complains about 'override', which we use | |
3184 # heavily. | |
3185 '-Wno-c++11-extensions', | |
3186 ], | 3178 ], |
3187 }], | 3179 }], |
3188 ['clang==1 and clang_use_chrome_plugins==1', { | 3180 ['clang==1 and clang_use_chrome_plugins==1', { |
3189 'cflags': [ | 3181 'cflags': [ |
3190 '<@(clang_chrome_plugins_flags)', | 3182 '<@(clang_chrome_plugins_flags)', |
3191 ], | 3183 ], |
3192 }], | 3184 }], |
3193 ['clang==1 and clang_load!=""', { | 3185 ['clang==1 and clang_load!=""', { |
3194 'cflags': [ | 3186 'cflags': [ |
3195 '-Xclang', '-load', '-Xclang', '<(clang_load)', | 3187 '-Xclang', '-load', '-Xclang', '<(clang_load)', |
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4644 # settings in target dicts. SYMROOT is a special case, because many other | 4636 # settings in target dicts. SYMROOT is a special case, because many other |
4645 # Xcode variables depend on it, including variables such as | 4637 # Xcode variables depend on it, including variables such as |
4646 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 4638 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
4647 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 4639 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
4648 # files to appear (when present) in the UI as actual files and not red | 4640 # files to appear (when present) in the UI as actual files and not red |
4649 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 4641 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
4650 # and therefore SYMROOT, needs to be set at the project level. | 4642 # and therefore SYMROOT, needs to be set at the project level. |
4651 'SYMROOT': '<(DEPTH)/xcodebuild', | 4643 'SYMROOT': '<(DEPTH)/xcodebuild', |
4652 }, | 4644 }, |
4653 } | 4645 } |
OLD | NEW |