Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion mlir/examples/standalone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,7 @@ if(MLIR_ENABLE_BINDINGS_PYTHON)
endif()
add_subdirectory(test)
add_subdirectory(standalone-opt)
add_subdirectory(standalone-plugin)
if(NOT WIN32)
add_subdirectory(standalone-plugin)
endif()
add_subdirectory(standalone-translate)
4 changes: 4 additions & 0 deletions mlir/examples/standalone/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ declare_mlir_python_extension(StandalonePythonSources.Pybind11Extension
ADD_TO_PARENT StandalonePythonSources
SOURCES
StandaloneExtensionPybind11.cpp
PRIVATE_LINK_LIBS
LLVMSupport
EMBED_CAPI_LINK_LIBS
StandaloneCAPI
PYTHON_BINDINGS_LIBRARY pybind11
Expand All @@ -36,6 +38,8 @@ declare_mlir_python_extension(StandalonePythonSources.NanobindExtension
ADD_TO_PARENT StandalonePythonSources
SOURCES
StandaloneExtensionNanobind.cpp
PRIVATE_LINK_LIBS
LLVMSupport
EMBED_CAPI_LINK_LIBS
StandaloneCAPI
PYTHON_BINDINGS_LIBRARY nanobind
Expand Down
4 changes: 3 additions & 1 deletion mlir/examples/standalone/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ set(STANDALONE_TEST_DEPENDS
standalone-capi-test
standalone-opt
standalone-translate
StandalonePlugin
)
if(NOT WIN32)
list(APPEND STANDALONE_TEST_DEPENDS StandalonePlugin)
endif()
if(MLIR_ENABLE_BINDINGS_PYTHON)
list(APPEND STANDALONE_TEST_DEPENDS StandalonePythonModules)
endif()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// UNSUPPORTED: system-windows
// RUN: mlir-opt %s --load-pass-plugin=%standalone_libs/StandalonePlugin%shlibext --pass-pipeline="builtin.module(standalone-switch-bar-foo)" | FileCheck %s

module {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// UNSUPPORTED: system-windows
// RUN: mlir-opt %s --load-dialect-plugin=%standalone_libs/StandalonePlugin%shlibext --pass-pipeline="builtin.module(standalone-switch-bar-foo)" | FileCheck %s

module {
Expand Down
1 change: 1 addition & 0 deletions mlir/test/Examples/standalone/lit.local.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ config.substitutions.append(("%host_cc", config.host_cc))
config.substitutions.append(("%enable_libcxx", config.enable_libcxx))
config.substitutions.append(("%mlir_cmake_dir", config.mlir_cmake_dir))
config.substitutions.append(("%llvm_use_linker", config.llvm_use_linker))
config.substitutions.append(("%cmake_build_type", config.cmake_build_type))
3 changes: 2 additions & 1 deletion mlir/test/Examples/standalone/test.toy
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# RUN: "%cmake_exe" "%mlir_src_root/examples/standalone" -G "%cmake_generator" \
# RUN: -DCMAKE_BUILD_TYPE=%cmake_build_type \
# RUN: -DCMAKE_CXX_COMPILER=%host_cxx -DCMAKE_C_COMPILER=%host_cc \
# RUN: -DLLVM_ENABLE_LIBCXX=%enable_libcxx -DMLIR_DIR=%mlir_cmake_dir \
# RUN: -DLLVM_USE_LINKER=%llvm_use_linker \
Expand All @@ -11,4 +12,4 @@
# if any fail.
# CHECK: Passed
# CHECK-NOT: Failed
# UNSUPPORTED: target={{.*(windows|android).*}}
# UNSUPPORTED: target={{.*(android).*}}
1 change: 1 addition & 0 deletions mlir/test/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ config.host_cxx = "@HOST_CXX@"
config.enable_libcxx = "@LLVM_ENABLE_LIBCXX@"
config.host_cmake = "@CMAKE_COMMAND@"
config.host_cmake_generator = "@CMAKE_GENERATOR@"
config.cmake_build_type = "@CMAKE_BUILD_TYPE@"
config.llvm_use_linker = "@LLVM_USE_LINKER@"
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
config.host_arch = "@HOST_ARCH@"
Expand Down