hanchenye-llvm-project/compiler-rt/test/xray
Xing Xue 865a39d328 Add libc++ to link XRay test cases if libc++ is used to build CLANG
Summary: When libc++ is used to build CLANG, its XRay libraries libclang_rt.xray-*.a have dependencies on libc++. Therefore, libc++ is needed to link and run XRay test cases. For Linux -rpath is also needed to specify where to load libc++. This change sets macro LLVM_LIBCXX_USED to 1 if libc++ is actually used in the build. XRay tests then check the flag and add -L<llvm_shlib_dir> -lc++ and -Wl,-rpath=<llvm_shlib_dir> if needed.

Reviewers: hubert.reinterpretcast, amyk, dberris, jasonliu, sfertile, EricWF

Subscribers: dberris, mgorny, jsji, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61016

llvm-svn: 360060
2019-05-06 17:45:21 +00:00
..
TestCases/Posix Add header <atomic> which is needed to compile with some older library versions. 2018-11-21 08:54:40 +00:00
Unit [XRay] Add LD_LIBRARY_PATH to env variables for Unit Tests 2018-09-27 23:15:05 +00:00
CMakeLists.txt
lit.cfg Add libc++ to link XRay test cases if libc++ is used to build CLANG 2019-05-06 17:45:21 +00:00
lit.site.cfg.in