diff --git a/.gitmodules b/.gitmodules index 8b46098d9615..d3b5f516f86b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "externals/llvm-project"] path = externals/llvm-project - url = https://github.com/llvm/llvm-project.git + url = https://github.com/iree-org/llvm-project.git [submodule "externals/stablehlo"] path = externals/stablehlo url = https://github.com/openxla/stablehlo.git diff --git a/externals/llvm-project b/externals/llvm-project index 41f65666f637..2eb00b45cf8c 160000 --- a/externals/llvm-project +++ b/externals/llvm-project @@ -1 +1 @@ -Subproject commit 41f65666f6378bba7266be7c662c70074f04ed75 +Subproject commit 2eb00b45cf8c6db8d6dca9e93dc616e6a0b7b018 diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 2ab12d3dd6fb..dcc6af2e121f 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -117,6 +117,15 @@ add_mlir_python_common_capi_library(TorchMLIRAggregateCAPI DECLARED_SOURCES ${_source_components} ) +# On Windows, we disabled object libraries for aggregate targets (see AddMLIR.cmake patch). +# The patch makes AddMLIR.cmake use /WHOLEARCHIVE instead of object libraries on Windows. +if(WIN32) + # WINDOWS_EXPORT_ALL_SYMBOLS doesn't work without source files. + # We keep it OFF and let the empty exports.def be used. + # The /WHOLEARCHIVE linked libraries should export their symbols if they're built as SHARED. + set_target_properties(TorchMLIRAggregateCAPI PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS OFF) +endif() + add_mlir_python_modules(TorchMLIRPythonModules ROOT_PREFIX "${TORCH_MLIR_PYTHON_PACKAGES_DIR}/torch_mlir/torch_mlir" INSTALL_PREFIX "python_packages/torch_mlir/torch_mlir"