[libc-commits] [PATCH] D75136: [libc] Fix build when -DBUILD_SHARED_LIBS=On
Alex Brachet via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Feb 26 08:05:00 PST 2020
abrachet updated this revision to Diff 246735.
abrachet added a comment.
When I ran with the same command as you I got it to break. This one should work. I'm not sure which was the flag that made the difference here. I'll do some investigating report back :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75136/new/
https://reviews.llvm.org/D75136
Files:
libc/utils/UnitTest/CMakeLists.txt
libc/utils/testutils/CMakeLists.txt
Index: libc/utils/testutils/CMakeLists.txt
===================================================================
--- libc/utils/testutils/CMakeLists.txt
+++ libc/utils/testutils/CMakeLists.txt
@@ -1,8 +1,10 @@
-add_library(
+if(CMAKE_HOST_UNIX)
+ set(EFFile ExecuteFunctionUnix.cpp)
+endif()
+
+add_llvm_library(
libc_test_utils
+ ${EFFile}
ExecuteFunction.h
+ LINK_COMPONENTS Support
)
-
-if(CMAKE_HOST_UNIX)
- target_sources(libc_test_utils PRIVATE ExecuteFunctionUnix.cpp)
-endif()
Index: libc/utils/UnitTest/CMakeLists.txt
===================================================================
--- libc/utils/UnitTest/CMakeLists.txt
+++ libc/utils/UnitTest/CMakeLists.txt
@@ -6,3 +6,4 @@
)
target_include_directories(LibcUnitTest PUBLIC ${LIBC_SOURCE_DIR})
add_dependencies(LibcUnitTest standalone_cpp)
+target_link_libraries(LibcUnitTest PUBLIC libc_test_utils)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75136.246735.patch
Type: text/x-patch
Size: 876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200226/dd0799b9/attachment.bin>
More information about the libc-commits
mailing list