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

Side by Side Diff: build/common.gypi

Issue 23684013: Allow ASan to instrument globals on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 3253 matching lines...) Expand 10 before | Expand all | Expand 10 after
3264 '-w', # http://crbug.com/162783 3264 '-w', # http://crbug.com/162783
3265 ], 3265 ],
3266 'ldflags': [ 3266 'ldflags': [
3267 '-fsanitize=address', 3267 '-fsanitize=address',
3268 ], 3268 ],
3269 'defines': [ 3269 'defines': [
3270 'ADDRESS_SANITIZER', 3270 'ADDRESS_SANITIZER',
3271 ], 3271 ],
3272 }], 3272 }],
3273 ], 3273 ],
3274 'conditions': [
3275 ['OS=="mac"', {
3276 'cflags': [
3277 '-mllvm -asan-globals=0', # http://crbug.com/196561
3278 ],
3279 }],
3280 ],
3281 }], 3274 }],
3282 ['lsan==1', { 3275 ['lsan==1', {
3283 'target_conditions': [ 3276 'target_conditions': [
3284 ['_toolset=="target"', { 3277 ['_toolset=="target"', {
3285 'cflags': [ 3278 'cflags': [
3286 '-fsanitize=leak', 3279 '-fsanitize=leak',
3287 ], 3280 ],
3288 'ldflags': [ 3281 'ldflags': [
3289 '-fsanitize=leak', 3282 '-fsanitize=leak',
3290 ], 3283 ],
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
3620 ], 3613 ],
3621 }], 3614 }],
3622 ], 3615 ],
3623 }], 3616 }],
3624 ['asan==1', { 3617 ['asan==1', {
3625 'cflags': [ 3618 'cflags': [
3626 # Android build relies on -Wl,--gc-sections removing 3619 # Android build relies on -Wl,--gc-sections removing
3627 # unreachable code. ASan instrumentation for globals inhibits 3620 # unreachable code. ASan instrumentation for globals inhibits
3628 # this and results in a library with unresolvable relocations. 3621 # this and results in a library with unresolvable relocations.
3629 # TODO(eugenis): find a way to reenable this. 3622 # TODO(eugenis): find a way to reenable this.
3630 '-mllvm -asan-globals=0', 3623 '-mllvm -asan-globals=0',
Nico 2013/09/03 15:27:01 This is a different bug and is still needed, right
Alexander Potapenko 2013/09/03 16:21:43 Right.
3631 ], 3624 ],
3632 }], 3625 }],
3633 ['android_webview_build==0', { 3626 ['android_webview_build==0', {
3634 'defines': [ 3627 'defines': [
3635 # The NDK has these things, but doesn't define the constants 3628 # The NDK has these things, but doesn't define the constants
3636 # to say that it does. Define them here instead. 3629 # to say that it does. Define them here instead.
3637 'HAVE_SYS_UIO_H', 3630 'HAVE_SYS_UIO_H',
3638 ], 3631 ],
3639 'cflags': [ 3632 'cflags': [
3640 '--sysroot=<(android_ndk_sysroot)', 3633 '--sysroot=<(android_ndk_sysroot)',
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
3921 'conditions': [ 3914 'conditions': [
3922 ['clang==1', { 3915 ['clang==1', {
3923 'variables': { 3916 'variables': {
3924 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', 3917 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3925 }, 3918 },
3926 }], 3919 }],
3927 ['asan==1', { 3920 ['asan==1', {
3928 'xcode_settings': { 3921 'xcode_settings': {
3929 'OTHER_CFLAGS': [ 3922 'OTHER_CFLAGS': [
3930 '-fsanitize=address', 3923 '-fsanitize=address',
3931 '-mllvm -asan-globals=0', # http://crbug.com/196561
3932 '-w', # http://crbug.com/162783 3924 '-w', # http://crbug.com/162783
3933 ], 3925 ],
3934 }, 3926 },
3935 'defines': [ 3927 'defines': [
3936 'ADDRESS_SANITIZER', 3928 'ADDRESS_SANITIZER',
3937 'MEMORY_TOOL_REPLACES_ALLOCATOR', 3929 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3938 ], 3930 ],
3939 }], 3931 }],
3940 ], 3932 ],
3941 'target_conditions': [ 3933 'target_conditions': [
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
4700 # settings in target dicts. SYMROOT is a special case, because many other 4692 # settings in target dicts. SYMROOT is a special case, because many other
4701 # Xcode variables depend on it, including variables such as 4693 # Xcode variables depend on it, including variables such as
4702 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 4694 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4703 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 4695 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4704 # files to appear (when present) in the UI as actual files and not red 4696 # files to appear (when present) in the UI as actual files and not red
4705 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 4697 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4706 # and therefore SYMROOT, needs to be set at the project level. 4698 # and therefore SYMROOT, needs to be set at the project level.
4707 'SYMROOT': '<(DEPTH)/xcodebuild', 4699 'SYMROOT': '<(DEPTH)/xcodebuild',
4708 }, 4700 },
4709 } 4701 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698