[libclc] e6bb1d6 - libclc: Fix LLVM library linking on Windows
Jan Vesely via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 14 07:04:16 PDT 2020
Author: Daniel Stone
Date: 2020-04-14T10:03:27-04:00
New Revision: e6bb1d69eccc612e54fd1a0b63ca3dcc84c3a6fa
URL: https://github.com/llvm/llvm-project/commit/e6bb1d69eccc612e54fd1a0b63ca3dcc84c3a6fa
DIFF: https://github.com/llvm/llvm-project/commit/e6bb1d69eccc612e54fd1a0b63ca3dcc84c3a6fa.diff
LOG: 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
Added:
Modified:
libclc/CMakeLists.txt
Removed:
################################################################################
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}" )
More information about the cfe-commits
mailing list