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

Side by Side Diff: build/common.gypi

Issue 8702003: ASan Mac + cleanup: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 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 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after
1914 '<(clang_chrome_plugins_flags)', 1914 '<(clang_chrome_plugins_flags)',
1915 ], 1915 ],
1916 }], 1916 }],
1917 ['clang==1 and clang_load!="" and clang_add_plugin!=""', { 1917 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
1918 'cflags': [ 1918 'cflags': [
1919 '-Xclang', '-load', '-Xclang', '<(clang_load)', 1919 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1920 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', 1920 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1921 ], 1921 ],
1922 }], 1922 }],
1923 ['asan==1', { 1923 ['asan==1', {
1924 # Only in the linux section for now, since ASAN doesn't
1925 # work on Mac yet.
1926 # TODO(glider): -fasan is deprecated. Remove it when we stop using 1924 # TODO(glider): -fasan is deprecated. Remove it when we stop using
1927 # it. 1925 # it.
1928 'cflags': [ 1926 'cflags': [
1929 '-fasan', 1927 '-fasan',
1930 '-faddress-sanitizer', 1928 '-faddress-sanitizer',
1931 '-w', 1929 '-w',
1932 '-DADDRESS_SANITIZER',
1933 ], 1930 ],
1934 'ldflags': [ 1931 'ldflags': [
1935 '-fasan', 1932 '-fasan',
1936 '-faddress-sanitizer', 1933 '-faddress-sanitizer',
1937 ], 1934 ],
1935 'defines': [
1936 'ADDRESS_SANITIZER',
1937 ],
1938 }], 1938 }],
1939 ['no_strict_aliasing==1', { 1939 ['no_strict_aliasing==1', {
1940 'cflags': [ 1940 'cflags': [
1941 '-fno-strict-aliasing', 1941 '-fno-strict-aliasing',
1942 ], 1942 ],
1943 }], 1943 }],
1944 ['linux_breakpad==1', { 1944 ['linux_breakpad==1', {
1945 'cflags': [ '-g' ], 1945 'cflags': [ '-g' ],
1946 'defines': ['USE_LINUX_BREAKPAD'], 1946 'defines': ['USE_LINUX_BREAKPAD'],
1947 }], 1947 }],
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
2271 ], 2271 ],
2272 }], 2272 }],
2273 ], 2273 ],
2274 }, 2274 },
2275 'conditions': [ 2275 'conditions': [
2276 ['clang==1', { 2276 ['clang==1', {
2277 'variables': { 2277 'variables': {
2278 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', 2278 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2279 }, 2279 },
2280 }], 2280 }],
2281 ['asan==1', {
2282 'xcode_settings': {
2283 'OTHER_CFLAGS': [
2284 '-fasan',
2285 '-faddress-sanitizer',
2286 '-w',
2287 ],
2288 'OTHER_LDFLAGS': [
2289 '-fasan',
2290 '-faddress-sanitizer',
2291 # The symbols below are referenced in the ASan runtime
2292 # library (compiled on OS X 10.6), but may be unavailable
2293 # on the prior OS X versions. Because Chromium is currently
2294 # targeting 10.5.0, we need to explicitly mark these
2295 # symbols as dynamic_lookup.
2296 '-Wl,-U,_malloc_default_purgeable_zone',
2297 '-Wl,-U,_malloc_zone_memalign',
2298 '-Wl,-U,_dispatch_sync_f',
2299 '-Wl,-U,_dispatch_async_f',
2300 '-Wl,-U,_dispatch_barrier_async_f',
2301 '-Wl,-U,_dispatch_group_async_f',
2302 '-Wl,-U,_dispatch_after_f',
2303 ],
2304 },
2305 'defines': [
2306 'ADDRESS_SANITIZER',
2307 ],
2308 }],
2281 ], 2309 ],
2282 'target_conditions': [ 2310 'target_conditions': [
2283 ['_type!="static_library"', { 2311 ['_type!="static_library"', {
2284 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, 2312 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2285 }], 2313 }],
2286 ['_mac_bundle', { 2314 ['_mac_bundle', {
2287 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, 2315 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
2288 }], 2316 }],
2289 ['_type=="executable"', { 2317 ['_type=="executable"', {
2290 'postbuilds': [ 2318 'postbuilds': [
(...skipping 30 matching lines...) Expand all
2321 ], 2349 ],
2322 }, 2350 },
2323 ], 2351 ],
2324 'conditions': [ 2352 'conditions': [
2325 ['asan==1', { 2353 ['asan==1', {
2326 'variables': { 2354 'variables': {
2327 'asan_saves_file': 'asan.saves', 2355 'asan_saves_file': 'asan.saves',
2328 }, 2356 },
2329 'xcode_settings': { 2357 'xcode_settings': {
2330 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)', 2358 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
2331 'OTHER_CFLAGS': [
2332 '-fasan',
2333 '-faddress-sanitizer',
2334 '-w',
2335 ],
2336 'OTHER_LDFLAGS': [
2337 '-fasan',
2338 '-faddress-sanitizer',
2339 # The symbols below are referenced in the ASan runtime
2340 # library (compiled on OS X 10.6), but may be unavailable
2341 # on the prior OS X versions. Because Chromium is currently
2342 # targeting 10.5.0, we need to explicitly mark these
2343 # symbols as dynamic_lookup.
2344 '-Wl,-U,_malloc_default_purgeable_zone',
2345 '-Wl,-U,_malloc_zone_memalign',
2346 '-Wl,-U,_dispatch_sync_f',
2347 '-Wl,-U,_dispatch_async_f',
2348 '-Wl,-U,_dispatch_barrier_async_f',
2349 '-Wl,-U,_dispatch_group_async_f',
2350 '-Wl,-U,_dispatch_after_f',
2351
2352 ],
2353 }, 2359 },
2354 'defines': [
2355 'ADDRESS_SANITIZER',
2356 ],
2357 }], 2360 }],
2358 ], 2361 ],
2359 'target_conditions': [ 2362 'target_conditions': [
2360 ['mac_pie==1 and release_valgrind_build==0', { 2363 ['mac_pie==1 and release_valgrind_build==0', {
2361 # Turn on position-independence (ASLR) for executables. When 2364 # Turn on position-independence (ASLR) for executables. When
2362 # PIE is on for the Chrome executables, the framework will 2365 # PIE is on for the Chrome executables, the framework will
2363 # also be subject to ASLR. 2366 # also be subject to ASLR.
2364 # Don't do this when building for Valgrind, because Valgrind 2367 # Don't do this when building for Valgrind, because Valgrind
2365 # doesn't understand slide. TODO: Make Valgrind on Mac OS X 2368 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2366 # understand slide, and get rid of the Valgrind check. 2369 # understand slide, and get rid of the Valgrind check.
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
2644 # settings in target dicts. SYMROOT is a special case, because many other 2647 # settings in target dicts. SYMROOT is a special case, because many other
2645 # Xcode variables depend on it, including variables such as 2648 # Xcode variables depend on it, including variables such as
2646 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 2649 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2647 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 2650 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2648 # files to appear (when present) in the UI as actual files and not red 2651 # files to appear (when present) in the UI as actual files and not red
2649 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 2652 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2650 # and therefore SYMROOT, needs to be set at the project level. 2653 # and therefore SYMROOT, needs to be set at the project level.
2651 'SYMROOT': '<(DEPTH)/xcodebuild', 2654 'SYMROOT': '<(DEPTH)/xcodebuild',
2652 }, 2655 },
2653 } 2656 }
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