summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/fuzzer/lit.cfg
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-03-07 18:14:09 +0000
committerPetr Hosek <phosek@chromium.org>2018-03-07 18:14:09 +0000
commit2d19f9036e67bc1a9ff3811953906a6b42cbd8d6 (patch)
tree693826765d3a81679468708ab1664a0d6cf15fd0 /compiler-rt/test/fuzzer/lit.cfg
parent69f3347b561a963b0f2d164cf143af63c030cf97 (diff)
downloadbcm5719-llvm-2d19f9036e67bc1a9ff3811953906a6b42cbd8d6.tar.gz
bcm5719-llvm-2d19f9036e67bc1a9ff3811953906a6b42cbd8d6.zip
[Fuzzer] Avoid the unnecessary rebuild of the custom libc++
This changes the add_custom_libcxx macro to resemble the llvm_ExternalProject_Add. The primary motivation is to avoid unnecessary libFuzzer rebuilds that are being done on every Ninja/Make invocation. The libc++ should be only rebuilt whenever the libc++ source itself changes. Differential Revision: https://reviews.llvm.org/D43213 llvm-svn: 326921
Diffstat (limited to 'compiler-rt/test/fuzzer/lit.cfg')
-rw-r--r--compiler-rt/test/fuzzer/lit.cfg6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler-rt/test/fuzzer/lit.cfg b/compiler-rt/test/fuzzer/lit.cfg
index 8a1d3eeb928..0789cbc9135 100644
--- a/compiler-rt/test/fuzzer/lit.cfg
+++ b/compiler-rt/test/fuzzer/lit.cfg
@@ -7,8 +7,6 @@ config.test_format = lit.formats.ShTest(True)
config.suffixes = ['.test']
config.test_source_root = os.path.dirname(__file__)
-config.environment['LD_LIBRARY_PATH'] = config.llvm_library_dir
-
# Choose between lit's internal shell pipeline runner and a real shell. If
# LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
@@ -54,9 +52,9 @@ config.substitutions.append(('%libfuzzer_src', libfuzzer_src_root))
def generate_compiler_cmd(is_cpp=True, fuzzer_enabled=True):
compiler_cmd = config.c_compiler
if config.clang and config.stdlib == 'libc++':
- link_cmd = '-stdlib=libc++'
+ link_cmd = '-stdlib=libc++ -Wl,-rpath=%s' % config.llvm_library_dir
elif config.clang and config.stdlib == 'static-libc++':
- link_cmd = '-stdlib=libc++ -lc++abi -static-libstdc++'
+ link_cmd = '-stdlib=libc++ -lc++abi -static-libstdc++ -Wl,-rpath=%s' % config.llvm_library_dir
else:
link_cmd = '-lc++' if any(x in config.target_triple for x in ('darwin', 'freebsd')) else '-lstdc++'
std_cmd = '--driver-mode=g++ -std=c++11' if is_cpp else ''
OpenPOWER on IntegriCloud