summaryrefslogtreecommitdiff
path: root/test/xray
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2018-02-16 04:20:33 +0000
committerKamil Rytarowski <n54@gmx.com>2018-02-16 04:20:33 +0000
commitf43b9b62ed1ede91e2cf3795b0e6445266fb7c39 (patch)
treec92a5e104ee881eeb072bd2257540530ba078e1f /test/xray
parent6a42ba835460b192ab6ff9f44c9560567f0d1356 (diff)
Reintroduce FreeBSD support in test/xray
Tested by Douglas Yung. The original patch from D43278 has been reverted. New patch by myself. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325315 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/xray')
-rw-r--r--test/xray/lit.cfg11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/xray/lit.cfg b/test/xray/lit.cfg
index d5e40975d..a84aa76f1 100644
--- a/test/xray/lit.cfg
+++ b/test/xray/lit.cfg
@@ -20,6 +20,11 @@ def build_invocation(compile_flags):
llvm_xray = os.path.join(config.llvm_tools_dir, 'llvm-xray')
# Setup substitutions.
+if config.host_os == "Linux":
+ libdl_flag = "-ldl"
+else:
+ libdl_flag = ""
+
config.substitutions.append(
('%clang ', build_invocation([config.target_cflags])))
config.substitutions.append(
@@ -33,14 +38,14 @@ config.substitutions.append(
('%llvm_xray', llvm_xray))
config.substitutions.append(
('%xraylib',
- ('-lm -lpthread -ldl -lrt -L%s '
+ ('-lm -lpthread %s -lrt -L%s '
'-Wl,-whole-archive -lclang_rt.xray-%s -Wl,-no-whole-archive')
- % (config.compiler_rt_libdir, config.host_arch)))
+ % (libdl_flag, config.compiler_rt_libdir, config.host_arch)))
# Default test suffixes.
config.suffixes = ['.c', '.cc', '.cpp']
-if config.host_os not in ['Linux']:
+if config.host_os not in ['FreeBSD', 'Linux']:
config.unsupported = True
elif '64' not in config.host_arch:
if 'arm' in config.host_arch: