Handle foreign-owned compile artifacts

This commit is contained in:
udo
2026-07-19 05:20:08 +00:00
parent 4f010d37a0
commit ccbe945d62
7 changed files with 201 additions and 15 deletions
+3 -1
View File
@@ -56,7 +56,9 @@ build_pch_if_needed() {
return 0
fi
mkdir -p "$PCH_DIR"
exec 9>"$PCH_FN.lock"
if ! { exec 9>"$PCH_FN.lock"; } 2>/dev/null; then
exec 9<"$PCH_FN.lock"
fi
flock 9
if [ -s "$PCH_FN" ] && [ -z "$(find src/lib -maxdepth 1 -name '*.h' -type f -newer "$PCH_FN" -print -quit)" ]; then
flock -u 9