File tree 1 file changed +13
-9
lines changed
1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -66,20 +66,24 @@ set(LIBUNWIND_SOURCES
66
66
${LIBUNWIND_ASM_SOURCES} )
67
67
68
68
# Generate library list.
69
- if (LIBUNWIND_USE_COMPILER_RT )
70
- add_library_flags( " ${LIBUNWIND_BUILTINS_LIBRARY} " )
69
+ if (CXX_SUPPORTS_NOSTDLIBXX_FLAG )
70
+ add_link_flags_if_supported(-nostdlib++ )
71
71
else ()
72
- add_library_flags_if(LIBUNWIND_HAS_GCC_S_LIB gcc_s)
73
- add_library_flags_if(LIBUNWIND_HAS_GCC_LIB gcc)
74
- endif ()
75
- if (NOT APPLE ) # On Apple platforms, we don't need to link explicitly against system libraries
72
+ if (LIBUNWIND_USE_COMPILER_RT)
73
+ add_library_flags("${LIBUNWIND_BUILTINS_LIBRARY} " )
74
+ else ()
75
+ add_library_flags_if(LIBUNWIND_HAS_GCC_S_LIB gcc_s)
76
+ add_library_flags_if(LIBUNWIND_HAS_GCC_LIB gcc)
77
+ endif ()
76
78
add_library_flags_if(LIBUNWIND_HAS_C_LIB c)
79
+ endif ()
80
+
81
+ if (NOT APPLE )
77
82
add_library_flags_if(LIBUNWIND_HAS_DL_LIB dl)
83
+ endif ()
78
84
79
- if (LIBUNWIND_ENABLE_THREADS)
85
+ if (LIBUNWIND_ENABLE_THREADS AND NOT APPLE )
80
86
add_library_flags_if(LIBUNWIND_HAS_PTHREAD_LIB pthread)
81
- add_compile_flags_if(LIBUNWIND_WEAK_PTHREAD_LIB -DLIBUNWIND_USE_WEAK_PTHREAD=1)
82
- endif ()
83
87
endif ()
84
88
85
89
if (LIBUNWIND_ENABLE_THREADS)
You can’t perform that action at this time.
0 commit comments