diff options
author | Daniel Stone <daniels@collabora.com> | 2020-04-14 00:38:22 -0400 |
---|---|---|
committer | Jan Vesely <jano.vesely@gmail.com> | 2020-04-14 10:03:27 -0400 |
commit | e6bb1d69eccc612e54fd1a0b63ca3dcc84c3a6fa (patch) | |
tree | 6f4cde319272c325c492d4de2bfa4ecc9bc6b66d | |
parent | 100483b969b816e71cdfadfc591203c77e3e3fc7 (diff) | |
download | llvm-e6bb1d69eccc612e54fd1a0b63ca3dcc84c3a6fa.tar.gz |
libclc: Fix LLVM library linking on Windows
CMake requires library lists on Windows to be split by semi-colons,
rather than the spaces we get from llvm-config. Fix this by a
substitution on Windows.
reviewer: jvesely
Differential Revision: https://reviews.llvm.org/D77162
-rw-r--r-- | libclc/CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt index 4afed0d8f994..7274f02f666b 100644 --- a/libclc/CMakeLists.txt +++ b/libclc/CMakeLists.txt @@ -58,9 +58,11 @@ list( SORT LIBCLC_TARGETS_TO_BUILD ) execute_process( COMMAND ${LLVM_CONFIG} "--system-libs" OUTPUT_VARIABLE LLVM_SYSTEM_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE ) +separate_arguments( LLVM_SYSTEM_LIBS ) execute_process( COMMAND ${LLVM_CONFIG} "--libs" "core" "bitreader" "bitwriter" OUTPUT_VARIABLE LLVM_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE ) +separate_arguments( LLVM_LIBS ) execute_process( COMMAND ${LLVM_CONFIG} "--libdir" OUTPUT_VARIABLE LLVM_LIBDIR OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -76,7 +78,7 @@ execute_process( COMMAND ${LLVM_CONFIG} "--bindir" OUTPUT_STRIP_TRAILING_WHITESPACE ) # These were not properly reported in early LLVM and we don't need them -set( LLVM_CXX_FLAGS ${LLVM_CXX_FLAGS} -fno-rtti -fno-exceptions ) +list( APPEND LLVM_CXX_FLAGS -fno-rtti -fno-exceptions ) # Print LLVM variables message( "LLVM system libs: ${LLVM_SYSTEM_LIBS}" ) |