[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
Mon Sep 6 20:20:06 PDT 2021


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

Added link to BZ in commit message


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
@@ -28,9 +28,9 @@
     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}")
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${LIBCXXABI_BUILTINS_LIBRARY}")
   else ()
     if (LIBCXXABI_HAS_GCC_S_LIB)
       list(APPEND CMAKE_REQUIRED_LIBRARIES gcc_s)
Index: libcxx/cmake/config-ix.cmake
===================================================================
--- libcxx/cmake/config-ix.cmake
+++ libcxx/cmake/config-ix.cmake
@@ -38,9 +38,9 @@
     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}")
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${LIBCXX_BUILTINS_LIBRARY}")
   elseif (LIBCXX_HAS_GCC_LIB)
     list(APPEND CMAKE_REQUIRED_LIBRARIES gcc)
   elseif (LIBCXX_HAS_GCC_S_LIB)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109342.370987.patch
Type: text/x-patch
Size: 1488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210907/a136456f/attachment-0001.bin>


More information about the libcxx-commits mailing list