[CMake][Fuchsia] Pass -ldl -lpthread LDFLAGS to second stage

We're using static libc++ for the second stage which requires explicitly
linking -ldl and -lpthread.

llvm-svn: 353853
This commit is contained in:
Petr Hosek 2019-02-12 16:24:46 +00:00
parent d30fff9a90
commit f9fe483eb5
1 changed files with 6 additions and 0 deletions

View File

@ -74,6 +74,12 @@ if(BOOTSTRAP_CMAKE_SYSTEM_NAME)
endif()
endif()
if(UNIX)
set(BOOTSTRAP_CMAKE_SHARED_LINKER_FLAGS "-ldl -lpthread" CACHE STRING "")
set(BOOTSTRAP_CMAKE_MODULE_LINKER_FLAGS "-ldl -lpthread" CACHE STRING "")
set(BOOTSTRAP_CMAKE_EXE_LINKER_FLAGS "-ldl -lpthread" CACHE STRING "")
endif()
set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
if(NOT APPLE)
set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")