Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
21 lines
755 B
Bash
21 lines
755 B
Bash
appendToVar postPhases cleanupBuildDir
|
|
|
|
# Force GCC to build with coverage instrumentation. Also disable
|
|
# optimisation, since it may confuse things.
|
|
export NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE:-} -O0 --coverage"
|
|
|
|
# Get rid of everything that isn't a gcno file or a C source file.
|
|
# Also strip the `.tmp_' prefix from gcno files. (The Linux kernel
|
|
# creates these.)
|
|
cleanupBuildDir() {
|
|
if ! [ -e $out/.build ]; then return; fi
|
|
|
|
find $out/.build/ -type f -a ! \
|
|
\( -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.h" -o -name "*.hh" -o -name "*.y" -o -name "*.l" -o -name "*.gcno" \) \
|
|
| xargs rm -f --
|
|
|
|
for i in $(find $out/.build/ -name ".tmp_*.gcno"); do
|
|
mv "$i" "$(echo $i | sed s/.tmp_//)"
|
|
done
|
|
}
|