[CMake] Remove LLVM link code (#134940)

This handling is not needed no recent LLVM APIs.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/134940
Approved by: https://github.com/ezyang, https://github.com/malfet
This commit is contained in:
cyy
2025-10-08 18:39:16 +00:00
committed by PyTorch MergeBot
parent 91b9484264
commit fdc622b513
3 changed files with 0 additions and 14 deletions

View File

@ -904,15 +904,6 @@ if(USE_LLVM AND LLVM_FOUND)
support core analysis executionengine instcombine
scalaropts transformutils ${LLVM_TARGETS_TO_BUILD} orcjit)
target_link_libraries(torch_cpu PRIVATE ${LLVM_LINK_LIBS})
if(APPLE)
set(LINKER_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/unexported_symbols.lds")
set_target_properties(torch_cpu PROPERTIES LINK_DEPENDS ${LINKER_SCRIPT})
set_target_properties(torch_cpu PROPERTIES LINK_FLAGS "-Wl,-unexported_symbols_list,${LINKER_SCRIPT}")
elseif(UNIX)
set(LINKER_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/version_script.lds")
set_target_properties(torch_cpu PROPERTIES LINK_DEPENDS ${LINKER_SCRIPT})
target_link_libraries(torch_cpu PRIVATE "-Wl,--version-script=${LINKER_SCRIPT}")
endif()
endif(USE_LLVM AND LLVM_FOUND)
# This is required for older versions of CMake, which don't allow

View File

@ -1 +0,0 @@
*4llvm*

View File

@ -1,4 +0,0 @@
pytorch {
local:
*4llvm*;
};