Files
MihawkandClaude Opus 5.5 355fe9ac70 Rebuild in seconds: stamp the cores, cache compiles, write only changes
A rebuild that changed nothing took 269 s, 255 of them rebuilding six
unchanged cores from scratch. Each core is now skipped when a hash of
everything its build reads matches its stamp; ccache sits in front of
the frontend, title and core compilers; the patcher writes a file only
when its final text differs; the host signing tool is rebuilt only when
its inputs change; and deployment uploads only files whose digest
differs from what was last verified on that console (--all for all).

No-change rebuild 269 s -> 2.2 s, a port-file edit 2.4 s, a driver
change 2.4 s, a forced FBNeo rebuild 77 s -> 2.8 s; deploy of nothing
changed 0.3 s, of one edit 12.4 s (full deploy 74 s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 19:36:17 -04:00

37 lines
1.1 KiB
Bash

#!/bin/sh
# ps5-native-app-boilerplate - PS5 Clang target wrapper.
# Copyright (C) 2026 BlackBearReloaded
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Applies the repository's proven compiler target and selected SDK paths.
if [ -z "${PS5_PAYLOAD_SDK:-}" ]; then
echo "PS5_PAYLOAD_SDK is not set; run make deps or the dependency bootstrap." >&2
exit 2
fi
sdk_root=$PS5_PAYLOAD_SDK
compiler=${PS5_CLANG:-}
if [ -z "$compiler" ]; then
compiler=$(command -v clang-18 || true)
fi
if [ -z "$compiler" ]; then
echo "clang-18 was not found; set PS5_CLANG to the Clang 18 executable." >&2
exit 2
fi
# ccache in front when it is installed (PS5_DISABLE_CCACHE=1 opts out): the
# frontend's and the title's sources then replay from the cache when unchanged.
launcher=""
if [ "${PS5_DISABLE_CCACHE:-0}" != 1 ] && command -v ccache >/dev/null 2>&1; then
launcher=ccache
fi
exec $launcher "$compiler" \
-target x86_64-sie-ps5 \
-fvisibility-nodllstorageclass=default \
-isysroot "$sdk_root" \
-isystem "$sdk_root/target/include/c++/v1" \
-isystem "$sdk_root/target/include" \
-fno-stack-protector -fno-plt -femulated-tls \
"$@"