[PATCH] D150252: [libunwind][CMake] Add cached compile and link flags to libunwind
Maciej Grzywacz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 00:44:45 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9e37142dc12a: [libunwind] Add cached compile and link flags to libunwind (authored by mgrzywac).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150252/new/
https://reviews.llvm.org/D150252
Files:
libunwind/CMakeLists.txt
libunwind/src/CMakeLists.txt
Index: libunwind/src/CMakeLists.txt
===================================================================
--- libunwind/src/CMakeLists.txt
+++ libunwind/src/CMakeLists.txt
@@ -132,6 +132,8 @@
target_compile_options(unwind_shared_objects PRIVATE -fno-rtti)
endif()
target_link_libraries(unwind_shared_objects PRIVATE unwind-headers ${LIBUNWIND_LIBRARIES})
+target_compile_options(unwind_shared_objects PUBLIC "${LIBUNWIND_ADDITIONAL_COMPILE_FLAGS}")
+target_link_libraries(unwind_shared_objects PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES}")
set_target_properties(unwind_shared_objects
PROPERTIES
CXX_EXTENSIONS OFF
@@ -170,6 +172,8 @@
target_compile_options(unwind_static_objects PRIVATE -fno-rtti)
endif()
target_link_libraries(unwind_static_objects PRIVATE unwind-headers ${LIBUNWIND_LIBRARIES})
+target_compile_options(unwind_static_objects PUBLIC "${LIBUNWIND_ADDITIONAL_COMPILE_FLAGS}")
+target_link_libraries(unwind_static_objects PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES}")
set_target_properties(unwind_static_objects
PROPERTIES
CXX_EXTENSIONS OFF
Index: libunwind/CMakeLists.txt
===================================================================
--- libunwind/CMakeLists.txt
+++ libunwind/CMakeLists.txt
@@ -143,6 +143,10 @@
set(LIBUNWIND_CXX_FLAGS "")
set(LIBUNWIND_COMPILE_FLAGS "")
set(LIBUNWIND_LINK_FLAGS "")
+set(LIBUNWIND_ADDITIONAL_COMPILE_FLAGS "" CACHE STRING
+ "Additional Compile only flags which can be provided in cache")
+set(LIBUNWIND_ADDITIONAL_LIBRARIES "" CACHE STRING
+ "Additional libraries libunwind is linked to which can be provided in cache")
# Include macros for adding and removing libunwind flags.
include(HandleLibunwindFlags)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150252.535661.patch
Type: text/x-patch
Size: 1701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230629/f0cd91c1/attachment.bin>
More information about the llvm-commits
mailing list