Index: build/common.gypi |
diff --git a/build/common.gypi b/build/common.gypi |
index 734fa135754f8c709bc8701f508820be4ed53eaa..6633ed49e945617ee18677988bd01a964757d6f8 100644 |
--- a/build/common.gypi |
+++ b/build/common.gypi |
@@ -2882,20 +2882,26 @@ |
'OTHER_CFLAGS': [ |
'-faddress-sanitizer', |
], |
- 'OTHER_LDFLAGS': [ |
- '-faddress-sanitizer', |
- # The symbols below are referenced in the ASan runtime |
- # library (compiled on OS X 10.6), but may be unavailable |
- # on the prior OS X versions. Because Chromium is currently |
- # targeting 10.5.0, we need to explicitly mark these |
- # symbols as dynamic_lookup. |
- '-Wl,-U,_malloc_default_purgeable_zone', |
- '-Wl,-U,_malloc_zone_memalign', |
- '-Wl,-U,_dispatch_sync_f', |
- '-Wl,-U,_dispatch_async_f', |
- '-Wl,-U,_dispatch_barrier_async_f', |
- '-Wl,-U,_dispatch_group_async_f', |
- '-Wl,-U,_dispatch_after_f', |
+ 'target_conditions': [ |
+ ['_type!="static_library"', { |
+ 'xcode_settings': { |
+ 'OTHER_LDFLAGS': [ |
+ '-faddress-sanitizer', |
+ # The symbols below are referenced in the ASan runtime |
+ # library (compiled on OS X 10.6), but may be unavailable |
+ # on the prior OS X versions. Because Chromium is |
+ # currently targeting 10.5.0, we need to explicitly mark |
+ # these symbols as dynamic_lookup. |
+ '-Wl,-U,_malloc_default_purgeable_zone', |
+ '-Wl,-U,_malloc_zone_memalign', |
+ '-Wl,-U,_dispatch_sync_f', |
+ '-Wl,-U,_dispatch_async_f', |
+ '-Wl,-U,_dispatch_barrier_async_f', |
+ '-Wl,-U,_dispatch_group_async_f', |
+ '-Wl,-U,_dispatch_after_f', |
Nico
2012/08/24 01:44:17
glider: Can this be removed, now that we're 10.6+
|
+ ], |
+ }, |
+ }], |
], |
}, |
'defines': [ |
@@ -2957,17 +2963,23 @@ |
], |
'target_conditions': [ |
['mac_pie==1 and release_valgrind_build==0', { |
- # Turn on position-independence (ASLR) for executables. When |
- # PIE is on for the Chrome executables, the framework will |
- # also be subject to ASLR. |
- # Don't do this when building for Valgrind, because Valgrind |
- # doesn't understand slide. TODO: Make Valgrind on Mac OS X |
- # understand slide, and get rid of the Valgrind check. |
- 'xcode_settings': { |
- 'OTHER_LDFLAGS': [ |
- '-Wl,-pie', # Position-independent executable (MH_PIE) |
- ], |
- }, |
+ 'target_conditions': [ |
+ ['_type!="static_library"', { |
+ 'xcode_settings': { |
+ # Turn on position-independence (ASLR) for executables. |
+ # When PIE is on for the Chrome executables, the |
+ # framework will also be subject to ASLR. Don't do this |
+ # when building for Valgrind, because Valgrind doesn't |
+ # understand slide. TODO: Make Valgrind on Mac OS X |
+ # understand slide, and get rid of the Valgrind check. |
+ 'xcode_settings': { |
+ 'OTHER_LDFLAGS': [ |
+ '-Wl,-pie', # Position-independent executable (MH_PIE) |
+ ], |
+ }, |
+ }, |
+ }], |
+ ], |
}], |
], |
}], |