Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion externals/llvm-project
9 changes: 9 additions & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading