mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-26 03:20:24 +00:00
d62a15193e
Build fails with sccache.
- Update meson-scripts/build_bpftool to support sccache. Unfortunately, this
isn't enough.
- Update README to warn about sccache and add the instruction to disable it
for buliding scx.
- Also add ⚠️ to make boot loader update step more prominent in arch
installation instruction.
29 lines
499 B
Bash
29 lines
499 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
out=$("$1" 'map(select(.["file"] | contains ("cc_cflags_probe.c"))) | first | .["command"]' < compile_commands.json)
|
|
out=${out#\"}
|
|
out=${out%\"}
|
|
args=($out)
|
|
|
|
idx=0
|
|
cc=${args[idx]}
|
|
if [ "$cc" = "ccache" -o "$cc" = "sccache" ]; then
|
|
idx=$((idx+1))
|
|
cc="$cc ${args[idx]}"
|
|
fi
|
|
|
|
declare -a cflags=()
|
|
|
|
for arg in ${args[@]:(idx+1)}; do
|
|
case $arg in
|
|
-I*|-M*|-o|-c) ;;
|
|
-*) cflags+="$arg ";;
|
|
esac
|
|
done
|
|
|
|
cd $3
|
|
make_out=$(env CC="$cc" CFLAGS="$cflags" "$2" -j"$4")
|
|
exit $?
|