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

Side by Side Diff: build/common.gypi

Issue 581983003: Enable ASan default options on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved the dependency to target_defaults Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | build/sanitizers/sanitizer_options.cc » ('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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 # -fsanitize=address only works with clang, but asan=1 implies clang=1 382 # -fsanitize=address only works with clang, but asan=1 implies clang=1
383 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addre sssanitizer 383 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addre sssanitizer
384 'asan%': 0, 384 'asan%': 0,
385 # Enable coverage gathering instrumentation in ASan. This flag also 385 # Enable coverage gathering instrumentation in ASan. This flag also
386 # controls coverage granularity (1 for function-level coverage, 2 for 386 # controls coverage granularity (1 for function-level coverage, 2 for
387 # block-level coverage). 387 # block-level coverage).
388 'asan_coverage%': 0, 388 'asan_coverage%': 0,
389 389
390 # Enable Chromium overrides of the default configurations for various 390 # Enable Chromium overrides of the default configurations for various
391 # dynamic tools (like ASan). 391 # dynamic tools (like ASan).
392 'use_sanitizer_options%': 1, 392 'use_sanitizer_options%': 0,
393 393
394 # Enable building with SyzyAsan. 394 # Enable building with SyzyAsan.
395 # See https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo 395 # See https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo
396 'syzyasan%': 0, 396 'syzyasan%': 0,
397 397
398 # Enable building with LSan (Clang's -fsanitize=leak option). 398 # Enable building with LSan (Clang's -fsanitize=leak option).
399 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1 399 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1
400 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaks anitizer 400 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaks anitizer
401 'lsan%': 0, 401 'lsan%': 0,
402 402
(...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after
2138 'enable_service_discovery%': 1 2138 'enable_service_discovery%': 1
2139 }], 2139 }],
2140 ['clang_use_chrome_plugins==1 and OS!="win"', { 2140 ['clang_use_chrome_plugins==1 and OS!="win"', {
2141 'clang_chrome_plugins_flags': [ 2141 'clang_chrome_plugins_flags': [
2142 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' 2142 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
2143 ], 2143 ],
2144 }], 2144 }],
2145 ['asan==1 or msan==1 or lsan==1 or tsan==1', { 2145 ['asan==1 or msan==1 or lsan==1 or tsan==1', {
2146 'clang%': 1, 2146 'clang%': 1,
2147 'use_allocator%': 'none', 2147 'use_allocator%': 'none',
2148 'use_sanitizer_options%': 1,
2148 }], 2149 }],
2149 ['asan==1 and OS=="linux" and chromeos==0', { 2150 ['asan==1 and OS=="linux" and chromeos==0', {
2150 'use_custom_libcxx%': 1, 2151 'use_custom_libcxx%': 1,
2151 }], 2152 }],
2152 ['ubsan==1', { 2153 ['ubsan==1', {
2153 'clang%': 1, 2154 'clang%': 1,
2154 }], 2155 }],
2155 ['ubsan_vptr==1', { 2156 ['ubsan_vptr==1', {
2156 'clang%': 1, 2157 'clang%': 1,
2157 }], 2158 }],
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
3477 ], 3478 ],
3478 }, 3479 },
3479 }, 3480 },
3480 'conditions': [ 3481 'conditions': [
3481 ['os_posix==1', { 3482 ['os_posix==1', {
3482 'target_defaults': { 3483 'target_defaults': {
3483 'ldflags': [ 3484 'ldflags': [
3484 '-Wl,-z,now', 3485 '-Wl,-z,now',
3485 '-Wl,-z,relro', 3486 '-Wl,-z,relro',
3486 ], 3487 ],
3488 # TODO(glider): enable the default options on other systems.
3489 'conditions': [
3490 ['use_sanitizer_options==1 and ((OS=="linux" and (chromeos==0 or targe t_arch!="ia32")) or OS=="mac")', {
3491 'dependencies': [
3492 '<(DEPTH)/build/sanitizers/sanitizers.gyp:sanitizer_options',
3493 ],
3494 }],
3495 ],
3487 }, 3496 },
3488 }], 3497 }],
3489 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 3498 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
3490 ['os_posix==1 and disable_fatal_linker_warnings==0 and use_evdev_gestures==0 and (chromeos==0 or target_arch!="arm")', { 3499 ['os_posix==1 and disable_fatal_linker_warnings==0 and use_evdev_gestures==0 and (chromeos==0 or target_arch!="arm")', {
3491 'target_defaults': { 3500 'target_defaults': {
3492 'ldflags': [ 3501 'ldflags': [
3493 '-Wl,--fatal-warnings', 3502 '-Wl,--fatal-warnings',
3494 ], 3503 ],
3495 }, 3504 },
3496 }], 3505 }],
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
4092 # that some libraries aren't needed when they actually are, 4101 # that some libraries aren't needed when they actually are,
4093 # http://crbug.com/234010. As workaround, disable --as-needed. 4102 # http://crbug.com/234010. As workaround, disable --as-needed.
4094 '-Wl,--as-needed', 4103 '-Wl,--as-needed',
4095 ], 4104 ],
4096 'defines': [ 4105 'defines': [
4097 'MEMORY_TOOL_REPLACES_ALLOCATOR', 4106 'MEMORY_TOOL_REPLACES_ALLOCATOR',
4098 'MEMORY_SANITIZER_INITIAL_SIZE', 4107 'MEMORY_SANITIZER_INITIAL_SIZE',
4099 ], 4108 ],
4100 }], 4109 }],
4101 ], 4110 ],
4102 # TODO(glider): enable the default options on other systems.
4103 'conditions': [
4104 ['use_sanitizer_options==1 and OS=="linux" and (chromeos==0 or tar get_arch!="ia32")', {
4105 'dependencies': [
4106 '<(DEPTH)/build/sanitizers/sanitizers.gyp:sanitizer_options',
4107 ],
4108 }],
4109 ],
4110 }], 4111 }],
4111 ['asan==1', { 4112 ['asan==1', {
4112 'target_conditions': [ 4113 'target_conditions': [
4113 ['_toolset=="target"', { 4114 ['_toolset=="target"', {
4114 'cflags': [ 4115 'cflags': [
4115 '-fsanitize=address', 4116 '-fsanitize=address',
4116 ], 4117 ],
4117 'ldflags': [ 4118 'ldflags': [
4118 '-fsanitize=address', 4119 '-fsanitize=address',
4119 ], 4120 ],
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
5782 # settings in target dicts. SYMROOT is a special case, because many other 5783 # settings in target dicts. SYMROOT is a special case, because many other
5783 # Xcode variables depend on it, including variables such as 5784 # Xcode variables depend on it, including variables such as
5784 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 5785 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5785 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 5786 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5786 # files to appear (when present) in the UI as actual files and not red 5787 # files to appear (when present) in the UI as actual files and not red
5787 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 5788 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5788 # and therefore SYMROOT, needs to be set at the project level. 5789 # and therefore SYMROOT, needs to be set at the project level.
5789 'SYMROOT': '<(DEPTH)/xcodebuild', 5790 'SYMROOT': '<(DEPTH)/xcodebuild',
5790 }, 5791 },
5791 } 5792 }
OLDNEW
« no previous file with comments | « no previous file | build/sanitizers/sanitizer_options.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698