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

Unified Diff: gyp/common_conditions.gypi

Issue 1512853005: Make skia_sanitizer work on Macs too. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gyp/common_conditions.gypi
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index 5fb45f6c4e0829e1c32bc0006c15fc78670e7c31..8221c94680a645a68b91927d83276065b042fb69 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -434,18 +434,14 @@
}],
# Enable asan, tsan, etc.
[ 'skia_sanitizer', {
+ 'cflags_cc!': [ '-fno-rtti' ], # vptr needs rtti
'cflags': [
'-fsanitize=<(skia_sanitizer)', # Turn on sanitizers.
'-fno-sanitize-recover=<(skia_sanitizer)', # Make any failure fatal.
'-fsanitize-blacklist=<(skia_sanitizer_blacklist)', # Compile in our blacklist.
'-include <(skia_sanitizer_blacklist)', # Make every .cpp depend on it.
],
- 'cflags_cc!': [
- '-fno-rtti'
- ],
- 'ldflags': [
- '-fsanitize=<(skia_sanitizer)',
- ],
+ 'ldflags': [ '-fsanitize=<(skia_sanitizer)' ],
'conditions' : [
[ 'skia_sanitizer == "thread"', {
'defines': [ 'THREAD_SANITIZER' ],
@@ -507,6 +503,21 @@
}, {
'MACOSX_DEPLOYMENT_TARGET': '<(skia_osx_deployment_target)',
}],
+ [ 'skia_sanitizer', {
+ 'GCC_ENABLE_CPP_RTTI': 'YES', # vptr needs rtti
+ 'OTHER_CFLAGS': [
+ '-fsanitize=<(skia_sanitizer)', # Turn on sanitizers.
+ '-fno-sanitize-recover=<(skia_sanitizer)', # Make any failure fatal.
+ '-fsanitize-blacklist=<(skia_sanitizer_blacklist)', # Compile in our blacklist.
+ '-include <(skia_sanitizer_blacklist)', # Make every .cpp depend on it.
+ ],
+ # We want to pass -fsanitize=... to our final link call,
+ # but not to libtool. OTHER_LDFLAGS is passed to both.
Nico 2016/05/13 17:06:02 ...or you could check if _type is not static_libra
+ # To trick GYP into doing what we want, we'll piggyback on
+ # LIBRARY_SEARCH_PATHS, producing "-L/usr/lib -fsanitize=...".
+ # The -L/usr/lib is redundant but innocuous: it's a default path.
+ 'LIBRARY_SEARCH_PATHS': [ '/usr/lib -fsanitize=<(skia_sanitizer)'],
+ }],
],
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
« 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