Was poking around the clang build today and noticed that it doesn't build b/c of the move of some LibC headers to Kernel/API.
Reminded me that the same set of files that are installed into the sysroot in BuildIt.sh:
|
echo "XXX serenity libc, libm and libpthread headers" |
|
mkdir -p "$BUILD" |
|
pushd "$BUILD" |
|
mkdir -p Root/usr/include/ |
|
SRC_ROOT=$($REALPATH "$DIR"/..) |
|
FILES=$(find "$SRC_ROOT"/Kernel/API "$SRC_ROOT"/Userland/Libraries/LibC "$SRC_ROOT"/Userland/Libraries/LibM "$SRC_ROOT"/Userland/Libraries/LibPthread -name '*.h' -print) |
|
for header in $FILES; do |
|
target=$(echo "$header" | sed -e "s@$SRC_ROOT/Userland/Libraries/LibC@@" -e "s@$SRC_ROOT/Userland/Libraries/LibM@@" -e "s@$SRC_ROOT/Userland/Libraries/LibPthread@@" -e "s@$SRC_ROOT/Kernel/@Kernel/@") |
|
buildstep "system_headers" $INSTALL -D "$header" "Root/usr/include/$target" |
|
done |
|
unset SRC_ROOT |
|
popd |
Are the same files that we're supposed to be using to determine if the toolchain cache is stale:
|
- name: Prepare useful stamps |
|
id: stamps |
|
shell: cmake -P {0} |
|
run: | |
|
string(TIMESTAMP current_date "%Y_%m_%d_%H_%M_%S" UTC) |
|
# Output everything twice to make it visible both in the logs |
|
# *and* as actual output variable, in this order. |
|
message(" set-output name=time::${current_date}") |
|
message("::set-output name=time::${current_date}") |
|
message(" set-output name=libc_headers::${{ hashFiles('Userland/Libraries/LibC/**/*.h', 'Userland/Libraries/LibPthread/**/*.h', 'Toolchain/Patches/*.patch', 'Toolchain/BuildIt.sh') }}") |
|
message("::set-output name=libc_headers::${{ hashFiles('Userland/Libraries/LibC/**/*.h', 'Userland/Libraries/LibPthread/**/*.h', 'Toolchain/Patches/*.patch', 'Toolchain/BuildIt.sh') }}") |
The cmake.yaml and clang.yaml workflow files need to be updated to hash all the relevant files, so that we don't end up with weird toolchain cache behavior when someone changes some C library or POSIX headers that the toolchain was using.