From d62a15193e85b60e289a37cbce5527f2e1cb8119 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Wed, 3 Apr 2024 10:18:45 -1000 Subject: [PATCH] Doc & build: Warn about sccache 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 :warning: to make boot loader update step more prominent in arch installation instruction. --- INSTALL.md | 5 +++-- README.md | 5 +++++ meson-scripts/build_bpftool | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 579961c..afffdda 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -71,8 +71,9 @@ Include = /etc/pacman.d/cachyos-mirrorlist $ sudo pacman -Sy cachyos/linux-sched-ext cachyos/linux-sched-ext-headers cachyos/scx-scheds ``` -Note that the kernel installs as `/boot/vmlinuz-linux-sched-ext` along with the matching initramfs. -Update the bootloader configuration to add the boot entry for the new kernel. +:warning: The kernel installs as `/boot/vmlinuz-linux-sched-ext` along with +the matching initramfs. Update the bootloader configuration to add the boot +entry for the new kernel. #### Setting Up Dev Environment diff --git a/README.md b/README.md index 88c3160..ea260ac 100644 --- a/README.md +++ b/README.md @@ -192,6 +192,11 @@ $ meson setup build -Dbuildtype=release $ meson compile -C build scx_simple scx_rusty ``` +:warning: **If your system has `sccache` installed**: `meson` automatically +uses `sccache` if available. However, `sccache` fails in one of the build +steps. If you encounter this issue, disable `sccache` by specifying `CC` +directly - `$ CC=clang meson setup build -Dbuildtype=release`. + You can also specify `-v` if you want to see the commands being used: ``` diff --git a/meson-scripts/build_bpftool b/meson-scripts/build_bpftool index 2bcfeb4..1675991 100644 --- a/meson-scripts/build_bpftool +++ b/meson-scripts/build_bpftool @@ -9,7 +9,7 @@ args=($out) idx=0 cc=${args[idx]} -if [ "$cc" = "ccache" ]; then +if [ "$cc" = "ccache" -o "$cc" = "sccache" ]; then idx=$((idx+1)) cc="$cc ${args[idx]}" fi