diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-07-22 07:26:47 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-08-09 15:11:58 -0400 |
commit | d5de970dafd5876ef30601697576167f56b9c132 (patch) | |
tree | cb2ccf4bc4c13e39e211beb60915d7bb4ccc477d /compiler/GHC/Cmm | |
parent | fc350dba63da7eefbaa2793fe9fe99f8571b75c0 (diff) | |
download | haskell-d5de970dafd5876ef30601697576167f56b9c132.tar.gz |
Move `/includes` to `/rts/include`, sort per package better
In order to make the packages in this repo "reinstallable", we need to
associate source code with a specific packages. Having a top level
`/includes` dir that mixes concerns (which packages' includes?) gets in
the way of this.
To start, I have moved everything to `rts/`, which is mostly correct.
There are a few things however that really don't belong in the rts (like
the generated constants haskell type, `CodeGen.Platform.h`). Those
needed to be manually adjusted.
Things of note:
- No symlinking for sake of windows, so we hard-link at configure time.
- `CodeGen.Platform.h` no longer as `.hs` extension (in addition to
being moved to `compiler/`) so as not to confuse anyone, since it is
next to Haskell files.
- Blanket `-Iincludes` is gone in both build systems, include paths now
more strictly respect per-package dependencies.
- `deriveConstants` has been taught to not require a `--target-os` flag
when generating the platform-agnostic Haskell type. Make takes
advantage of this, but Hadrian has yet to.
Diffstat (limited to 'compiler/GHC/Cmm')
-rw-r--r-- | compiler/GHC/Cmm/CLabel.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/Cmm/Info.hs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/GHC/Cmm/CLabel.hs b/compiler/GHC/Cmm/CLabel.hs index b6ad2b3431..723970e520 100644 --- a/compiler/GHC/Cmm/CLabel.hs +++ b/compiler/GHC/Cmm/CLabel.hs @@ -307,7 +307,7 @@ isTickyLabel _ = False -- label (e.g. "extern StgWordArray(foo)"). The type is fixed to StgWordArray. -- -- Symbols from the RTS don't need "extern" declarations because they are --- exposed via "includes/Stg.h" with the appropriate type. See 'needsCDecl'. +-- exposed via "rts/include/Stg.h" with the appropriate type. See 'needsCDecl'. -- -- The fixed StgWordArray type led to "conflicting types" issues with user -- provided Cmm files (not in the RTS) that declare data of another type (#15467 @@ -659,7 +659,7 @@ mkCmmDataLabel pkg ext str = CmmLabel pkg ext str CmmData mkRtsCmmDataLabel str = CmmLabel rtsUnitId (NeedExternDecl False) str CmmData -- RTS symbols don't need "GHC.CmmToC" to -- generate \"extern\" declaration (they are - -- exposed via includes/Stg.h) + -- exposed via rts/include/Stg.h) mkLocalBlockLabel :: Unique -> CLabel mkLocalBlockLabel u = LocalBlockLabel u @@ -935,7 +935,7 @@ needsCDecl (CmmLabel pkgId (NeedExternDecl external) _ _) | not external = False -- Prototypes for labels defined in the runtime system are imported - -- into HC files via includes/Stg.h. + -- into HC files via rts/include/Stg.h. | pkgId == rtsUnitId = False -- For other labels we inline one into the HC file directly. diff --git a/compiler/GHC/Cmm/Info.hs b/compiler/GHC/Cmm/Info.hs index 1c6dc351b8..d0397c8172 100644 --- a/compiler/GHC/Cmm/Info.hs +++ b/compiler/GHC/Cmm/Info.hs @@ -98,7 +98,7 @@ cmmToRawCmm logger profile cmms -- <normal forward rest of StgInfoTable> -- <forward variable part> -- --- See includes/rts/storage/InfoTables.h +-- See rts/include/rts/storage/InfoTables.h -- -- For return-points these are as follows -- @@ -371,7 +371,7 @@ mkLivenessBits platform liveness lits = mkWordCLit platform (fromIntegral n_bits) : map (mkStgWordCLit platform) bitmap -- The first word is the size. The structure must match - -- StgLargeBitmap in includes/rts/storage/InfoTable.h + -- StgLargeBitmap in rts/include/rts/storage/InfoTable.h ------------------------------------------------------------------------- -- @@ -381,7 +381,7 @@ mkLivenessBits platform liveness -- The standard bits of an info table. This part of the info table -- corresponds to the StgInfoTable type defined in --- includes/rts/storage/InfoTables.h. +-- rts/include/rts/storage/InfoTables.h. -- -- Its shape varies with ticky/profiling/tables next to code etc -- so we can't use constant offsets from Constants |