diff options
author | earthdok <earthdok@chromium.org> | 2015-03-23 14:02:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-23 21:02:52 +0000 |
commit | 3f04f1b92b7b490cd9ae9537dbc7b975ce38a572 (patch) | |
tree | ba36da2f0bb4632ef4722e86089e4eb25f394a81 /third_party/instrumented_libraries/instrumented_libraries.gyp | |
parent | aa41e91e7ef29cd6d73666e9ad930cdc88a366d6 (diff) | |
download | chromium_src-3f04f1b92b7b490cd9ae9537dbc7b975ce38a572.zip chromium_src-3f04f1b92b7b490cd9ae9537dbc7b975ce38a572.tar.gz chromium_src-3f04f1b92b7b490cd9ae9537dbc7b975ce38a572.tar.bz2 |
Re-land: Instrumented libraries: add a target for pre-built libraries.
With use_prebuilt_instrumented_libraries=1 in GYP_DEFINES, binaries are now
unpacked from archive and placed into output dir.
BUG=462636
TBR=glider@chromium.org, thakis@chromium.org
Review URL: https://codereview.chromium.org/1003273006
Cr-Commit-Position: refs/heads/master@{#321846}
Diffstat (limited to 'third_party/instrumented_libraries/instrumented_libraries.gyp')
-rw-r--r-- | third_party/instrumented_libraries/instrumented_libraries.gyp | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/third_party/instrumented_libraries/instrumented_libraries.gyp b/third_party/instrumented_libraries/instrumented_libraries.gyp index 28fa65f..2d61a3b 100644 --- a/third_party/instrumented_libraries/instrumented_libraries.gyp +++ b/third_party/instrumented_libraries/instrumented_libraries.gyp @@ -82,6 +82,57 @@ 'targets': [ { + 'target_name': 'prebuilt_instrumented_libraries', + 'type': 'none', + 'variables': { + 'prune_self_dependency': 1, + # Don't add this target to the dependencies of targets with type=none. + 'link_dependency': 1, + 'conditions': [ + ['msan==1', { + 'conditions': [ + ['msan_track_origins==2', { + 'archive_name': 'msan-chained-origins-<(_ubuntu_release)', + }, { + 'archive_name': 'UNSUPPORTED_CONFIGURATION' + }], + ]}, { + 'archive_name': 'UNSUPPORTED_CONFIGURATION' + }], + ], + }, + 'actions': [ + { + 'action_name': 'unpack_<(archive_name).tgz', + 'inputs': [ + 'binaries/<(archive_name).tgz', + ], + 'outputs': [ + '<(PRODUCT_DIR)/instrumented_libraries_prebuilt/<(archive_name).txt', + ], + 'action': [ + 'scripts/unpack_binaries.sh', + 'binaries/<(archive_name).tgz', + '<(PRODUCT_DIR)/instrumented_libraries_prebuilt/', + '<(PRODUCT_DIR)/instrumented_libraries_prebuilt/<(archive_name).txt', + ], + }, + ], + 'direct_dependent_settings': { + 'target_conditions': [ + ['_toolset=="target"', { + 'ldflags': [ + # Add a relative RPATH entry to Chromium binaries. This puts + # instrumented DSOs before system-installed versions in library + # search path. + '-Wl,-R,\$$ORIGIN/instrumented_libraries_prebuilt/<(_sanitizer_type)/<(_libdir)/', + '-Wl,-z,origin', + ], + }], + ], + }, + }, + { 'target_name': 'instrumented_libraries', 'type': 'none', 'variables': { @@ -174,7 +225,9 @@ 'target_conditions': [ ['_toolset=="target"', { 'ldflags': [ - # Add RPATH to result binary to make it linking instrumented libraries ($ORIGIN means relative RPATH) + # Add a relative RPATH entry to Chromium binaries. This puts + # instrumented DSOs before system-installed versions in library + # search path. '-Wl,-R,\$$ORIGIN/instrumented_libraries/<(_sanitizer_type)/<(_libdir)/', '-Wl,-z,origin', ], |