Skip to content

Commit e81d813

Browse files
committed
[clang] Don't set CLANG_DEFAULT_UNWINDLIB to none if rtlib is set to compiler-rt
002dd47 was meant to not be any functional change, but it turned out it was. With CLANG_DEFAULT_RTLIB set to compiler-rt, CLANG_DEFAULT_UNWINDLIB used to bet set to an empty string, but now was set to "none". If one only overrode rtlib to libgcc, one previously would get libgcc as unwind lib, but now didn't. This caused test failures, fixed in 41476d8. Secondly, for the android target, the previous default was to link libunwind, which this now changed. Reinstate the exact same behaviour as before (removing the previously typoed cmake check) and fix the option comment in one place to match the other one above. Differential Revision: https://reviews.llvm.org/D98142
1 parent f0fcad5 commit e81d813

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,6 @@ set(CLANG_DEFAULT_UNWINDLIB "" CACHE STRING
262262
if (CLANG_DEFAULT_UNWINDLIB STREQUAL "")
263263
if (CLANG_DEFAULT_RTLIB STREQUAL "libgcc")
264264
set (CLANG_DEFAULT_UNWINDLIB "libgcc" CACHE STRING "" FORCE)
265-
elseif (CLANG_DEFAULT_RTLIB STREQUAL "compiler-rt")
266-
set (CLANG_DEFAULT_UNWINDLIB "none" CACHE STRING "" FORCE)
267265
endif()
268266
endif()
269267

@@ -273,7 +271,7 @@ if (NOT(CLANG_DEFAULT_UNWINDLIB STREQUAL "" OR
273271
CLANG_DEFAULT_UNWINDLIB STREQUAL "libunwind"))
274272
message(WARNING "Resetting default unwindlib to use platform default")
275273
set(CLANG_DEFAULT_UNWINDLIB "" CACHE STRING
276-
"Default unwind library to use (\"none\" \"libgcc\" or \"libunwind\", empty for none)" FORCE)
274+
"Default unwind library to use (\"none\" \"libgcc\" or \"libunwind\", empty to match runtime library.)" FORCE)
277275
endif()
278276

279277
set(CLANG_DEFAULT_OBJCOPY "objcopy" CACHE STRING

0 commit comments

Comments
 (0)