File tree Expand file tree Collapse file tree 3 files changed +4
-15
lines changed Expand file tree Collapse file tree 3 files changed +4
-15
lines changed Original file line number Diff line number Diff line change 11[submodule "externals/llvm-project "]
22 path = externals/llvm-project
3- url = https://github.com/llvm /llvm-project.git
3+ url = https://github.com/iree-org /llvm-project.git
44[submodule "externals/stablehlo "]
55 path = externals/stablehlo
66 url = https://github.com/openxla/stablehlo.git
Original file line number Diff line number Diff line change @@ -109,15 +109,6 @@ if(TORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS)
109109 list (APPEND _source_components TorchMLIRPythonTorchExtensionsSources)
110110endif ()
111111
112- # On Windows, aggregate libraries using object files cause CMake to generate corrupted
113- # paths in the linker response file. Work around this by temporarily setting XCODE to TRUE,
114- # which makes add_mlir_library use -force_load instead of object libraries. We'll convert
115- # -force_load to /WHOLEARCHIVE after the target is created.
116- if (WIN32 )
117- set (_original_xcode_value ${XCODE} )
118- set (XCODE TRUE )
119- endif ()
120-
121112add_mlir_python_common_capi_library(TorchMLIRAggregateCAPI
122113 INSTALL_COMPONENT TorchMLIRPythonModules
123114 INSTALL_DESTINATION python_packages/torch_mlir/torch_mlir/_mlir_libs
@@ -126,11 +117,9 @@ add_mlir_python_common_capi_library(TorchMLIRAggregateCAPI
126117 DECLARED_SOURCES ${_source_components}
127118)
128119
129- # Restore XCODE variable and convert -force_load flags to /WHOLEARCHIVE
120+ # On Windows, MLIR's add_mlir_library (patched above) uses -force_load flags instead of
121+ # object libraries to avoid linker path corruption. Convert these to MSVC's /WHOLEARCHIVE.
130122if (WIN32 )
131- set (XCODE ${_original_xcode_value} )
132-
133- # Get the link libraries which now contain -force_load flags
134123 get_target_property (_link_libs TorchMLIRAggregateCAPI LINK_LIBRARIES )
135124 if (_link_libs)
136125 set (_new_link_libs "" )
You can’t perform that action at this time.
0 commit comments