Disable LTO on Travis CI and change clang binary to clang++
Travis clang does not have the LLVMgold plugin installed. Disabling LTO is easier than installing the plugin since the CI doesn't create any artifacts anyway.
This commit is contained in:
@@ -31,6 +31,8 @@ before_install:
|
|||||||
- sudo apt install clang-format-8
|
- sudo apt install clang-format-8
|
||||||
- clang-format-8 --version
|
- clang-format-8 --version
|
||||||
- python ./build_scripts/run-clang-format.py ./src -r --color always --clang-format-executable clang-format-8
|
- python ./build_scripts/run-clang-format.py ./src -r --color always --clang-format-executable clang-format-8
|
||||||
|
- sed -i 's/QMAKE_CXXFLAGS += -flto//g' ./build_scripts/qt/compilers/clang-gcc-common-switches.pri # CI version of clang can't handle LTO
|
||||||
|
- sed -i 's/QMAKE_LFLAGS += -flto -fuse-ld=gold//g' ./build_scripts/qt/compilers/clang-gcc-common-switches.pri # CI version of clang can't handle LTO
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- sudo add-apt-repository ppa:beineri/opt-qt-5.12.7-bionic -y
|
- sudo add-apt-repository ppa:beineri/opt-qt-5.12.7-bionic -y
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# comments are the value of CLANG_VERSION
|
# comments are the value of CLANG_VERSION
|
||||||
CLANG_VERSION = $$system("clang --version | grep 'clang version'")
|
CLANG_VERSION = $$system("clang++ --version | grep 'clang version'")
|
||||||
# clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
|
# clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
|
||||||
CLANG_VERSION = $$split(CLANG_VERSION, ' ')
|
CLANG_VERSION = $$split(CLANG_VERSION, ' ')
|
||||||
# CLANG_VERSION is now a list, this is shown as spaces in QMAKE
|
# CLANG_VERSION is now a list, this is shown as spaces in QMAKE
|
||||||
@@ -12,29 +12,31 @@ CLANG_VERSION = $$member(CLANG_VERSION, 0)
|
|||||||
# 6
|
# 6
|
||||||
|
|
||||||
greaterThan(CLANG_VERSION, 4) {
|
greaterThan(CLANG_VERSION, 4) {
|
||||||
message('clang' version is above 4. Using regular clang.)
|
message('clang++' version is above 4. Using regular clang++.)
|
||||||
|
QMAKE_CXX = clang++
|
||||||
|
QMAKE_LINK = clang++
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
message('clang' version is not above 4. Attempting to use highest specific version.)
|
message('clang++' version is not above 4. Attempting to use highest specific version.)
|
||||||
system("clang-5 --version") {
|
system("clang++-5 --version") {
|
||||||
QMAKE_CXX = clang-5
|
QMAKE_CXX = clang++-5
|
||||||
QMAKE_LINK = clang-5
|
QMAKE_LINK = clang++-5
|
||||||
message('clang-5' found.)
|
message('clang++-5' found.)
|
||||||
}
|
}
|
||||||
system("clang-6 --version") {
|
system("clang++-6 --version") {
|
||||||
QMAKE_CXX = clang-6
|
QMAKE_CXX = clang++-6
|
||||||
QMAKE_LINK = clang-6
|
QMAKE_LINK = clang++-6
|
||||||
message('clang-6' found.)
|
message('clang++-6' found.)
|
||||||
}
|
}
|
||||||
system("clang-7 --version") {
|
system("clang++-7 --version") {
|
||||||
QMAKE_CXX = clang-7
|
QMAKE_CXX = clang++-7
|
||||||
QMAKE_LINK = clang-7
|
QMAKE_LINK = clang++-7
|
||||||
message('clang-7' found.)
|
message('clang++-7' found.)
|
||||||
}
|
}
|
||||||
system("clang-8 --version") {
|
system("clang++-8 --version") {
|
||||||
QMAKE_CXX = clang-8
|
QMAKE_CXX = clang++-8
|
||||||
QMAKE_LINK = clang-8
|
QMAKE_LINK = clang++-8
|
||||||
message('clang-8' found.)
|
message('clang++-8' found.)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user