mstorsjo created this revision.
mstorsjo added reviewers: phosek, MaskRay, saugustine.
Herald added subscribers: mgorny, dberris.
mstorsjo requested review of this revision.
Herald added a project: clang.

002dd47bdd674fad8186650f07458b1e062545df 
<https://reviews.llvm.org/rG002dd47bdd674fad8186650f07458b1e062545df> 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
41476d89b82647c1ff690fdc805c859262d571e5 
<https://reviews.llvm.org/rG41476d89b82647c1ff690fdc805c859262d571e5>.

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.

Or shoulf we just remove the default-inferring logic (currently only
setting unwindlib=libgcc) altogether, as the simpler default (empty
string, equal to -unwindlib=platform) does the same anyway?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98142

Files:
  clang/CMakeLists.txt


Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -262,8 +262,6 @@
 if (CLANG_DEFAULT_UNWINDLIB STREQUAL "")
   if (CLANG_DEFAULT_RTLIB STREQUAL "libgcc")
     set (CLANG_DEFAULT_UNWINDLIB "libgcc" CACHE STRING "" FORCE)
-  elseif (CLANG_DEFAULT_RTLIB STREQUAL "compiler-rt")
-    set (CLANG_DEFAULT_UNWINDLIB "none" CACHE STRING "" FORCE)
   endif()
 endif()
 
@@ -273,7 +271,7 @@
         CLANG_DEFAULT_UNWINDLIB STREQUAL "libunwind"))
   message(WARNING "Resetting default unwindlib to use platform default")
   set(CLANG_DEFAULT_UNWINDLIB "" CACHE STRING
-    "Default unwind library to use (\"none\" \"libgcc\" or \"libunwind\", 
empty for none)" FORCE)
+    "Default unwind library to use (\"none\" \"libgcc\" or \"libunwind\", 
empty to match runtime library.)" FORCE)
 endif()
 
 set(CLANG_DEFAULT_OBJCOPY "objcopy" CACHE STRING


Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -262,8 +262,6 @@
 if (CLANG_DEFAULT_UNWINDLIB STREQUAL "")
   if (CLANG_DEFAULT_RTLIB STREQUAL "libgcc")
     set (CLANG_DEFAULT_UNWINDLIB "libgcc" CACHE STRING "" FORCE)
-  elseif (CLANG_DEFAULT_RTLIB STREQUAL "compiler-rt")
-    set (CLANG_DEFAULT_UNWINDLIB "none" CACHE STRING "" FORCE)
   endif()
 endif()
 
@@ -273,7 +271,7 @@
         CLANG_DEFAULT_UNWINDLIB STREQUAL "libunwind"))
   message(WARNING "Resetting default unwindlib to use platform default")
   set(CLANG_DEFAULT_UNWINDLIB "" CACHE STRING
-    "Default unwind library to use (\"none\" \"libgcc\" or \"libunwind\", empty for none)" FORCE)
+    "Default unwind library to use (\"none\" \"libgcc\" or \"libunwind\", empty to match runtime library.)" FORCE)
 endif()
 
 set(CLANG_DEFAULT_OBJCOPY "objcopy" CACHE STRING
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to