diff options
author | brettw <brettw@chromium.org> | 2015-12-14 15:25:54 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-14 23:26:55 +0000 |
commit | 5e6333017764d72b4a9edefb12a5409340e9a33a (patch) | |
tree | 1f1448aac0fc1aa3f4cc371f4dc74d598aaf58bb /mojo/common | |
parent | db165b7fbe8e52fee5b3d464e94b14f51868d2c2 (diff) | |
download | chromium_src-5e6333017764d72b4a9edefb12a5409340e9a33a.zip chromium_src-5e6333017764d72b4a9edefb12a5409340e9a33a.tar.gz chromium_src-5e6333017764d72b4a9edefb12a5409340e9a33a.tar.bz2 |
Only set -rpath=$ORIGIN in component builds by default.
Statically-linked binaries do not need -rpath=$ORIGIN
set, and setting it can be a source of strange security
issues (see bug for more details).
Manually add this to some test binaries that require shared libraries to be loaded from the build directory.
R=phajdan.jr@chromium.org, thestig@chromium.org
BUG=556843
Renald of https://codereview.chromium.org/1525733002/
TBR=dpranke@chromium.org
Review URL: https://codereview.chromium.org/1525773002
Cr-Commit-Position: refs/heads/master@{#365125}
Diffstat (limited to 'mojo/common')
-rw-r--r-- | mojo/common/BUILD.gn | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mojo/common/BUILD.gn b/mojo/common/BUILD.gn index 7cbd5bf4..f2da1fc 100644 --- a/mojo/common/BUILD.gn +++ b/mojo/common/BUILD.gn @@ -97,6 +97,12 @@ test("mojo_common_unittests") { "../message_pump/message_pump_mojo_unittest.cc", "common_type_converters_unittest.cc", ] + + if (is_linux && !is_component_build) { + # This tests dynamically loads libmojo_test_support even in non-component + # builds. + configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] + } } test("mojo_common_perftests") { |