diff options
Diffstat (limited to 'test/fuzzer/lit.cfg')
-rw-r--r-- | test/fuzzer/lit.cfg | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/fuzzer/lit.cfg b/test/fuzzer/lit.cfg index 19be31d1a..8a1d3eeb9 100644 --- a/test/fuzzer/lit.cfg +++ b/test/fuzzer/lit.cfg @@ -7,6 +7,8 @@ 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") @@ -51,8 +53,13 @@ config.substitutions.append(('%libfuzzer_src', libfuzzer_src_root)) def generate_compiler_cmd(is_cpp=True, fuzzer_enabled=True): compiler_cmd = config.c_compiler - link_cmd = '-lc++' if any(x in config.target_triple for x in ('darwin', 'freebsd')) else '-lstdc++' - std_cmd = '-std=c++11' if is_cpp else '' + if config.clang and config.stdlib == 'libc++': + link_cmd = '-stdlib=libc++' + elif config.clang and config.stdlib == 'static-libc++': + link_cmd = '-stdlib=libc++ -lc++abi -static-libstdc++' + 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 '' sanitizers = ['address'] if fuzzer_enabled: sanitizers.append('fuzzer') |