Internal compiler: first try find and use clang with version in postf… (#1029)

* Fix missing includes

* clean

* Allow compile with clang 3.8 with warning

* Add message

* Internal compiler: first try find and use clang vith version in postfix (clang-4.0)

* Try use clang-3.8

* try use all clangs

* Update copy_clang_binaries.sh

* Update rules
This commit is contained in:
proller 2017-08-10 07:44:28 +03:00 committed by alexey-milovidov
parent 59e06c9a2c
commit c62901a871
2 changed files with 5 additions and 3 deletions

View File

@ -7,6 +7,7 @@ DST=${1:-.};
PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:$PATH"
LD=$(command -v gold || command -v ld.gold || command -v ld)
# Should be runned with correct path to clang
if [ -z "$CLANG" ]; then
CLANG=$(which clang)
fi
@ -21,8 +22,8 @@ if [ ! -x "$LD" ]; then
exit 1
fi
cp "$CLANG" $DST
cp "$LD" ${DST}/ld
cp "$CLANG" "${DST}/clang"
cp "$LD" "${DST}/ld"
STDCPP=$(ldd $CLANG | grep -oE '/[^ ]+libstdc++[^ ]+')

3
debian/rules vendored
View File

@ -21,7 +21,8 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_CC ?= gcc-6
DEB_CXX ?= g++-6
DEB_CLANG ?= $(shell which clang)
DEB_CLANG ?= $(shell which clang-6.0 || which clang-5.0 || which clang-4.0 || which clang || which clang-3.9 || which clang-3.8)
# CMAKE_FLAGS_ADD += -DINTERNAL_COMPILER_EXECUTABLE=$(basename $(DEB_CLANG)) # TODO: this is actual only if you will also change clang name in copy_clang_binaries.sh
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)