]> git.armaanb.net Git - asd-repo.git/blob - ccache/build
ccache: copy build from wyverkiss
[asd-repo.git] / ccache / build
1 #!/bin/sh -e
2
3 export DESTDIR="$1"
4 export CFLAGS="$CFLAGS -static"
5 export CXXFLAGS="$CXXFLAGS -static"
6 export LDFLAGS="$LDFLAGS -lc++ -lc++abi -lunwind -static"
7
8 cmake -B build \
9     -DCMAKE_INSTALL_PREFIX=/usr \
10     -DCMAKE_BUILD_TYPE=Release \
11     -DENABLE_TESTING=OFF \
12     -DZSTD_LIBRARY=/usr/lib/libzstd.a
13
14 cmake --build   build
15 cmake --install build
16
17 mkdir -p "$1/usr/lib/ccache/bin"
18
19 for link in \
20     cc      \
21     clang   \
22     clang++ \
23     cpp     \
24     c++
25 do
26     ln -sf /usr/bin/ccache "$1/usr/lib/ccache/bin/$link"
27 done