Skip to content

Commit

Permalink
add_tablegen: Remove LLVM_ENABLE_OBJLIB
Browse files Browse the repository at this point in the history
- It doesn't work if `ALL_FILES` has `$<TARGET_OBJECTS>` with Makefile generator.
- It was a micro-optimization in the ancient age. (introduced in rGe6bc093b42ff)
  • Loading branch information
chapuni committed May 2, 2023
1 parent b73229e commit 73fbe9c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions llvm/cmake/modules/TableGen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,6 @@ macro(add_tablegen target project)
set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS})
set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen)

# CMake doesn't let compilation units depend on their dependent libraries on some generators.
if(NOT CMAKE_GENERATOR MATCHES "Ninja" AND NOT XCODE)
# FIXME: It leaks to user, callee of add_tablegen.
set(LLVM_ENABLE_OBJLIB ON)
endif()

add_llvm_executable(${target} DISABLE_LLVM_LINK_LLVM_DYLIB
${ADD_TABLEGEN_UNPARSED_ARGUMENTS})
set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS})
Expand Down

0 comments on commit 73fbe9c

Please sign in to comment.