[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 May 11 05:13:29 PDT 2023


mgrzywac added inline comments.


================
Comment at: libunwind/CMakeLists.txt:159-160
+# Configure target flags
+add_compile_flags("${LIBUNWIND_ADDITIONAL_COMPILE_FLAGS}")
+add_library_flags("${LIBUNWIND_ADDITIONAL_LIBRARIES}")
+
----------------
ldionne wrote:
> Could you instead do `target_compile_options(${target} PUBLIC "${LIBUNWIND_ADDITIONAL_COMPILE_FLAGS}")` in `libunwind/src` for `unwind_static` and `unwind_shared`? And `target_link_libraries(${target} PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES}")` for the libraries part.
> 
> We're trying to move away from global functions like `add_compile_flags` and `add_library_flags`.
Sure, I moved flag and libs addition.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150252/new/

https://reviews.llvm.org/D150252



More information about the llvm-commits mailing list