forked from qt-creator/qt-creator
Clang: fix llvm lib linking on windows
If we use paths with spaces we cannot split them anymore so we have to handle unix and windows differently. Change-Id: Ibfc8c51cfe2ecd68e913ad84e0e1269eb7eeda02 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -73,11 +73,12 @@ win32: BIN_EXTENSION = .exe
|
||||
llvm_config = $$system_quote($$LLVM_INSTALL_DIR/bin/llvm-config)
|
||||
requires(exists($$llvm_config$$BIN_EXTENSION))
|
||||
#message("llvm-config found, querying it for paths and version")
|
||||
LLVM_LIBDIR = $$system($$llvm_config --libdir, lines)
|
||||
LLVM_LIBDIR = $$quote($$system($$llvm_config --libdir, lines))
|
||||
LLVM_INCLUDEPATH = $$system($$llvm_config --includedir, lines)
|
||||
output = $$system($$llvm_config --version, lines)
|
||||
LLVM_VERSION = $$extractVersion($$output)
|
||||
LLVM_STATIC_LIBS_STRING += $$system($$llvm_config --libs, lines)
|
||||
unix:LLVM_STATIC_LIBS_STRING += $$system($$llvm_config --libs, lines)
|
||||
win32:LLVM_STATIC_LIBS_STRING += $$system($$llvm_config --libnames, lines)
|
||||
LLVM_STATIC_LIBS_STRING += $$system($$llvm_config --system-libs, lines)
|
||||
|
||||
LLVM_STATIC_LIBS = $$split(LLVM_STATIC_LIBS_STRING, " ")
|
||||
|
||||
@@ -8,5 +8,6 @@ requires(equals(LLVM_IS_COMPILED_WITH_RTTI, "YES"))
|
||||
|
||||
DEFINES += CLANG_UNIT_TESTS
|
||||
INCLUDEPATH += $$LLVM_INCLUDEPATH
|
||||
win32:LIBS += -lVersion
|
||||
LIBS += $$LIBTOOLING_LIBS $$LIBCLANG_LIBS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user