Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
7b616b9f
by Cheng Shao at 2026-01-16T06:45:00-05:00
1 changed file:
Changes:
| ... | ... | @@ -296,10 +296,15 @@ outputForeignStubs logger tmpfs dflags unit_state mod location stubs |
| 296 | 296 | mk_include i = "#include \"" ++ ST.unpack i ++ "\"\n"
|
| 297 | 297 | in case mrts_pkg of
|
| 298 | 298 | Just rts_pkg -> concatMap mk_include (unitIncludes rts_pkg)
|
| 299 | - -- This case only happens when compiling foreign stub for the rts
|
|
| 300 | - -- library itself. The only time we do this at the moment is for
|
|
| 301 | - -- IPE information for the RTS info tables
|
|
| 302 | - Nothing -> ""
|
|
| 299 | + -- The Nothing case only happens when compiling
|
|
| 300 | + -- foreign stubs for the rts library itself (e.g.
|
|
| 301 | + -- building with +ipe), and the rts unit is not
|
|
| 302 | + -- registered yet.
|
|
| 303 | + --
|
|
| 304 | + -- The generated stubs may still use RTS API, so
|
|
| 305 | + -- we must ensure that Rts.h is included,
|
|
| 306 | + -- otherwise we may run into regressions (#26779).
|
|
| 307 | + Nothing -> "#include \"Rts.h\"\n"
|
|
| 303 | 308 | |
| 304 | 309 | -- wrapper code mentions the ffi_arg type, which comes from ffi.h
|
| 305 | 310 | ffi_includes
|