summaryrefslogtreecommitdiff
path: root/test/lit.common.configured.in
diff options
context:
space:
mode:
authorXing Xue <xingxue@outlook.com>2019-05-06 17:45:21 +0000
committerXing Xue <xingxue@outlook.com>2019-05-06 17:45:21 +0000
commit098ca93185735ec3687106d0967a70fc99a85059 (patch)
treef5ed5db8cb5d237a073ea00c4d4cd63153a16a6c /test/lit.common.configured.in
parentec028cc90fc0a71f293d1fe42be6a3d0f0760117 (diff)
downloadcompiler-rt-098ca93185735ec3687106d0967a70fc99a85059.tar.gz
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@360060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.common.configured.in')
-rw-r--r--test/lit.common.configured.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/lit.common.configured.in b/test/lit.common.configured.in
index d43597b06..3514760d0 100644
--- a/test/lit.common.configured.in
+++ b/test/lit.common.configured.in
@@ -49,6 +49,7 @@ else:
set_default("target_suffix", "-%s" % config.target_arch)
set_default("have_zlib", "@HAVE_LIBZ@")
+set_default("libcxx_used", "@LLVM_LIBCXX_USED@")
# LLVM tools dir can be passed in lit parameters, so try to
# apply substitution.