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

Side by Side Diff: build/common.gypi

Issue 851163006: UBSAN fixes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/ubsan/blacklist.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt', 424 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt',
425 # Track where uninitialized memory originates from. From fastest to 425 # Track where uninitialized memory originates from. From fastest to
426 # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2 426 # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2
427 # - track the chain of stores leading from allocation site to use site. 427 # - track the chain of stores leading from allocation site to use site.
428 'msan_track_origins%': 1, 428 'msan_track_origins%': 1,
429 429
430 # Enable building with UBSan (Clang's -fsanitize=undefined option). 430 # Enable building with UBSan (Clang's -fsanitize=undefined option).
431 # -fsanitize=undefined only works with clang, but ubsan=1 implies clang=1 431 # -fsanitize=undefined only works with clang, but ubsan=1 implies clang=1
432 # See http://clang.llvm.org/docs/UsersManual.html 432 # See http://clang.llvm.org/docs/UsersManual.html
433 'ubsan%': 0, 433 'ubsan%': 0,
434 'ubsan_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan/blacklist.txt',
434 435
435 # Enable building with UBsan's vptr (Clang's -fsanitize=vptr option). 436 # Enable building with UBsan's vptr (Clang's -fsanitize=vptr option).
436 # -fsanitize=vptr only works with clang, but ubsan_vptr=1 implies clang=1 437 # -fsanitize=vptr only works with clang, but ubsan_vptr=1 implies clang=1
437 'ubsan_vptr%': 0, 438 'ubsan_vptr%': 0,
438 'ubsan_vptr_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan_vptr/blacklist. txt',
439 439
440 # Use the dynamic libraries instrumented by one of the sanitizers 440 # Use the dynamic libraries instrumented by one of the sanitizers
441 # instead of the standard system libraries. 441 # instead of the standard system libraries.
442 'use_instrumented_libraries%': 0, 442 'use_instrumented_libraries%': 0,
443 443
444 # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of 444 # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of
445 # stdlibc++ as standard library. This is intended to use for instrumented 445 # stdlibc++ as standard library. This is intended to use for instrumented
446 # builds. 446 # builds.
447 'use_custom_libcxx%': 0, 447 'use_custom_libcxx%': 0,
448 448
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 'use_sanitizer_options%': '<(use_sanitizer_options)', 1123 'use_sanitizer_options%': '<(use_sanitizer_options)',
1124 'syzyasan%': '<(syzyasan)', 1124 'syzyasan%': '<(syzyasan)',
1125 'syzygy_optimize%': '<(syzygy_optimize)', 1125 'syzygy_optimize%': '<(syzygy_optimize)',
1126 'lsan%': '<(lsan)', 1126 'lsan%': '<(lsan)',
1127 'msan%': '<(msan)', 1127 'msan%': '<(msan)',
1128 'msan_blacklist%': '<(msan_blacklist)', 1128 'msan_blacklist%': '<(msan_blacklist)',
1129 'msan_track_origins%': '<(msan_track_origins)', 1129 'msan_track_origins%': '<(msan_track_origins)',
1130 'tsan%': '<(tsan)', 1130 'tsan%': '<(tsan)',
1131 'tsan_blacklist%': '<(tsan_blacklist)', 1131 'tsan_blacklist%': '<(tsan_blacklist)',
1132 'ubsan%': '<(ubsan)', 1132 'ubsan%': '<(ubsan)',
1133 'ubsan_blacklist%': '<(ubsan_blacklist)',
1133 'ubsan_vptr%': '<(ubsan_vptr)', 1134 'ubsan_vptr%': '<(ubsan_vptr)',
1134 'ubsan_vptr_blacklist%': '<(ubsan_vptr_blacklist)',
1135 'use_instrumented_libraries%': '<(use_instrumented_libraries)', 1135 'use_instrumented_libraries%': '<(use_instrumented_libraries)',
1136 'use_custom_libcxx%': '<(use_custom_libcxx)', 1136 'use_custom_libcxx%': '<(use_custom_libcxx)',
1137 'use_system_libcxx%': '<(use_system_libcxx)', 1137 'use_system_libcxx%': '<(use_system_libcxx)',
1138 'clang_type_profiler%': '<(clang_type_profiler)', 1138 'clang_type_profiler%': '<(clang_type_profiler)',
1139 'order_profiling%': '<(order_profiling)', 1139 'order_profiling%': '<(order_profiling)',
1140 'order_text_section%': '<(order_text_section)', 1140 'order_text_section%': '<(order_text_section)',
1141 'enable_extensions%': '<(enable_extensions)', 1141 'enable_extensions%': '<(enable_extensions)',
1142 'enable_plugin_installation%': '<(enable_plugin_installation)', 1142 'enable_plugin_installation%': '<(enable_plugin_installation)',
1143 'enable_plugins%': '<(enable_plugins)', 1143 'enable_plugins%': '<(enable_plugins)',
1144 'enable_session_service%': '<(enable_session_service)', 1144 'enable_session_service%': '<(enable_session_service)',
(...skipping 3057 matching lines...) Expand 10 before | Expand all | Expand 10 after
4202 '-mllvm -asan-globals=0', # http://crbug.com/352073 4202 '-mllvm -asan-globals=0', # http://crbug.com/352073
4203 ], 4203 ],
4204 }], 4204 }],
4205 ], 4205 ],
4206 }], 4206 }],
4207 ['ubsan==1', { 4207 ['ubsan==1', {
4208 'target_conditions': [ 4208 'target_conditions': [
4209 ['_toolset=="target"', { 4209 ['_toolset=="target"', {
4210 'cflags': [ 4210 'cflags': [
4211 '-fsanitize=undefined', 4211 '-fsanitize=undefined',
4212 # -fsanitize=vptr is incompatible with -fno-rtti. 4212 '-fsanitize-blacklist=<(ubsan_blacklist)',
4213 '-fno-sanitize=vptr',
4214 # Employ the experimental PBQP register allocator to avoid 4213 # Employ the experimental PBQP register allocator to avoid
4215 # slow compilation on files with too many basic blocks. 4214 # slow compilation on files with too many basic blocks.
4216 # See http://crbug.com/426271. 4215 # See http://crbug.com/426271.
4217 '-mllvm -regalloc=pbqp', 4216 '-mllvm -regalloc=pbqp',
4218 # Speculatively use coalescing to slightly improve the code 4217 # Speculatively use coalescing to slightly improve the code
4219 # generated by PBQP regallocator. May increase compile time. 4218 # generated by PBQP regallocator. May increase compile time.
4220 '-mllvm -pbqp-coalescing', 4219 '-mllvm -pbqp-coalescing',
4221 ], 4220 ],
4221 'cflags_cc!': [
4222 '-fno-rtti',
4223 ],
4224 'cflags!': [
4225 '-fno-rtti',
4226 ],
4222 'ldflags': [ 4227 'ldflags': [
4223 '-fsanitize=undefined', 4228 '-fsanitize=undefined',
4224 # -fsanitize=vptr is incompatible with -fno-rtti. 4229 ],
4225 '-fno-sanitize=vptr', 4230 'defines': [
4231 'UNDEFINED_SANITIZER',
4226 ], 4232 ],
4227 }], 4233 }],
4228 ], 4234 ],
4229 }], 4235 }],
4230 ['ubsan_vptr==1', { 4236 ['ubsan_vptr==1', {
4231 'target_conditions': [ 4237 'target_conditions': [
4232 ['_toolset=="target"', { 4238 ['_toolset=="target"', {
4233 'cflags': [ 4239 'cflags': [
4234 '-fsanitize=vptr', 4240 '-fsanitize=vptr',
4235 '-fsanitize-blacklist=<(ubsan_vptr_blacklist)', 4241 '-fsanitize-blacklist=<(ubsan_blacklist)',
4236 ], 4242 ],
4237 'cflags_cc!': [ 4243 'cflags_cc!': [
4238 '-fno-rtti', 4244 '-fno-rtti',
4239 ], 4245 ],
4240 'cflags!': [ 4246 'cflags!': [
4241 '-fno-rtti', 4247 '-fno-rtti',
4242 ], 4248 ],
4243 'ldflags': [ 4249 'ldflags': [
4244 '-fsanitize=vptr', 4250 '-fsanitize=vptr',
4245 ], 4251 ],
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
5841 # settings in target dicts. SYMROOT is a special case, because many other 5847 # settings in target dicts. SYMROOT is a special case, because many other
5842 # Xcode variables depend on it, including variables such as 5848 # Xcode variables depend on it, including variables such as
5843 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 5849 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5844 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 5850 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5845 # files to appear (when present) in the UI as actual files and not red 5851 # files to appear (when present) in the UI as actual files and not red
5846 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 5852 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5847 # and therefore SYMROOT, needs to be set at the project level. 5853 # and therefore SYMROOT, needs to be set at the project level.
5848 'SYMROOT': '<(DEPTH)/xcodebuild', 5854 'SYMROOT': '<(DEPTH)/xcodebuild',
5849 }, 5855 },
5850 } 5856 }
OLDNEW
« no previous file with comments | « no previous file | tools/ubsan/blacklist.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698