summaryrefslogtreecommitdiff
path: root/compiler/cbits/keepCAFsForGHCi.c
Commit message (Collapse)AuthorAgeFilesLines
* ghc-the-library: Retain cafs in both static in dynamic builds.Andreas Klebinger2023-01-301-3/+23
| | | | | | | | | | | | | | | | | | | | | We use keepCAFsForGHCi.c to force -fkeep-cafs behaviour by using a __attribute__((constructor)) function. This broke for static builds where the linker discarded the object file since it was not reverenced from any exported code. We fix this by asserting that the flag is enabled using a function in the same module as the constructor. Which causes the object file to be retained by the linker, which in turn causes the constructor the be run in static builds. This changes nothing for dynamic builds using the ghc library. But causes static to also retain CAFs (as we expect them to). Fixes #22417. ------------------------- Metric Decrease: T21839r -------------------------
* Module hierarchy: ByteCode and Runtime (cf #13009)Sylvain Henry2020-02-121-0/+15
Update haddock submodule