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

Side by Side Diff: build/common.gypi

Issue 16844006: Add new define MEMORY_TOOL_REPLACES_ALLOCATOR for when building for ASAN, valgrind, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update for review. Created 7 years, 6 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 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 ], 2050 ],
2051 }], 2051 }],
2052 ['asan==1 and OS=="win"', { 2052 ['asan==1 and OS=="win"', {
2053 # Since asan on windows uses Syzygy, we need /PROFILE turned on to 2053 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
2054 # produce appropriate pdbs. 2054 # produce appropriate pdbs.
2055 'msvs_settings': { 2055 'msvs_settings': {
2056 'VCLinkerTool': { 2056 'VCLinkerTool': {
2057 'Profile': 'true', 2057 'Profile': 'true',
2058 }, 2058 },
2059 }, 2059 },
2060 'defines': ['ADDRESS_SANITIZER'], 2060 'defines': [
2061 'ADDRESS_SANITIZER'
2062 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2063 ],
2061 }], # asan==1 and OS=="win" 2064 }], # asan==1 and OS=="win"
2062 ['coverage!=0', { 2065 ['coverage!=0', {
2063 'conditions': [ 2066 'conditions': [
2064 ['OS=="mac" or OS=="ios"', { 2067 ['OS=="mac" or OS=="ios"', {
2065 'xcode_settings': { 2068 'xcode_settings': {
2066 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs 2069 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
2067 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage 2070 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
2068 }, 2071 },
2069 }], 2072 }],
2070 ['OS=="mac"', { 2073 ['OS=="mac"', {
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
2572 ['msvs_use_common_release', { 2575 ['msvs_use_common_release', {
2573 'includes': ['release.gypi'], 2576 'includes': ['release.gypi'],
2574 }], 2577 }],
2575 ['release_valgrind_build==0 and tsan==0', { 2578 ['release_valgrind_build==0 and tsan==0', {
2576 'defines': [ 2579 'defines': [
2577 'NVALGRIND', 2580 'NVALGRIND',
2578 'DYNAMIC_ANNOTATIONS_ENABLED=0', 2581 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2579 ], 2582 ],
2580 }, { 2583 }, {
2581 'defines': [ 2584 'defines': [
2585 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2582 'DYNAMIC_ANNOTATIONS_ENABLED=1', 2586 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2583 'WTF_USE_DYNAMIC_ANNOTATIONS=1', 2587 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2584 ], 2588 ],
2585 }], 2589 }],
2586 ['win_use_allocator_shim==0', { 2590 ['win_use_allocator_shim==0', {
2587 'defines': ['NO_TCMALLOC'], 2591 'defines': ['NO_TCMALLOC'],
2588 }], 2592 }],
2589 ['os_posix==1 and chromium_code==1', { 2593 ['os_posix==1 and chromium_code==1', {
2590 # Non-chromium code is not guaranteed to compile cleanly 2594 # Non-chromium code is not guaranteed to compile cleanly
2591 # with _FORTIFY_SOURCE. Also, fortified build may fail 2595 # with _FORTIFY_SOURCE. Also, fortified build may fail
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
3133 'cflags': [ 3137 'cflags': [
3134 '-fno-omit-frame-pointer', 3138 '-fno-omit-frame-pointer',
3135 '-gline-tables-only', 3139 '-gline-tables-only',
3136 ], 3140 ],
3137 'ldflags!': [ 3141 'ldflags!': [
3138 # Functions interposed by the sanitizers can make ld think 3142 # Functions interposed by the sanitizers can make ld think
3139 # that some libraries aren't needed when they actually are, 3143 # that some libraries aren't needed when they actually are,
3140 # http://crbug.com/234010. As workaround, disable --as-needed. 3144 # http://crbug.com/234010. As workaround, disable --as-needed.
3141 '-Wl,--as-needed', 3145 '-Wl,--as-needed',
3142 ], 3146 ],
3147 'defines': [
3148 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3149 ],
3143 }], 3150 }],
3144 ['_toolset=="target" and OS=="linux"', { 3151 ['_toolset=="target" and OS=="linux"', {
3145 'ldflags': [ 3152 'ldflags': [
3146 # http://crbug.com/234010. 3153 # http://crbug.com/234010.
3147 '-lrt', 3154 '-lrt',
3148 ], 3155 ],
3149 }], 3156 }],
3150 ], 3157 ],
3151 }], 3158 }],
3152 ['asan==1', { 3159 ['asan==1', {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
3247 # Workaround for linker OOM. 3254 # Workaround for linker OOM.
3248 '-Wl,--no-keep-memory', 3255 '-Wl,--no-keep-memory',
3249 ], 3256 ],
3250 }], 3257 }],
3251 ], 3258 ],
3252 }], 3259 }],
3253 ], 3260 ],
3254 }], 3261 }],
3255 ['linux_use_heapchecker==1', { 3262 ['linux_use_heapchecker==1', {
3256 'variables': {'linux_use_tcmalloc%': 1}, 3263 'variables': {'linux_use_tcmalloc%': 1},
3257 'defines': ['USE_HEAPCHECKER'], 3264 'defines': [
3265 'USE_HEAPCHECKER'
3266 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3267 ],
3258 'conditions': [ 3268 'conditions': [
3259 ['component=="shared_library"', { 3269 ['component=="shared_library"', {
3260 # See crbug.com/112389 3270 # See crbug.com/112389
3261 # TODO(glider): replace with --dynamic-list or something 3271 # TODO(glider): replace with --dynamic-list or something
3262 'ldflags': ['-rdynamic'], 3272 'ldflags': ['-rdynamic'],
3263 }], 3273 }],
3264 ], 3274 ],
3265 }], 3275 }],
3266 ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', { 3276 ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', {
3267 'defines': ['NO_TCMALLOC'], 3277 'defines': ['NO_TCMALLOC'],
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
3794 ['asan==1', { 3804 ['asan==1', {
3795 'xcode_settings': { 3805 'xcode_settings': {
3796 'OTHER_CFLAGS': [ 3806 'OTHER_CFLAGS': [
3797 '-fsanitize=address', 3807 '-fsanitize=address',
3798 '-mllvm -asan-globals=0', # http://crbug.com/196561 3808 '-mllvm -asan-globals=0', # http://crbug.com/196561
3799 '-w', # http://crbug.com/162783 3809 '-w', # http://crbug.com/162783
3800 ], 3810 ],
3801 }, 3811 },
3802 'defines': [ 3812 'defines': [
3803 'ADDRESS_SANITIZER', 3813 'ADDRESS_SANITIZER',
3814 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3804 ], 3815 ],
3805 }], 3816 }],
3806 ], 3817 ],
3807 'target_conditions': [ 3818 'target_conditions': [
3808 ['_type!="static_library"', { 3819 ['_type!="static_library"', {
3809 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, 3820 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
3810 'conditions': [ 3821 'conditions': [
3811 ['asan==1', { 3822 ['asan==1', {
3812 'xcode_settings': { 3823 'xcode_settings': {
3813 'OTHER_LDFLAGS': [ 3824 'OTHER_LDFLAGS': [
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
4522 # settings in target dicts. SYMROOT is a special case, because many other 4533 # settings in target dicts. SYMROOT is a special case, because many other
4523 # Xcode variables depend on it, including variables such as 4534 # Xcode variables depend on it, including variables such as
4524 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 4535 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4525 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 4536 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4526 # files to appear (when present) in the UI as actual files and not red 4537 # files to appear (when present) in the UI as actual files and not red
4527 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 4538 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4528 # and therefore SYMROOT, needs to be set at the project level. 4539 # and therefore SYMROOT, needs to be set at the project level.
4529 'SYMROOT': '<(DEPTH)/xcodebuild', 4540 'SYMROOT': '<(DEPTH)/xcodebuild',
4530 }, 4541 },
4531 } 4542 }
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