Fix link error when llvm is in /usr but Qt isn't

LLVM_LIBDIR=/usr was making this code insert -Wl,-rpath,/usr/lib64
into the link line, which leads to link errors due to libQt5Qml.so being
picked up from there rather than from where the rest of my self-built Qt is.
(Qt5Qml is an indirect dependency of the other libs on the link line)

Change-Id: I76164905ede416ba2fb895fda372c08633777f4f
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Faure
2016-09-08 16:17:55 +02:00
parent cf3afe885a
commit c56b308ab5

View File

@@ -16,5 +16,5 @@ SOURCES += clangbackendmain.cpp
unix {
!osx: QMAKE_LFLAGS += -Wl,-z,origin
!disable_external_rpath: QMAKE_LFLAGS += -Wl,-rpath,$$shell_quote($${LLVM_LIBDIR})
!contains(QMAKE_DEFAULT_LIBDIRS, $${LLVM_LIBDIR}):!disable_external_rpath: QMAKE_LFLAGS += -Wl,-rpath,$$shell_quote($${LLVM_LIBDIR})
}