Alison Alva opened merge request !14824: ghc-heap: Fix race condition with profiling builds at Glasgow Haskell Compiler / GHC

Alison Alva
2025-09-13T00:03:02Z

ghc -M can't see dependencies hidden behind CPP conditionals, causing Hadrian to miss that Heap.p_o depends on InfoTableProf.p_hi when building the profiling way. This leads to intermittent CI failures where parallel builds try to compile Heap.p_o before InfoTableProf.p_hi exists.

The fix adds empty imports in both CPP branches to make the dependency always visible. This is the same fix that was applied to Closures.hs in 64fd0fac but was missed for Heap.hs

Fixes #26407 using the same method identified for #15197