Update Linux compiler selection with linker
Qmake attempts to invoke the linker with the default `g++` binary even when we changed the binary. This will compile error when using LTO. For clang: ``` /usr/bin/ld.gold: error: /usr/lib/llvm-3.8/bin/../lib/LLVMgold.so: could not load plugin library: /usr/lib/llvm-3.8/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory ``` For GCC: ``` lto1: fatal error: bytecode stream generated with LTO version 6.0 instead of the expected 4.1 ```
This commit is contained in:
@@ -7,14 +7,17 @@ else {
|
||||
system(g++-7 --version) {
|
||||
message('g++-7' found.)
|
||||
QMAKE_CXX = g++-7
|
||||
QMAKE_LINK = g++-7
|
||||
}
|
||||
system(g++-8 --version) {
|
||||
message('g++-8' found.)
|
||||
QMAKE_CXX = g++-8
|
||||
QMAKE_LINK = g++-8
|
||||
}
|
||||
system(g++-9 --version) {
|
||||
message('g++-9' found.)
|
||||
QMAKE_CXX = g++-9
|
||||
QMAKE_LINK = g++-9
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user