diff options
Diffstat (limited to 'openmp/runtime/test/lit.cfg')
-rw-r--r-- | openmp/runtime/test/lit.cfg | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg index c356f768b5c..7f18da4b1b7 100644 --- a/openmp/runtime/test/lit.cfg +++ b/openmp/runtime/test/lit.cfg @@ -48,6 +48,11 @@ config.test_cflags = config.test_openmp_flag + \ " -L " + config.library_dir + \ " " + config.test_extra_cflags +# extra libraries +libs = "" +if config.has_libm: + libs += " -lm" + # Allow XFAIL to work config.target_triple = [ ] if re.search('gcc', config.test_compiler) is not None: @@ -92,7 +97,7 @@ if config.has_ompt: config.substitutions.append(("%libomp-compile-and-run", \ "%libomp-compile && %libomp-run")) config.substitutions.append(("%libomp-compile", \ - "%clang %cflags %s -o %t -lm")) + "%clang %cflags %s -o %t" + libs)) config.substitutions.append(("%libomp-run", "%t")) config.substitutions.append(("%clang", config.test_compiler)) config.substitutions.append(("%openmp_flag", config.test_openmp_flag)) |