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

Side by Side Diff: build/common.gypi

Issue 594843002: Reland https://codereview.chromium.org/581983003/: Enable ASan default options on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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') | ui/base/ui_base_tests.gyp » ('J')
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 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
2133 'enable_service_discovery%': 1 2133 'enable_service_discovery%': 1
2134 }], 2134 }],
2135 ['clang_use_chrome_plugins==1 and OS!="win"', { 2135 ['clang_use_chrome_plugins==1 and OS!="win"', {
2136 'clang_chrome_plugins_flags': [ 2136 'clang_chrome_plugins_flags': [
2137 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' 2137 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
2138 ], 2138 ],
2139 }], 2139 }],
2140 ['asan==1 or msan==1 or lsan==1 or tsan==1', { 2140 ['asan==1 or msan==1 or lsan==1 or tsan==1', {
2141 'clang%': 1, 2141 'clang%': 1,
2142 'use_allocator%': 'none', 2142 'use_allocator%': 'none',
2143 'use_sanitizer_options%': 1,
2143 }], 2144 }],
2144 ['asan==1 and OS=="linux" and chromeos==0', { 2145 ['asan==1 and OS=="linux" and chromeos==0', {
2145 'use_custom_libcxx%': 1, 2146 'use_custom_libcxx%': 1,
2146 }], 2147 }],
2147 ['ubsan==1', { 2148 ['ubsan==1', {
2148 'clang%': 1, 2149 'clang%': 1,
2149 }], 2150 }],
2150 ['ubsan_vptr==1', { 2151 ['ubsan_vptr==1', {
2151 'clang%': 1, 2152 'clang%': 1,
2152 }], 2153 }],
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after
3473 ], 3474 ],
3474 }, 3475 },
3475 }, 3476 },
3476 'conditions': [ 3477 'conditions': [
3477 ['os_posix==1', { 3478 ['os_posix==1', {
3478 'target_defaults': { 3479 'target_defaults': {
3479 'ldflags': [ 3480 'ldflags': [
3480 '-Wl,-z,now', 3481 '-Wl,-z,now',
3481 '-Wl,-z,relro', 3482 '-Wl,-z,relro',
3482 ], 3483 ],
3484 # TODO(glider): enable the default options on other systems.
3485 'conditions': [
3486 ['use_sanitizer_options==1 and ((OS=="linux" and (chromeos==0 or targe t_arch!="ia32")) or OS=="mac")', {
3487 'dependencies': [
3488 '<(DEPTH)/build/sanitizers/sanitizers.gyp:sanitizer_options',
3489 ],
3490 }],
3491 ],
3483 }, 3492 },
3484 }], 3493 }],
3485 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 3494 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
3486 ['os_posix==1 and disable_fatal_linker_warnings==0 and use_evdev_gestures==0 and (chromeos==0 or target_arch!="arm")', { 3495 ['os_posix==1 and disable_fatal_linker_warnings==0 and use_evdev_gestures==0 and (chromeos==0 or target_arch!="arm")', {
3487 'target_defaults': { 3496 'target_defaults': {
3488 'ldflags': [ 3497 'ldflags': [
3489 '-Wl,--fatal-warnings', 3498 '-Wl,--fatal-warnings',
3490 ], 3499 ],
3491 }, 3500 },
3492 }], 3501 }],
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
4089 # that some libraries aren't needed when they actually are, 4098 # that some libraries aren't needed when they actually are,
4090 # http://crbug.com/234010. As workaround, disable --as-needed. 4099 # http://crbug.com/234010. As workaround, disable --as-needed.
4091 '-Wl,--as-needed', 4100 '-Wl,--as-needed',
4092 ], 4101 ],
4093 'defines': [ 4102 'defines': [
4094 'MEMORY_TOOL_REPLACES_ALLOCATOR', 4103 'MEMORY_TOOL_REPLACES_ALLOCATOR',
4095 'MEMORY_SANITIZER_INITIAL_SIZE', 4104 'MEMORY_SANITIZER_INITIAL_SIZE',
4096 ], 4105 ],
4097 }], 4106 }],
4098 ], 4107 ],
4099 # TODO(glider): enable the default options on other systems.
4100 'conditions': [
4101 ['use_sanitizer_options==1 and OS=="linux" and (chromeos==0 or tar get_arch!="ia32")', {
4102 'dependencies': [
4103 '<(DEPTH)/build/sanitizers/sanitizers.gyp:sanitizer_options',
4104 ],
4105 }],
4106 ],
4107 }], 4108 }],
4108 ['asan==1', { 4109 ['asan==1', {
4109 'target_conditions': [ 4110 'target_conditions': [
4110 ['_toolset=="target"', { 4111 ['_toolset=="target"', {
4111 'cflags': [ 4112 'cflags': [
4112 '-fsanitize=address', 4113 '-fsanitize=address',
4113 ], 4114 ],
4114 'ldflags': [ 4115 'ldflags': [
4115 '-fsanitize=address', 4116 '-fsanitize=address',
4116 ], 4117 ],
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
5779 # settings in target dicts. SYMROOT is a special case, because many other 5780 # settings in target dicts. SYMROOT is a special case, because many other
5780 # Xcode variables depend on it, including variables such as 5781 # Xcode variables depend on it, including variables such as
5781 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 5782 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5782 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 5783 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5783 # files to appear (when present) in the UI as actual files and not red 5784 # files to appear (when present) in the UI as actual files and not red
5784 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 5785 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5785 # and therefore SYMROOT, needs to be set at the project level. 5786 # and therefore SYMROOT, needs to be set at the project level.
5786 'SYMROOT': '<(DEPTH)/xcodebuild', 5787 'SYMROOT': '<(DEPTH)/xcodebuild',
5787 }, 5788 },
5788 } 5789 }
OLDNEW
« no previous file with comments | « no previous file | build/sanitizers/sanitizer_options.cc » ('j') | ui/base/ui_base_tests.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698