@@ -160,9 +160,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL MSVC)
160
160
else ()
161
161
target_compile_options (unwind_shared_objects PRIVATE -fno-rtti)
162
162
endif ()
163
- target_link_libraries (unwind_shared_objects PRIVATE unwind-headers ${LIBUNWIND_LIBRARIES} )
164
163
target_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} )
166
167
set_target_properties (unwind_shared_objects
167
168
PROPERTIES
168
169
CXX_EXTENSIONS OFF
@@ -175,7 +176,7 @@ if (CMAKE_POSITION_INDEPENDENT_CODE OR NOT DEFINED CMAKE_POSITION_INDEPENDENT_CO
175
176
endif ()
176
177
177
178
add_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 )
179
180
set_target_properties (unwind_shared
180
181
PROPERTIES
181
182
EXCLUDE_FROM_ALL "$<IF:$<BOOL:${LIBUNWIND_ENABLE_SHARED} >,FALSE,TRUE>"
@@ -201,9 +202,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL MSVC)
201
202
else ()
202
203
target_compile_options (unwind_static_objects PRIVATE -fno-rtti)
203
204
endif ()
204
- target_link_libraries (unwind_static_objects PRIVATE unwind-headers ${LIBUNWIND_LIBRARIES} )
205
205
target_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} )
207
209
set_target_properties (unwind_static_objects
208
210
PROPERTIES
209
211
CXX_EXTENSIONS OFF
@@ -222,7 +224,7 @@ if(LIBUNWIND_HIDE_SYMBOLS)
222
224
endif ()
223
225
224
226
add_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 )
226
228
set_target_properties (unwind_static
227
229
PROPERTIES
228
230
EXCLUDE_FROM_ALL "$<IF:$<BOOL:${LIBUNWIND_ENABLE_STATIC} >,FALSE,TRUE>"
0 commit comments