OSDN Git Service

[openmp] Use config.test_extra_flags in archer and multiplex tests
authorHan Zhu <zhuhan@fb.com>
Thu, 25 Jun 2020 18:58:35 +0000 (11:58 -0700)
committerWenlei He <aktoon@gmail.com>
Thu, 25 Jun 2020 18:58:52 +0000 (11:58 -0700)
Summary:
`config.test_extra_flags` is passed in from `lit.site.cfg.in` files, but they're not used in the LIT configs. This variable can be useful for distros which don't have the standard c/c++ headers in the default search paths. Since the tests run clang on c/c++ source code, we rely on `test_extra_flags` to pass in the necessary header files.

This is a similar setup that's also done in litomptarget https://github.com/llvm/llvm-project/blob/master/openmp/libomptarget/test/lit.cfg#L42 and openmp/runtime.

Reviewers: jdoerfert, jdenny, protze.joachim

Reviewed By: jdoerfert

Subscribers: yaxunl, guansong, sstefan1, openmp-commits

Tags: #openmp

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

openmp/tools/archer/tests/lit.cfg
openmp/tools/multiplex/tests/lit.cfg

index aa8a240..ed4ec4d 100644 (file)
@@ -46,7 +46,8 @@ config.test_flags = " -I " + config.test_source_root + \
     " -I " + config.omp_header_dir + \
     " -L " + config.omp_library_dir + \
     " -Wl,-rpath," + config.omp_library_dir + \
-    " " + config.test_archer_flags
+    " " + config.test_archer_flags + \
+    " " + config.test_extra_flags
 
 config.archer_flags = "-g -O1 -fsanitize=thread"
 
index e792fc3..52c1000 100644 (file)
@@ -47,7 +47,8 @@ config.test_flags = " -I " + config.test_source_root + "/.."\
     " -L " + config.omp_library_dir + \
     " -I " + config.ompt_print_callback_dir + \
     " -Wl,-rpath," + config.omp_library_dir + \
-    " " + config.test_openmp_flags
+    " " + config.test_openmp_flags + \
+    " " + config.test_extra_flags
 
 # Allow XFAIL to work
 config.target_triple = [ ]