@@ -160,9 +160,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL MSVC)
160160else ()
161161 target_compile_options (unwind_shared_objects PRIVATE -fno-rtti)
162162endif ()
163- target_link_libraries (unwind_shared_objects PRIVATE unwind-headers ${LIBUNWIND_LIBRARIES} )
164163target_compile_options (unwind_shared_objects PUBLIC "${LIBUNWIND_ADDITIONAL_COMPILE_FLAGS} " )
165- target_link_libraries (unwind_shared_objects PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES} " )
164+ target_link_libraries (unwind_shared_objects
165+ PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES} "
166+ PRIVATE unwind-headers runtimes-libc-headers ${LIBUNWIND_LIBRARIES} )
166167set_target_properties (unwind_shared_objects
167168 PROPERTIES
168169 CXX_EXTENSIONS OFF
@@ -175,7 +176,7 @@ if (CMAKE_POSITION_INDEPENDENT_CODE OR NOT DEFINED CMAKE_POSITION_INDEPENDENT_CO
175176endif ()
176177
177178add_library (unwind_shared SHARED)
178- target_link_libraries (unwind_shared PUBLIC unwind_shared_objects)
179+ target_link_libraries (unwind_shared PUBLIC unwind_shared_objects runtimes-libc-shared )
179180set_target_properties (unwind_shared
180181 PROPERTIES
181182 EXCLUDE_FROM_ALL "$<IF:$<BOOL:${LIBUNWIND_ENABLE_SHARED} >,FALSE,TRUE>"
@@ -201,9 +202,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL MSVC)
201202else ()
202203 target_compile_options (unwind_static_objects PRIVATE -fno-rtti)
203204endif ()
204- target_link_libraries (unwind_static_objects PRIVATE unwind-headers ${LIBUNWIND_LIBRARIES} )
205205target_compile_options (unwind_static_objects PUBLIC "${LIBUNWIND_ADDITIONAL_COMPILE_FLAGS} " )
206- target_link_libraries (unwind_static_objects PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES} " )
206+ target_link_libraries (unwind_static_objects
207+ PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES} "
208+ PRIVATE unwind-headers runtimes-libc-headers ${LIBUNWIND_LIBRARIES} )
207209set_target_properties (unwind_static_objects
208210 PROPERTIES
209211 CXX_EXTENSIONS OFF
@@ -222,7 +224,7 @@ if(LIBUNWIND_HIDE_SYMBOLS)
222224endif ()
223225
224226add_library (unwind_static STATIC )
225- target_link_libraries (unwind_static PUBLIC unwind_static_objects)
227+ target_link_libraries (unwind_static PUBLIC unwind_static_objects runtimes-libc- static )
226228set_target_properties (unwind_static
227229 PROPERTIES
228230 EXCLUDE_FROM_ALL "$<IF:$<BOOL:${LIBUNWIND_ENABLE_STATIC} >,FALSE,TRUE>"
0 commit comments