diff options
| author | Petr Hosek <phosek@chromium.org> | 2018-03-07 18:14:09 +0000 |
|---|---|---|
| committer | Petr Hosek <phosek@chromium.org> | 2018-03-07 18:14:09 +0000 |
| commit | 2d19f9036e67bc1a9ff3811953906a6b42cbd8d6 (patch) | |
| tree | 693826765d3a81679468708ab1664a0d6cf15fd0 /compiler-rt/test | |
| parent | 69f3347b561a963b0f2d164cf143af63c030cf97 (diff) | |
| download | bcm5719-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')
| -rw-r--r-- | compiler-rt/test/fuzzer/lit.cfg | 6 | ||||
| -rw-r--r-- | compiler-rt/test/tsan/lit.cfg | 2 |
2 files changed, 3 insertions, 5 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 '' diff --git a/compiler-rt/test/tsan/lit.cfg b/compiler-rt/test/tsan/lit.cfg index fdd3559bac5..0128d958bd0 100644 --- a/compiler-rt/test/tsan/lit.cfg +++ b/compiler-rt/test/tsan/lit.cfg @@ -56,7 +56,7 @@ clang_tsan_cxxflags = config.cxx_mode_flags + clang_tsan_cflags + ["-std=c++11"] if config.has_libcxx and config.host_os != 'Darwin': # FIXME: Dehardcode this path somehow. libcxx_path = os.path.join(config.compiler_rt_obj_root, "lib", - "tsan", "libcxx_tsan_" + config.target_arch) + "tsan", "libcxx_tsan_%s" % config.target_arch) libcxx_incdir = os.path.join(libcxx_path, "include", "c++", "v1") libcxx_libdir = os.path.join(libcxx_path, "lib") libcxx_so = os.path.join(libcxx_libdir, "libc++.so") |

