Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

DeriveConstants.h is brittle and should be generated separately for threaded and non-threaded ways
Currently `deriveConstants` is used to generate `_build/stage1/rts/build/include/DerivedConstants.h`. This file is shared between the threaded and non-threaded RTS ways. Some derived macros refer to things that are only defined in the threaded rts (for example various fields of the struct Capability). To make that work, `deriveConstants` always uses `-DTHREADED_RTS`. This is quite fragile. Consider: ``` struct Capability_ { ... // loads of stuff #if defined(THREADED_RTS) ... // loads more stuff #endif // I/O manager data structures for this capability CapIOManager *iomgr; // Per-capability STM-related data ... } ``` This is an accident waiting to happen! If anyone defines a constant for cmm to access the `iomgr` or STM related fields of the Capability then this will blow up, because they will have _different_ offsets in the threaded and non-threaded RTS ways. Indeed I already hit this issue and it cost me quite a bit of time with GDB to figure out what was going on. I fixed it here https://gitlab.haskell.org/ghc/ghc/-/merge_requests/14820/diffs?commit_id=bb63cf0611c894e84fa83774a6a75bb113c1fc59 (not yet merged) for the Capability, but the general issue persists. The right thing to do is to generate two copies of DerivedConstants.h, once for threaded and once for non-threaded. This would also solve the problem that we cannot have the sanity check that `THREADED_RTS` implies `HAVE_PREEMPTION`. See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/16147#note_678622.
issue