[Mlir-commits] [mlir] e94e557 - Forward the `LLVM_ENABLE_LIBCXX` CMake parameter to the mlir standalone test
Mehdi Amini
llvmlistbot at llvm.org
Sun Mar 7 21:08:22 PST 2021
Author: Mehdi Amini
Date: 2021-03-08T05:07:26Z
New Revision: e94e55712c0adb49adcd14c1839e9e30a8e2e6f1
URL: https://github.com/llvm/llvm-project/commit/e94e55712c0adb49adcd14c1839e9e30a8e2e6f1
DIFF: https://github.com/llvm/llvm-project/commit/e94e55712c0adb49adcd14c1839e9e30a8e2e6f1.diff
LOG: Forward the `LLVM_ENABLE_LIBCXX` CMake parameter to the mlir standalone test
This allows to build and test MLIR with `-DLLVM_ENABLE_LIBCXX=ON`.
Added:
Modified:
mlir/examples/standalone/test/lit.site.cfg.py.in
mlir/test/Examples/standalone/lit.local.cfg
mlir/test/Examples/standalone/test.toy
mlir/test/lit.site.cfg.py.in
Removed:
################################################################################
diff --git a/mlir/examples/standalone/test/lit.site.cfg.py.in b/mlir/examples/standalone/test/lit.site.cfg.py.in
index 669bea910e65..26fb8aab87f6 100644
--- a/mlir/examples/standalone/test/lit.site.cfg.py.in
+++ b/mlir/examples/standalone/test/lit.site.cfg.py.in
@@ -23,6 +23,7 @@ config.llvm_bindings = "@LLVM_BINDINGS@".split(' ')
config.host_os = "@HOST_OS@"
config.host_cc = "@HOST_CC@"
config.host_cxx = "@HOST_CXX@"
+config.enable_libcxx = "@LLVM_ENABLE_LIBCXX@"
# Note: ldflags can contain double-quoted paths, so must use single quotes here.
config.host_ldflags = '@HOST_LDFLAGS@'
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
diff --git a/mlir/test/Examples/standalone/lit.local.cfg b/mlir/test/Examples/standalone/lit.local.cfg
index 481b809a0e48..1744d782781b 100644
--- a/mlir/test/Examples/standalone/lit.local.cfg
+++ b/mlir/test/Examples/standalone/lit.local.cfg
@@ -1,3 +1,4 @@
config.substitutions.append(("%cmake", config.host_cmake))
config.substitutions.append(("%host_cxx", config.host_cxx))
config.substitutions.append(("%host_cc", config.host_cc))
+config.substitutions.append(("%enable_libcxx", config.enable_libcxx))
diff --git a/mlir/test/Examples/standalone/test.toy b/mlir/test/Examples/standalone/test.toy
index 7b4a9c23906e..0f9d0cce042d 100644
--- a/mlir/test/Examples/standalone/test.toy
+++ b/mlir/test/Examples/standalone/test.toy
@@ -1,4 +1,4 @@
-# RUN: %cmake %mlir_src_root/examples/standalone -DCMAKE_CXX_COMPILER=%host_cxx -DCMAKE_C_COMPILER=%host_cc -DMLIR_DIR=%llvm_lib_dir/cmake/mlir ; %cmake --build . --target check-standalone | tee %t | FileCheck %s
+# RUN: %cmake %mlir_src_root/examples/standalone -DCMAKE_CXX_COMPILER=%host_cxx -DCMAKE_C_COMPILER=%host_cc -DLLVM_ENABLE_LIBCXX=%enable_libcxx -DMLIR_DIR=%llvm_lib_dir/cmake/mlir ; %cmake --build . --target check-standalone | tee %t | FileCheck %s
# CHECK: Passed: 3
# UNSUPPORTED: windows, android
diff --git a/mlir/test/lit.site.cfg.py.in b/mlir/test/lit.site.cfg.py.in
index c34e7e4ce62e..1d98d94d4b8f 100644
--- a/mlir/test/lit.site.cfg.py.in
+++ b/mlir/test/lit.site.cfg.py.in
@@ -23,6 +23,7 @@ config.llvm_bindings = "@LLVM_BINDINGS@".split(' ')
config.host_os = "@HOST_OS@"
config.host_cc = "@HOST_CC@"
config.host_cxx = "@HOST_CXX@"
+config.enable_libcxx = "@LLVM_ENABLE_LIBCXX@"
config.host_cmake = "@CMAKE_COMMAND@"
# Note: ldflags can contain double-quoted paths, so must use single quotes here.
config.host_ldflags = '@HOST_LDFLAGS@'
More information about the Mlir-commits
mailing list