[libc] Fix build when -DBUILD_SHARED_LIBS=On

Reviewers: gchatelet, sivachandra

Reviewed By: gchatelet, sivachandra

Subscribers: libc-commits, mgorny, MaskRay, tschuett

Differential Revision: https://reviews.llvm.org/D75136
This commit is contained in:
Alex Brachet 2020-02-26 12:19:09 -05:00
parent 465dca79b3
commit 805f5836d1
2 changed files with 9 additions and 6 deletions

View File

@ -6,3 +6,4 @@ add_llvm_library(
)
target_include_directories(LibcUnitTest PUBLIC ${LIBC_SOURCE_DIR})
add_dependencies(LibcUnitTest standalone_cpp)
target_link_libraries(LibcUnitTest PUBLIC libc_test_utils)

View File

@ -1,8 +1,10 @@
add_library(
libc_test_utils
ExecuteFunction.h
)
if(CMAKE_HOST_UNIX)
target_sources(libc_test_utils PRIVATE ExecuteFunctionUnix.cpp)
set(EFFile ExecuteFunctionUnix.cpp)
endif()
add_llvm_library(
libc_test_utils
${EFFile}
ExecuteFunction.h
LINK_COMPONENTS Support
)