Chromium Code Reviews| Index: build/standalone.gypi |
| diff --git a/build/standalone.gypi b/build/standalone.gypi |
| index 8bafda91d13e1c0be964602ac7e480b3ce051e7e..38b2b65875987889ef031fb0e85adcf6e26e3cc4 100644 |
| --- a/build/standalone.gypi |
| +++ b/build/standalone.gypi |
| @@ -288,69 +288,99 @@ |
| ], |
| }, |
| 'conditions': [ |
| - ['asan==1 and OS!="mac"', { |
| + ['OS!="mac"', { |
|
earthdok
2015/05/22 19:57:25
Following common.gypi, you should probably change
Michael Achenbach
2015/05/26 08:26:35
Done. But I'm not convinced that our posix variabl
earthdok
2015/05/26 13:36:54
Try flipping the values this variable receives. My
Michael Achenbach
2015/05/26 14:20:29
Indeed.
|
| 'target_defaults': { |
| - 'cflags_cc+': [ |
| - '-fno-omit-frame-pointer', |
| - '-gline-tables-only', |
| - '-fsanitize=address', |
| - '-w', # http://crbug.com/162783 |
| - ], |
| - 'cflags!': [ |
| - '-fomit-frame-pointer', |
| - ], |
| - 'ldflags': [ |
| - '-fsanitize=address', |
| - ], |
| - }, |
| - }], |
| - ['tsan==1 and OS!="mac"', { |
| - 'target_defaults': { |
| - 'cflags+': [ |
| - '-fno-omit-frame-pointer', |
| - '-gline-tables-only', |
| - '-fsanitize=thread', |
| - '-fPIC', |
| - '-Wno-c++11-extensions', |
| - ], |
| - 'cflags!': [ |
| - '-fomit-frame-pointer', |
| - ], |
| - 'ldflags': [ |
| - '-fsanitize=thread', |
| - '-pie', |
| - ], |
| - 'defines': [ |
| - 'THREAD_SANITIZER', |
| - ], |
| - }, |
| - }], |
| - ['msan==1 and OS!="mac"', { |
| - 'target_defaults': { |
| - 'cflags_cc+': [ |
| - '-fno-omit-frame-pointer', |
| - '-gline-tables-only', |
| - '-fsanitize=memory', |
| - '-fsanitize-memory-track-origins=<(msan_track_origins)', |
| - '-fPIC', |
| - ], |
| - 'cflags+': [ |
| - '-fPIC', |
| - ], |
| - 'cflags!': [ |
| - '-fomit-frame-pointer', |
| - ], |
| - 'ldflags': [ |
| - '-fsanitize=memory', |
| - ], |
| - 'defines': [ |
| - 'MEMORY_SANITIZER', |
| - ], |
| - 'dependencies': [ |
| - # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of |
| - # stdlibc++ as standard library. This is intended to use for instrumented |
| - # builds. |
| - '<(DEPTH)/buildtools/third_party/libc++/libc++.gyp:libcxx_proxy', |
| + 'conditions': [ |
| + # Common options for AddressSanitizer, LeakSanitizer, |
| + # ThreadSanitizer and MemorySanitizer. |
| + ['asan==1 or lsan==1 or tsan==1 or msan==1', { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'cflags': [ |
| + '-fno-omit-frame-pointer', |
| + '-gline-tables-only', |
| + ], |
| + 'cflags!': [ |
| + '-fomit-frame-pointer', |
| + ], |
| + 'ldflags!': [ |
| + # Functions interposed by the sanitizers can make ld think |
| + # that some libraries aren't needed when they actually are, |
| + # http://crbug.com/234010. As workaround, disable --as-needed. |
| + '-Wl,--as-needed', |
|
earthdok
2015/05/22 19:57:25
Do not add this unless the problem manifests in st
Michael Achenbach
2015/05/26 08:26:35
Done.
|
| + ], |
| + }], |
|
earthdok
2015/05/22 19:57:25
Need to define the ADDRESS_SANITIZER symbol here,
Michael Achenbach
2015/05/26 08:26:35
Done. See above. Btw: codesearch links get outdate
earthdok
2015/05/26 13:36:54
It's not referenced in V8 code, so no. It would no
Michael Achenbach
2015/05/26 14:20:29
I'd add it as soon as someone wants to reference i
|
| + ], |
| + }], |
| + ['asan==1', { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'cflags': [ |
| + '-fsanitize=address', |
| + # TODO(earthdok): Re-enable. http://crbug.com/427202 |
|
earthdok
2015/05/22 19:57:25
The referenced issue does not affect standalone V8
Michael Achenbach
2015/05/26 08:26:35
Removing these TODOs for now.
|
| + #'-fsanitize-blacklist=<(asan_blacklist)', |
| + ], |
| + 'ldflags': [ |
| + '-fsanitize=address', |
| + ], |
| + }], |
| + ], |
| + }], |
| + # TODO(machenbach): Add sanitizer coverage. |
| + ['lsan==1', { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'cflags': [ |
| + '-fsanitize=leak', |
| + ], |
| + 'ldflags': [ |
| + '-fsanitize=leak', |
| + ], |
| + }], |
|
earthdok
2015/05/22 19:57:25
define LEAK_SANITIZER?
Michael Achenbach
2015/05/26 08:26:35
Done.
|
| + ], |
| + }], |
| + ['tsan==1', { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'cflags': [ |
| + '-fsanitize=thread', |
| + # TODO(machenbach): Implement this for v8. |
| + # '-fsanitize-blacklist=<(tsan_blacklist)', |
| + ], |
| + 'ldflags': [ |
| + '-fsanitize=thread', |
| + ], |
| + 'defines': [ |
| + 'THREAD_SANITIZER', |
| + ], |
| + }], |
| + ], |
| + }], |
| + ['msan==1', { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'cflags': [ |
| + '-fsanitize=memory', |
| + '-fsanitize-memory-track-origins=<(msan_track_origins)', |
| + # TODO(machenbach): Implement this for v8. |
| + # '-fsanitize-blacklist=<(msan_blacklist)', |
| + ], |
| + 'ldflags': [ |
| + '-fsanitize=memory', |
| + ], |
| + 'defines': [ |
| + 'MEMORY_SANITIZER', |
| + ], |
| + }], |
| + ], |
| + # Share this between all *san configs with like in common.gypi. |
| + 'dependencies': [ |
| + # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of |
|
earthdok
2015/05/22 19:57:25
Those pathnames are no longer correct after the mo
Michael Achenbach
2015/05/26 08:26:35
Done.
|
| + # stdlibc++ as standard library. This is intended to use for instrumented |
|
earthdok
2015/05/22 19:57:25
Please fix: "intended to be used for".
Michael Achenbach
2015/05/26 08:26:35
Done.
|
| + # builds. |
| + '<(DEPTH)/buildtools/third_party/libc++/libc++.gyp:libcxx_proxy', |
| + ], |
| + }], |
| ], |
| }, |
| }], |