Index: build/common.gypi |
=================================================================== |
--- build/common.gypi (revision 231560) |
+++ build/common.gypi (working copy) |
@@ -309,6 +309,9 @@ |
# See http://clang.llvm.org/docs/MemorySanitizer.html |
'msan%': 0, |
+ # Enable use pre-built instrumented system libs by sanitizer instead of standard libs |
Alexander Potapenko
2013/10/29 13:36:11
Please make sure you stay below the 80-column limi
Alexander Potapenko
2013/10/29 13:36:11
How about "Use the libraries instrumented by one o
alextaran1
2013/10/30 11:16:29
Thanks, that's much better
alextaran1
2013/10/30 11:16:29
There are too many lines in common.gypi which have
|
+ 'use_instrumented_libraries%': 0, |
+ |
# Use a modified version of Clang to intercept allocated types and sizes |
# for allocated objects. clang_type_profiler=1 implies clang=1. |
# See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier |
@@ -840,6 +843,7 @@ |
'msan%': '<(msan)', |
'tsan%': '<(tsan)', |
'tsan_blacklist%': '<(tsan_blacklist)', |
+ 'use_instrumented_libraries%': '<(use_instrumented_libraries)', |
'clang_type_profiler%': '<(clang_type_profiler)', |
'order_profiling%': '<(order_profiling)', |
'order_text_section%': '<(order_text_section)', |
@@ -3366,6 +3370,23 @@ |
}], |
], |
}], |
+ ['use_instrumented_libraries==1', { |
+ 'dependencies': [ |
+ '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries', |
+ ], |
+ 'conditions': [ |
+ ['asan==1', { |
+ 'target_conditions': [ |
+ ['_toolset=="target"', { |
+ 'ldflags': [ |
+ '-Wl,-R,\\$$ORIGIN/instrumented_libraries/asan/lib/:\\$$ORIGIN/instrumented_libraries/asan/usr/lib/x86_64-linux-gnu/', |
Alexander Potapenko
2013/10/29 13:36:11
Pls add a comment for these flags.
alextaran1
2013/10/30 11:16:29
Done.
|
+ '-Wl,-z,origin', |
+ ], |
+ }], |
+ ], |
+ }], |
+ ], |
+ }], |
['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', { |
'target_conditions' : [ |
['_toolset=="target"', { |