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

Unified Diff: build/common.gypi

Issue 50423003: Adds a flag "use_instrumented_libraries" and corresponding target with 2 simple libs (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 2 months 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
Index: build/common.gypi
===================================================================
--- build/common.gypi (revision 231560)
+++ build/common.gypi (working copy)
@@ -309,6 +309,10 @@
# See http://clang.llvm.org/docs/MemorySanitizer.html
'msan%': 0,
+ # Use the dynamic libraries instrumented by one of the sanitizers
+ # instead of the standard system libraries.
+ '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 +844,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 +3371,24 @@
}],
],
}],
+ ['use_instrumented_libraries==1', {
+ 'dependencies': [
Nico 2013/10/30 14:47:02 Why do you always need this but the rpath bit only
alextaran1 2013/10/30 16:08:54 We are going to have different instrumentation typ
+ '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries',
+ ],
+ 'conditions': [
+ ['asan==1', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'ldflags': [
+ # Add RPATH to result binary to make it linking instrumented libraries ($ORIGIN means relative RPATH)
+ '-Wl,-R,\\$$ORIGIN/instrumented_libraries/asan/lib/:\\$$ORIGIN/instrumented_libraries/asan/usr/lib/x86_64-linux-gnu/',
Nico 2013/10/30 14:47:02 Just one backslash in front of $ is enough (and co
alextaran1 2013/10/30 16:08:54 Done.
+ '-Wl,-z,origin',
+ ],
+ }],
+ ],
+ }],
+ ],
+ }],
['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
'target_conditions' : [
['_toolset=="target"', {

Powered by Google App Engine
This is Rietveld 408576698