[libcxx-commits] [PATCH] D109342: [libcxx][libcxxabi] CMAKE_REQUIRED_FLAGS is a string, not a list

Nehal J Wani via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 8 08:45:32 PDT 2021


nehaljwani updated this revision to Diff 371352.
nehaljwani added a comment.

Added more information in the commit message, rebased to over latest origin/main


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109342/new/

https://reviews.llvm.org/D109342

Files:
  libcxx/cmake/config-ix.cmake
  libcxxabi/cmake/config-ix.cmake


Index: libcxxabi/cmake/config-ix.cmake
===================================================================
--- libcxxabi/cmake/config-ix.cmake
+++ libcxxabi/cmake/config-ix.cmake
@@ -38,7 +38,7 @@
     list(APPEND CMAKE_REQUIRED_LIBRARIES c)
   endif ()
   if (LIBCXXABI_USE_COMPILER_RT)
-    list(APPEND CMAKE_REQUIRED_FLAGS -rtlib=compiler-rt)
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -rtlib=compiler-rt")
     find_compiler_rt_library(builtins LIBCXXABI_BUILTINS_LIBRARY)
     list(APPEND CMAKE_REQUIRED_LIBRARIES "${LIBCXXABI_BUILTINS_LIBRARY}")
   else ()
Index: libcxx/cmake/config-ix.cmake
===================================================================
--- libcxx/cmake/config-ix.cmake
+++ libcxx/cmake/config-ix.cmake
@@ -48,7 +48,7 @@
     list(APPEND CMAKE_REQUIRED_LIBRARIES c)
   endif ()
   if (LIBCXX_USE_COMPILER_RT)
-    list(APPEND CMAKE_REQUIRED_FLAGS -rtlib=compiler-rt)
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -rtlib=compiler-rt")
     find_compiler_rt_library(builtins LIBCXX_BUILTINS_LIBRARY)
     list(APPEND CMAKE_REQUIRED_LIBRARIES "${LIBCXX_BUILTINS_LIBRARY}")
   elseif (LIBCXX_HAS_GCC_LIB)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109342.371352.patch
Type: text/x-patch
Size: 1152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210908/2b42cd4c/attachment.bin>


More information about the libcxx-commits mailing list