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 2503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2514 # This warns on using ints as initializers for floats in | 2514 # This warns on using ints as initializers for floats in |
2515 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), | 2515 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), |
2516 # which happens in several places in chrome code. Not sure if | 2516 # which happens in several places in chrome code. Not sure if |
2517 # this is worth fixing. | 2517 # this is worth fixing. |
2518 '-Wno-c++11-narrowing', | 2518 '-Wno-c++11-narrowing', |
2519 | 2519 |
2520 # Clang considers the `register` keyword as deprecated, but e.g. | 2520 # Clang considers the `register` keyword as deprecated, but e.g. |
2521 # code generated by flex (used in angle) contains that keyword. | 2521 # code generated by flex (used in angle) contains that keyword. |
2522 # http://crbug.com/255186 | 2522 # http://crbug.com/255186 |
2523 '-Wno-deprecated-register', | 2523 '-Wno-deprecated-register', |
| 2524 |
| 2525 # TODO(hans): Get this cleaned up. |
| 2526 '-Wno-inconsistent-missing-override', |
2524 ], | 2527 ], |
2525 }, | 2528 }, |
2526 'includes': [ 'set_clang_warning_flags.gypi', ], | 2529 'includes': [ 'set_clang_warning_flags.gypi', ], |
2527 'defines': [ | 2530 'defines': [ |
2528 # Don't use deprecated V8 APIs anywhere. | 2531 # Don't use deprecated V8 APIs anywhere. |
2529 'V8_DEPRECATION_WARNINGS', | 2532 'V8_DEPRECATION_WARNINGS', |
2530 ], | 2533 ], |
2531 'include_dirs': [ | 2534 'include_dirs': [ |
2532 '<(SHARED_INTERMEDIATE_DIR)', | 2535 '<(SHARED_INTERMEDIATE_DIR)', |
2533 ], | 2536 ], |
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4178 'cflags': [ | 4181 'cflags': [ |
4179 '-fsanitize=address', | 4182 '-fsanitize=address', |
4180 # TODO(earthdok): Re-enable. http://crbug.com/427202 | 4183 # TODO(earthdok): Re-enable. http://crbug.com/427202 |
4181 #'-fsanitize-blacklist=<(asan_blacklist)', | 4184 #'-fsanitize-blacklist=<(asan_blacklist)', |
4182 ], | 4185 ], |
4183 'ldflags': [ | 4186 'ldflags': [ |
4184 '-fsanitize=address', | 4187 '-fsanitize=address', |
4185 ], | 4188 ], |
4186 }], | 4189 }], |
4187 ], | 4190 ], |
| 4191 'conditions': [ |
| 4192 ['OS=="mac"', { |
| 4193 'cflags': [ |
| 4194 '-mllvm -asan-globals=0', # http://crbug.com/352073 |
| 4195 ], |
| 4196 }], |
| 4197 ], |
4188 }], | 4198 }], |
4189 ['ubsan==1', { | 4199 ['ubsan==1', { |
4190 'target_conditions': [ | 4200 'target_conditions': [ |
4191 ['_toolset=="target"', { | 4201 ['_toolset=="target"', { |
4192 'cflags': [ | 4202 'cflags': [ |
4193 '-fsanitize=undefined', | 4203 '-fsanitize=undefined', |
4194 # -fsanitize=vptr is incompatible with -fno-rtti. | 4204 # -fsanitize=vptr is incompatible with -fno-rtti. |
4195 '-fno-sanitize=vptr', | 4205 '-fno-sanitize=vptr', |
4196 # Employ the experimental PBQP register allocator to avoid | 4206 # Employ the experimental PBQP register allocator to avoid |
4197 # slow compilation on files with too many basic blocks. | 4207 # slow compilation on files with too many basic blocks. |
(...skipping 30 matching lines...) Expand all Loading... |
4228 'defines': [ | 4238 'defines': [ |
4229 'UNDEFINED_SANITIZER', | 4239 'UNDEFINED_SANITIZER', |
4230 ], | 4240 ], |
4231 }], | 4241 }], |
4232 ], | 4242 ], |
4233 }], | 4243 }], |
4234 ['asan_coverage!=0', { | 4244 ['asan_coverage!=0', { |
4235 'target_conditions': [ | 4245 'target_conditions': [ |
4236 ['_toolset=="target"', { | 4246 ['_toolset=="target"', { |
4237 'cflags': [ | 4247 'cflags': [ |
4238 '-mllvm -asan-coverage=<(asan_coverage)', | 4248 '-fsanitize-coverage=<(asan_coverage)', |
4239 ], | 4249 ], |
4240 }], | 4250 }], |
4241 ], | 4251 ], |
4242 }], | 4252 }], |
4243 ['asan_field_padding!=0', { | 4253 ['asan_field_padding!=0', { |
4244 'target_conditions': [ | 4254 'target_conditions': [ |
4245 ['_toolset=="target"', { | 4255 ['_toolset=="target"', { |
4246 'cflags': [ | 4256 'cflags': [ |
4247 '-fsanitize-address-field-padding=<(asan_field_padding)', | 4257 '-fsanitize-address-field-padding=<(asan_field_padding)', |
4248 ], | 4258 ], |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4599 ], | 4609 ], |
4600 }], | 4610 }], |
4601 ['asan==1', { | 4611 ['asan==1', { |
4602 'cflags': [ | 4612 'cflags': [ |
4603 # Android build relies on -Wl,--gc-sections removing | 4613 # Android build relies on -Wl,--gc-sections removing |
4604 # unreachable code. ASan instrumentation for globals inhibits | 4614 # unreachable code. ASan instrumentation for globals inhibits |
4605 # this and results in a library with unresolvable relocations. | 4615 # this and results in a library with unresolvable relocations. |
4606 # TODO(eugenis): find a way to reenable this. | 4616 # TODO(eugenis): find a way to reenable this. |
4607 '-mllvm -asan-globals=0', | 4617 '-mllvm -asan-globals=0', |
4608 ], | 4618 ], |
4609 'conditions': [ | |
4610 ['target_arch=="arm"', { | |
4611 'ldflags': [ | |
4612 # TODO(hans): The ASan runtime is no longer automatically | |
4613 # added to the link line when using -nostdlib. Can we | |
4614 # stop adding -nostdlib? (crbug.com/423429) | |
4615 '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/lib/clang/3.6
.0/lib/linux/libclang_rt.asan-arm-android.so', | |
4616 ], | |
4617 }], | |
4618 ], | |
4619 }], | 4619 }], |
4620 ['android_webview_build==0', { | 4620 ['android_webview_build==0', { |
4621 'defines': [ | 4621 'defines': [ |
4622 # The NDK has these things, but doesn't define the constants | 4622 # The NDK has these things, but doesn't define the constants |
4623 # to say that it does. Define them here instead. | 4623 # to say that it does. Define them here instead. |
4624 'HAVE_SYS_UIO_H', | 4624 'HAVE_SYS_UIO_H', |
4625 ], | 4625 ], |
4626 'cflags': [ | 4626 'cflags': [ |
4627 '--sysroot=<(android_ndk_sysroot)', | 4627 '--sysroot=<(android_ndk_sysroot)', |
4628 ], | 4628 ], |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4893 'conditions': [ | 4893 'conditions': [ |
4894 ['clang==1', { | 4894 ['clang==1', { |
4895 'variables': { | 4895 'variables': { |
4896 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', | 4896 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', |
4897 }, | 4897 }, |
4898 }], | 4898 }], |
4899 ['asan==1', { | 4899 ['asan==1', { |
4900 'xcode_settings': { | 4900 'xcode_settings': { |
4901 'OTHER_CFLAGS': [ | 4901 'OTHER_CFLAGS': [ |
4902 '-fsanitize=address', | 4902 '-fsanitize=address', |
| 4903 '-mllvm -asan-globals=0', # http://crbug.com/352073 |
4903 '-gline-tables-only', | 4904 '-gline-tables-only', |
4904 ], | 4905 ], |
4905 }, | 4906 }, |
4906 }], | 4907 }], |
4907 ['asan_coverage!=0', { | 4908 ['asan_coverage!=0', { |
4908 'target_conditions': [ | 4909 'target_conditions': [ |
4909 ['_toolset=="target"', { | 4910 ['_toolset=="target"', { |
4910 'cflags': [ | 4911 'cflags': [ |
4911 '-mllvm -asan-coverage=<(asan_coverage)', | 4912 '-fsanitize-coverage=<(asan_coverage)', |
4912 ], | 4913 ], |
4913 }], | 4914 }], |
4914 ], | 4915 ], |
4915 }], | 4916 }], |
4916 ], | 4917 ], |
4917 'target_conditions': [ | 4918 'target_conditions': [ |
4918 ['_type!="static_library"', { | 4919 ['_type!="static_library"', { |
4919 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, | 4920 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
4920 'conditions': [ | 4921 'conditions': [ |
4921 ['asan==1', { | 4922 ['asan==1', { |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5837 # settings in target dicts. SYMROOT is a special case, because many other | 5838 # settings in target dicts. SYMROOT is a special case, because many other |
5838 # Xcode variables depend on it, including variables such as | 5839 # Xcode variables depend on it, including variables such as |
5839 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 5840 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
5840 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 5841 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
5841 # files to appear (when present) in the UI as actual files and not red | 5842 # files to appear (when present) in the UI as actual files and not red |
5842 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 5843 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
5843 # and therefore SYMROOT, needs to be set at the project level. | 5844 # and therefore SYMROOT, needs to be set at the project level. |
5844 'SYMROOT': '<(DEPTH)/xcodebuild', | 5845 'SYMROOT': '<(DEPTH)/xcodebuild', |
5845 }, | 5846 }, |
5846 } | 5847 } |
OLD | NEW |