Skip to content

Commit e6bb1d6

Browse files
fooishbarjvesely
authored andcommitted
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
1 parent 100483b commit e6bb1d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libclc/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ list( SORT LIBCLC_TARGETS_TO_BUILD )
5858
execute_process( COMMAND ${LLVM_CONFIG} "--system-libs"
5959
OUTPUT_VARIABLE LLVM_SYSTEM_LIBS
6060
OUTPUT_STRIP_TRAILING_WHITESPACE )
61+
separate_arguments( LLVM_SYSTEM_LIBS )
6162
execute_process( COMMAND ${LLVM_CONFIG} "--libs" "core" "bitreader" "bitwriter"
6263
OUTPUT_VARIABLE LLVM_LIBS
6364
OUTPUT_STRIP_TRAILING_WHITESPACE )
65+
separate_arguments( LLVM_LIBS )
6466
execute_process( COMMAND ${LLVM_CONFIG} "--libdir"
6567
OUTPUT_VARIABLE LLVM_LIBDIR
6668
OUTPUT_STRIP_TRAILING_WHITESPACE )
@@ -76,7 +78,7 @@ execute_process( COMMAND ${LLVM_CONFIG} "--bindir"
7678
OUTPUT_STRIP_TRAILING_WHITESPACE )
7779

7880
# These were not properly reported in early LLVM and we don't need them
79-
set( LLVM_CXX_FLAGS ${LLVM_CXX_FLAGS} -fno-rtti -fno-exceptions )
81+
list( APPEND LLVM_CXX_FLAGS -fno-rtti -fno-exceptions )
8082

8183
# Print LLVM variables
8284
message( "LLVM system libs: ${LLVM_SYSTEM_LIBS}" )

0 commit comments

Comments
 (0)