Skip to content

Commit 6774f06

Browse files
committed
[mlir][python] Support CLANG_CL
1 parent 6e3631d commit 6774f06

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mlir/cmake/modules/AddMLIR.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ function(add_mlir_aggregate name)
584584
# TODO: Should be transitive.
585585
set_target_properties(${name} PROPERTIES
586586
MLIR_AGGREGATE_EXCLUDE_LIBS "${_embed_libs}")
587-
if(MSVC)
587+
if(WIN32)
588588
set_property(TARGET ${name} PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS ON)
589589
endif()
590590

mlir/cmake/modules/AddMLIRPython.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ function(add_mlir_python_common_capi_library name)
512512
)
513513
add_dependencies(${name} ${_header_sources_target})
514514

515-
if(MSVC)
515+
if(WIN32)
516516
set_property(TARGET ${name} PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS ON)
517517
endif()
518518
set_target_properties(${name} PROPERTIES
@@ -680,7 +680,7 @@ function(add_mlir_python_extension libname extname)
680680
set(eh_rtti_enable)
681681
if (MSVC)
682682
set(eh_rtti_enable /EHsc /GR)
683-
elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE)
683+
elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL)
684684
set(eh_rtti_enable -frtti -fexceptions)
685685
endif ()
686686
target_compile_options(${libname} PRIVATE ${eh_rtti_enable})

0 commit comments

Comments
 (0)