summaryrefslogtreecommitdiff
path: root/test/fuzzer/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/fuzzer/lit.cfg')
-rw-r--r--test/fuzzer/lit.cfg6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/fuzzer/lit.cfg b/test/fuzzer/lit.cfg
index 8a1d3eeb9..0789cbc91 100644
--- a/test/fuzzer/lit.cfg
+++ b/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 ''