2018-09-07 19:27:30 +10:00
|
|
|
# Description: Masquerade directory to use ccache with clang.
|
|
|
|
# URL: http://llvm.org/
|
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
|
|
# Depends on: ccache clang
|
|
|
|
|
|
|
|
name=clang-ccache-bindings
|
2020-05-02 14:10:29 +10:00
|
|
|
version=10
|
|
|
|
release=1
|
2018-09-07 19:27:30 +10:00
|
|
|
source=()
|
|
|
|
|
|
|
|
build() {
|
|
|
|
install -d $PKG/usr/lib/ccache
|
|
|
|
|
2019-11-28 23:05:15 +11:00
|
|
|
local clang0="$(clang++ -v 2>&1 | grep version | sed 's/.*version \([0-9]*\).[0-9]*.[0-9]* .*/\1/g')"
|
|
|
|
local clang1="$(clang++ -v 2>&1 | grep version | sed 's/.*version \([0-9]*.[0-9]*\).[0-9]* .*/\1/g')"
|
2018-09-07 19:27:30 +10:00
|
|
|
|
2019-11-28 23:05:15 +11:00
|
|
|
if [ -z $clang0 ]; then
|
2018-09-07 19:27:30 +10:00
|
|
|
echo 'Failed to find clang version'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang
|
2019-11-28 23:05:15 +11:00
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang-$clang0
|
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang-$clang1
|
2018-09-07 19:27:30 +10:00
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang++
|
|
|
|
}
|