[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:17:36 PDT 2021
nehaljwani created this revision.
Herald added a subscriber: mgorny.
nehaljwani requested review of this revision.
Herald added projects: libc++, libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.
Repository:
rG LLVM Github Monorepo
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.370986.patch
Type: text/x-patch
Size: 1488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210907/2eb9958b/attachment.bin>
More information about the libcxx-commits
mailing list