Skip to content

Make TABLES_NEXT_TO_CODE a dynflag

The GHC API is used by programs that do not necessarily want to compile the same way as the normal GHC, so we want as much configuration in DynFlags and as little as possible hard-coded.

One such hard-coded flag is TABLES_NEXT_TO_CODE. It is currently used in these places:

  • It is (of course) used a lot in rts. That’s fine.
  • It is used via tablesNextToCode :: DynFlags -> Bool in the Cmm code, so that code is already prepared to read the information from DynFlags.
  • There is ghciTablesNextToCode :: Bool in the GHCi code, some refactoring there might be needed to add a DynFlag there.

(The motivation is similar to #13477 (closed))

Edited by Joachim Breitner
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information