[PATCH] D130158: [llvm] [cmake] Skip driver-related code unless LLVM_TOOL_LLVM_DRIVER_BUILD
Michał Górny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 20 13:18:26 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2ac7b142b12f: [llvm] [cmake] Skip driver-related code unless LLVM_TOOL_LLVM_DRIVER_BUILD (authored by mgorny).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130158/new/
https://reviews.llvm.org/D130158
Files:
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -871,7 +871,7 @@
list(APPEND LLVM_COMMON_DEPENDS ${ARG_DEPENDS})
# Generate objlib
- if(LLVM_ENABLE_OBJLIB OR ARG_GENERATE_DRIVER)
+ if(LLVM_ENABLE_OBJLIB OR (ARG_GENERATE_DRIVER AND LLVM_TOOL_LLVM_DRIVER_BUILD))
# Generate an obj library for both targets.
set(obj_name "obj.${name}")
add_library(${obj_name} OBJECT EXCLUDE_FROM_ALL
@@ -899,13 +899,15 @@
list(APPEND ALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}-driver.cpp)
- set_property(GLOBAL APPEND PROPERTY LLVM_DRIVER_COMPONENTS ${LLVM_LINK_COMPONENTS})
- set_property(GLOBAL APPEND PROPERTY LLVM_DRIVER_DEPS ${ARG_DEPENDS} ${LLVM_COMMON_DEPENDS})
- set_property(GLOBAL APPEND PROPERTY LLVM_DRIVER_OBJLIBS "${obj_name}")
-
- set_property(GLOBAL APPEND PROPERTY LLVM_DRIVER_TOOLS ${name})
- target_link_libraries(${obj_name} ${LLVM_PTHREAD_LIB})
- llvm_config(${obj_name} ${USE_SHARED} ${LLVM_LINK_COMPONENTS} )
+ if (LLVM_TOOL_LLVM_DRIVER_BUILD)
+ set_property(GLOBAL APPEND PROPERTY LLVM_DRIVER_COMPONENTS ${LLVM_LINK_COMPONENTS})
+ set_property(GLOBAL APPEND PROPERTY LLVM_DRIVER_DEPS ${ARG_DEPENDS} ${LLVM_COMMON_DEPENDS})
+ set_property(GLOBAL APPEND PROPERTY LLVM_DRIVER_OBJLIBS "${obj_name}")
+
+ set_property(GLOBAL APPEND PROPERTY LLVM_DRIVER_TOOLS ${name})
+ target_link_libraries(${obj_name} ${LLVM_PTHREAD_LIB})
+ llvm_config(${obj_name} ${USE_SHARED} ${LLVM_LINK_COMPONENTS} )
+ endif()
endif()
endmacro()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130158.446249.patch
Type: text/x-patch
Size: 1658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220720/e567ded5/attachment.bin>
More information about the llvm-commits
mailing list