@@ -132,9 +132,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL MSVC)
132132else ()
133133 target_compile_options (unwind_shared_objects PRIVATE -fno-rtti)
134134endif ()
135- target_link_libraries (unwind_shared_objects PRIVATE unwind-headers ${LIBUNWIND_LIBRARIES} )
136135target_compile_options (unwind_shared_objects PUBLIC "${LIBUNWIND_ADDITIONAL_COMPILE_FLAGS} " )
137- target_link_libraries (unwind_shared_objects PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES} " )
136+ target_link_libraries (unwind_shared_objects
137+ PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES} "
138+ PRIVATE unwind-headers runtimes-libc-headers ${LIBUNWIND_LIBRARIES} )
138139set_target_properties (unwind_shared_objects
139140 PROPERTIES
140141 CXX_EXTENSIONS OFF
@@ -147,7 +148,7 @@ if (CMAKE_POSITION_INDEPENDENT_CODE OR NOT DEFINED CMAKE_POSITION_INDEPENDENT_CO
147148endif ()
148149
149150add_library (unwind_shared SHARED)
150- target_link_libraries (unwind_shared PUBLIC unwind_shared_objects)
151+ target_link_libraries (unwind_shared PUBLIC unwind_shared_objects runtimes-libc-shared )
151152set_target_properties (unwind_shared
152153 PROPERTIES
153154 EXCLUDE_FROM_ALL "$<IF:$<BOOL:${LIBUNWIND_ENABLE_SHARED} >,FALSE,TRUE>"
@@ -173,9 +174,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL MSVC)
173174else ()
174175 target_compile_options (unwind_static_objects PRIVATE -fno-rtti)
175176endif ()
176- target_link_libraries (unwind_static_objects PRIVATE unwind-headers ${LIBUNWIND_LIBRARIES} )
177177target_compile_options (unwind_static_objects PUBLIC "${LIBUNWIND_ADDITIONAL_COMPILE_FLAGS} " )
178- target_link_libraries (unwind_static_objects PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES} " )
178+ target_link_libraries (unwind_static_objects
179+ PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES} "
180+ PRIVATE unwind-headers runtimes-libc-headers ${LIBUNWIND_LIBRARIES} )
179181set_target_properties (unwind_static_objects
180182 PROPERTIES
181183 CXX_EXTENSIONS OFF
@@ -194,7 +196,7 @@ if(LIBUNWIND_HIDE_SYMBOLS)
194196endif ()
195197
196198add_library (unwind_static STATIC )
197- target_link_libraries (unwind_static PUBLIC unwind_static_objects)
199+ target_link_libraries (unwind_static PUBLIC unwind_static_objects runtimes-libc- static )
198200set_target_properties (unwind_static
199201 PROPERTIES
200202 EXCLUDE_FROM_ALL "$<IF:$<BOOL:${LIBUNWIND_ENABLE_STATIC} >,FALSE,TRUE>"
0 commit comments