mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:58:11 +08:00
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
This commit is contained in:
@@ -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}" )
|
||||
|
||||
Reference in New Issue
Block a user