summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-07-22 07:26:47 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-08-09 15:11:58 -0400
commitd5de970dafd5876ef30601697576167f56b9c132 (patch)
treecb2ccf4bc4c13e39e211beb60915d7bb4ccc477d
parentfc350dba63da7eefbaa2793fe9fe99f8571b75c0 (diff)
downloadhaskell-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.
-rw-r--r--.gitignore11
-rw-r--r--CODEOWNERS8
-rw-r--r--compiler/CodeGen.Platform.h (renamed from includes/CodeGen.Platform.hs)2
-rw-r--r--compiler/GHC/ByteCode/Asm.hs2
-rw-r--r--compiler/GHC/Cmm/CLabel.hs6
-rw-r--r--compiler/GHC/Cmm/Info.hs6
-rw-r--r--compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs2
-rw-r--r--compiler/GHC/CmmToAsm/SPARC/Regs.hs2
-rw-r--r--compiler/GHC/CmmToAsm/X86/Ppr.hs2
-rw-r--r--compiler/GHC/CmmToC.hs2
-rw-r--r--compiler/GHC/Platform.hs2
-rw-r--r--compiler/GHC/Platform/AArch64.hs2
-rw-r--r--compiler/GHC/Platform/ARM.hs2
-rw-r--r--compiler/GHC/Platform/NoRegs.hs2
-rw-r--r--compiler/GHC/Platform/PPC.hs2
-rw-r--r--compiler/GHC/Platform/RISCV64.hs2
-rw-r--r--compiler/GHC/Platform/S390X.hs2
-rw-r--r--compiler/GHC/Platform/SPARC.hs2
-rw-r--r--compiler/GHC/Platform/X86.hs2
-rw-r--r--compiler/GHC/Platform/X86_64.hs2
-rw-r--r--compiler/GHC/Runtime/Heap/Layout.hs6
-rw-r--r--compiler/GHC/StgToCmm/ArgRep.hs6
-rw-r--r--compiler/GHC/StgToCmm/Layout.hs2
-rw-r--r--compiler/GHC/StgToCmm/Ticky.hs8
-rw-r--r--compiler/GHC/StgToCmm/Utils.hs4
-rw-r--r--compiler/GHC/SysTools/BaseDir.hs4
-rw-r--r--compiler/ghc.cabal.in22
-rw-r--r--compiler/ghc.mk5
-rw-r--r--configure.ac14
-rw-r--r--docs/coding-style.html4
-rw-r--r--docs/storage-mgt/ldv.tex18
-rw-r--r--docs/storage-mgt/rp.tex38
-rw-r--r--docs/storage-mgt/sm.tex6
-rw-r--r--ghc.mk12
-rw-r--r--hadrian/src/Rules/Lint.hs9
-rw-r--r--hadrian/src/Settings/Builders/Cabal.hs3
-rw-r--r--hadrian/src/Settings/Builders/Common.hs2
-rw-r--r--hadrian/src/Settings/Builders/DeriveConstants.hs2
-rw-r--r--hadrian/src/Settings/Builders/HsCpp.hs2
-rw-r--r--libraries/base/GHC/Conc/Sync.hs2
-rw-r--r--libraries/base/GHC/ExecutionStack/Internal.hsc2
-rw-r--r--libraries/base/cbits/inputReady.c4
-rw-r--r--libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs2
-rw-r--r--libraries/ghc-heap/GHC/Exts/Heap/Closures.hs2
-rw-r--r--libraries/ghc-heap/GHC/Exts/Heap/InfoTable/Types.hsc2
-rw-r--r--libraries/ghc-heap/GHC/Exts/Heap/ProfInfo/Types.hs8
-rw-r--r--libraries/ghci/GHCi/InfoTable.hsc2
-rw-r--r--mk/config.mk.in2
-rw-r--r--mk/tree.mk2
-rw-r--r--rts/.tsan-suppressions2
-rw-r--r--rts/AdjustorAsm.S2
-rw-r--r--rts/Capability.h4
-rw-r--r--rts/LdvProfile.c2
-rw-r--r--rts/Printer.c2
-rw-r--r--rts/RetainerProfile.c2
-rw-r--r--rts/RtsSymbols.c2
-rw-r--r--rts/Schedule.c2
-rw-r--r--rts/Schedule.h2
-rw-r--r--rts/StgCRun.c2
-rw-r--r--rts/StgPrimFloat.h2
-rw-r--r--rts/include/.dir-locals.el (renamed from includes/.dir-locals.el)0
-rw-r--r--rts/include/Cmm.h (renamed from includes/Cmm.h)0
-rw-r--r--rts/include/HsFFI.h (renamed from includes/HsFFI.h)0
-rw-r--r--rts/include/MachDeps.h (renamed from includes/MachDeps.h)0
-rw-r--r--rts/include/Makefile (renamed from includes/Makefile)4
-rw-r--r--rts/include/Rts.h (renamed from includes/Rts.h)0
-rw-r--r--rts/include/RtsAPI.h (renamed from includes/RtsAPI.h)0
-rw-r--r--rts/include/Stg.h (renamed from includes/Stg.h)0
-rw-r--r--rts/include/ghc.mk (renamed from includes/ghc.mk)49
-rw-r--r--rts/include/ghcconfig.h (renamed from includes/ghcconfig.h)0
-rw-r--r--rts/include/rts/Adjustor.h (renamed from includes/rts/Adjustor.h)0
-rw-r--r--rts/include/rts/BlockSignals.h (renamed from includes/rts/BlockSignals.h)0
-rw-r--r--rts/include/rts/Bytecodes.h (renamed from includes/rts/Bytecodes.h)0
-rw-r--r--rts/include/rts/Config.h (renamed from includes/rts/Config.h)0
-rw-r--r--rts/include/rts/Constants.h (renamed from includes/rts/Constants.h)0
-rw-r--r--rts/include/rts/EventLogFormat.h (renamed from includes/rts/EventLogFormat.h)2
-rw-r--r--rts/include/rts/EventLogWriter.h (renamed from includes/rts/EventLogWriter.h)0
-rw-r--r--rts/include/rts/ExecPage.h (renamed from includes/rts/ExecPage.h)0
-rw-r--r--rts/include/rts/FileLock.h (renamed from includes/rts/FileLock.h)0
-rw-r--r--rts/include/rts/Flags.h (renamed from includes/rts/Flags.h)0
-rw-r--r--rts/include/rts/ForeignExports.h (renamed from includes/rts/ForeignExports.h)0
-rw-r--r--rts/include/rts/GetTime.h (renamed from includes/rts/GetTime.h)0
-rw-r--r--rts/include/rts/Globals.h (renamed from includes/rts/Globals.h)0
-rw-r--r--rts/include/rts/Hpc.h (renamed from includes/rts/Hpc.h)0
-rw-r--r--rts/include/rts/IOInterface.h (renamed from includes/rts/IOInterface.h)0
-rw-r--r--rts/include/rts/IPE.h (renamed from includes/rts/IPE.h)0
-rw-r--r--rts/include/rts/Libdw.h (renamed from includes/rts/Libdw.h)0
-rw-r--r--rts/include/rts/LibdwPool.h (renamed from includes/rts/LibdwPool.h)0
-rw-r--r--rts/include/rts/Linker.h (renamed from includes/rts/Linker.h)0
-rw-r--r--rts/include/rts/Main.h (renamed from includes/rts/Main.h)0
-rw-r--r--rts/include/rts/Messages.h (renamed from includes/rts/Messages.h)0
-rw-r--r--rts/include/rts/NonMoving.h (renamed from includes/rts/NonMoving.h)2
-rw-r--r--rts/include/rts/OSThreads.h (renamed from includes/rts/OSThreads.h)0
-rw-r--r--rts/include/rts/Parallel.h (renamed from includes/rts/Parallel.h)0
-rw-r--r--rts/include/rts/PosixSource.h (renamed from includes/rts/PosixSource.h)0
-rw-r--r--rts/include/rts/PrimFloat.h (renamed from includes/rts/PrimFloat.h)0
-rw-r--r--rts/include/rts/Profiling.h (renamed from includes/rts/Profiling.h)0
-rw-r--r--rts/include/rts/Signals.h (renamed from includes/rts/Signals.h)0
-rw-r--r--rts/include/rts/SpinLock.h (renamed from includes/rts/SpinLock.h)0
-rw-r--r--rts/include/rts/StableName.h (renamed from includes/rts/StableName.h)0
-rw-r--r--rts/include/rts/StablePtr.h (renamed from includes/rts/StablePtr.h)0
-rw-r--r--rts/include/rts/StaticPtrTable.h (renamed from includes/rts/StaticPtrTable.h)0
-rw-r--r--rts/include/rts/TSANUtils.h (renamed from includes/rts/TSANUtils.h)0
-rw-r--r--rts/include/rts/TTY.h (renamed from includes/rts/TTY.h)0
-rw-r--r--rts/include/rts/Threads.h (renamed from includes/rts/Threads.h)0
-rw-r--r--rts/include/rts/Ticky.h (renamed from includes/rts/Ticky.h)0
-rw-r--r--rts/include/rts/Time.h (renamed from includes/rts/Time.h)0
-rw-r--r--rts/include/rts/Timer.h (renamed from includes/rts/Timer.h)0
-rw-r--r--rts/include/rts/Types.h (renamed from includes/rts/Types.h)0
-rw-r--r--rts/include/rts/Utils.h (renamed from includes/rts/Utils.h)0
-rw-r--r--rts/include/rts/prof/CCS.h (renamed from includes/rts/prof/CCS.h)0
-rw-r--r--rts/include/rts/prof/Heap.h (renamed from includes/rts/prof/Heap.h)0
-rw-r--r--rts/include/rts/prof/LDV.h (renamed from includes/rts/prof/LDV.h)0
-rw-r--r--rts/include/rts/storage/Block.h (renamed from includes/rts/storage/Block.h)2
-rw-r--r--rts/include/rts/storage/ClosureMacros.h (renamed from includes/rts/storage/ClosureMacros.h)0
-rw-r--r--rts/include/rts/storage/ClosureTypes.h (renamed from includes/rts/storage/ClosureTypes.h)0
-rw-r--r--rts/include/rts/storage/Closures.h (renamed from includes/rts/storage/Closures.h)0
-rw-r--r--rts/include/rts/storage/FunTypes.h (renamed from includes/rts/storage/FunTypes.h)0
-rw-r--r--rts/include/rts/storage/GC.h (renamed from includes/rts/storage/GC.h)0
-rw-r--r--rts/include/rts/storage/Heap.h (renamed from includes/rts/storage/Heap.h)0
-rw-r--r--rts/include/rts/storage/InfoTables.h (renamed from includes/rts/storage/InfoTables.h)0
-rw-r--r--rts/include/rts/storage/MBlock.h (renamed from includes/rts/storage/MBlock.h)0
-rw-r--r--rts/include/rts/storage/TSO.h (renamed from includes/rts/storage/TSO.h)0
-rw-r--r--rts/include/stg/DLL.h (renamed from includes/stg/DLL.h)2
-rw-r--r--rts/include/stg/MachRegs.h (renamed from includes/stg/MachRegs.h)0
-rw-r--r--rts/include/stg/MachRegsForHost.h (renamed from includes/stg/MachRegsForHost.h)0
-rw-r--r--rts/include/stg/MiscClosures.h (renamed from includes/stg/MiscClosures.h)2
-rw-r--r--rts/include/stg/Prim.h (renamed from includes/stg/Prim.h)0
-rw-r--r--rts/include/stg/Regs.h (renamed from includes/stg/Regs.h)0
-rw-r--r--rts/include/stg/SMP.h (renamed from includes/stg/SMP.h)2
-rw-r--r--rts/include/stg/Ticky.h (renamed from includes/stg/Ticky.h)0
-rw-r--r--rts/include/stg/Types.h (renamed from includes/stg/Types.h)0
-rw-r--r--rts/package.conf.in6
-rw-r--r--rts/rts.cabal.in9
-rw-r--r--rts/sm/Compact.h2
-rw-r--r--rules/build-prog.mk4
-rw-r--r--testsuite/tests/codeGen/should_compile/cg007.hs2
-rw-r--r--testsuite/tests/llvm/should_run/subsections_via_symbols/Makefile2
-rw-r--r--utils/deriveConstants/Main.hs16
-rw-r--r--utils/deriveConstants/deriveConstants.cabal2
-rw-r--r--utils/genapply/Main.hs10
141 files changed, 216 insertions, 184 deletions
diff --git a/.gitignore b/.gitignore
index 6d518555ce..e4c0104b3f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -75,14 +75,14 @@ _darcs/
/driver/ghc/dist/
/driver/haddock/dist/
/driver/ghci/dist/
-/includes/dist/
-/includes/dist-*/
/libffi/dist-install/
/libraries/*/dist-boot/
/libraries/*/dist-install/
/libraries/*/dist-newstyle/
/libraries/dist-haddock/
/rts/dist/
+/rts/include/dist/
+/rts/include/dist-*/
/utils/*/dist*/
/compiler/stage1/
/compiler/stage2/
@@ -104,6 +104,11 @@ _darcs/
/ch01.html
/ch02.html
/compiler/dist/
+/compiler/Bytecodes.h
+/compiler/ClosureTypes.h
+/compiler/FunTypes.h
+/compiler/MachDeps.h
+/compiler/MachRegs.h
/compiler/ghc.cabal
/compiler/ghc.cabal.old
/distrib/configure.ac
@@ -139,7 +144,6 @@ _darcs/
/settings
/ghc.spec
/ghc/ghc-bin.cabal
-/includes/dist/
/index.html
/inplace/
/libffi/build/
@@ -184,6 +188,7 @@ _darcs/
/mk/project.mk
/mk/project.mk.old
/mk/validate.mk
+/rts/include/dist/
/rts/rts.cabal
/rts/package.conf.inplace
/rts/package.conf.inplace.raw
diff --git a/CODEOWNERS b/CODEOWNERS
index c1429a0ded..4f71e6464a 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -13,13 +13,13 @@
[RTS-like things]
/rts/ @bgamari @simonmar @osa1 @Phyx @angerman
/rts/linker/ @angerman @Phyx @simonmar
-/includes/ @bgamari @simonmar @osa1
+/rts/include/ @bgamari @simonmar @osa1
[RTS heap profiling]
/docs/users_guide/profiling.rst @DanielG
-/includes/rts/ProfHeap.h @DanielG
-/includes/rts/TraverseHeap.h @DanielG
-/includes/rts/storage/ClosureMacros.h @DanielG
+/rts/include/rts/ProfHeap.h @DanielG
+/rts/include/rts/TraverseHeap.h @DanielG
+/rts/include/rts/storage/ClosureMacros.h @DanielG
/rts/LdvProfile* @DanielG
/rts/ProfHeap* @DanielG
/rts/Retainer* @DanielG
diff --git a/includes/CodeGen.Platform.hs b/compiler/CodeGen.Platform.h
index 0dfac62a3f..721648a900 100644
--- a/includes/CodeGen.Platform.hs
+++ b/compiler/CodeGen.Platform.h
@@ -7,7 +7,7 @@ import GHC.Utils.Panic.Plain
#endif
import GHC.Platform.Reg
-#include "stg/MachRegs.h"
+#include "MachRegs.h"
#if defined(MACHREGS_i386) || defined(MACHREGS_x86_64)
diff --git a/compiler/GHC/ByteCode/Asm.hs b/compiler/GHC/ByteCode/Asm.hs
index 6ef6ef474c..da03d2a903 100644
--- a/compiler/GHC/ByteCode/Asm.hs
+++ b/compiler/GHC/ByteCode/Asm.hs
@@ -340,7 +340,7 @@ inspectAsm platform long_jumps initial_offset
-- count (LargeOp _) = largeArg16s platform
-- Bring in all the bci_ bytecode constants.
-#include "rts/Bytecodes.h"
+#include "Bytecodes.h"
largeArgInstr :: Word16 -> Word16
largeArgInstr bci = bci_FLAG_LARGE_ARGS .|. bci
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
diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs b/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
index 83f581cac4..cd4208bc89 100644
--- a/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
+++ b/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
@@ -40,7 +40,7 @@ import GHC.Utils.Panic
-- TODO: Is that still true? Could we use allocatableRegsInClass
-- without losing performance now?
--
--- Look at includes/stg/MachRegs.h to get the numbers.
+-- Look at rts/include/stg/MachRegs.h to get the numbers.
--
diff --git a/compiler/GHC/CmmToAsm/SPARC/Regs.hs b/compiler/GHC/CmmToAsm/SPARC/Regs.hs
index 949701cf2d..0325814c6b 100644
--- a/compiler/GHC/CmmToAsm/SPARC/Regs.hs
+++ b/compiler/GHC/CmmToAsm/SPARC/Regs.hs
@@ -50,7 +50,7 @@ import GHC.Utils.Panic
prepared for any eventuality.
The whole fp-register pairing thing on sparcs is a huge nuisance. See
- includes/stg/MachRegs.h for a description of what's going on
+ rts/include/stg/MachRegs.h for a description of what's going on
here.
-}
diff --git a/compiler/GHC/CmmToAsm/X86/Ppr.hs b/compiler/GHC/CmmToAsm/X86/Ppr.hs
index 5f030b8d58..e284e618da 100644
--- a/compiler/GHC/CmmToAsm/X86/Ppr.hs
+++ b/compiler/GHC/CmmToAsm/X86/Ppr.hs
@@ -555,7 +555,7 @@ pprDataItem config lit
-- to 32-bit offset fields and modify the RTS
-- appropriately
--
- -- See Note [x86-64-relative] in includes/rts/storage/InfoTables.h
+ -- See Note [x86-64-relative] in rts/include/rts/storage/InfoTables.h
--
case lit of
-- A relative relocation:
diff --git a/compiler/GHC/CmmToC.hs b/compiler/GHC/CmmToC.hs
index b49fccbd95..3008f01c5c 100644
--- a/compiler/GHC/CmmToC.hs
+++ b/compiler/GHC/CmmToC.hs
@@ -905,7 +905,7 @@ mkJMP_ i = text "JMP_" <> parens i
mkFN_ i = text "FN_" <> parens i -- externally visible function
mkIF_ i = text "IF_" <> parens i -- locally visible
--- from includes/Stg.h
+-- from rts/include/Stg.h
--
mkC_,mkW_,mkP_ :: SDoc
diff --git a/compiler/GHC/Platform.hs b/compiler/GHC/Platform.hs
index 70c8f9b658..b3f5bf830c 100644
--- a/compiler/GHC/Platform.hs
+++ b/compiler/GHC/Platform.hs
@@ -73,7 +73,7 @@ data Platform = Platform
, platformTablesNextToCode :: !Bool
-- ^ Determines whether we will be compiling info tables that reside just
-- before the entry code, or with an indirection to the entry code. See
- -- TABLES_NEXT_TO_CODE in includes/rts/storage/InfoTables.h.
+ -- TABLES_NEXT_TO_CODE in rts/include/rts/storage/InfoTables.h.
, platform_constants :: !(Maybe PlatformConstants)
-- ^ Constants such as structure offsets, type sizes, etc.
}
diff --git a/compiler/GHC/Platform/AArch64.hs b/compiler/GHC/Platform/AArch64.hs
index 4e6a6bc230..5d8e044969 100644
--- a/compiler/GHC/Platform/AArch64.hs
+++ b/compiler/GHC/Platform/AArch64.hs
@@ -6,4 +6,4 @@ import GHC.Prelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_aarch64 1
-#include "../../../includes/CodeGen.Platform.hs"
+#include "CodeGen.Platform.h"
diff --git a/compiler/GHC/Platform/ARM.hs b/compiler/GHC/Platform/ARM.hs
index d1e2d9d312..df2210033a 100644
--- a/compiler/GHC/Platform/ARM.hs
+++ b/compiler/GHC/Platform/ARM.hs
@@ -6,5 +6,5 @@ import GHC.Prelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_arm 1
-#include "../../../includes/CodeGen.Platform.hs"
+#include "CodeGen.Platform.h"
diff --git a/compiler/GHC/Platform/NoRegs.hs b/compiler/GHC/Platform/NoRegs.hs
index c00f4cb7ff..27c1ec5b02 100644
--- a/compiler/GHC/Platform/NoRegs.hs
+++ b/compiler/GHC/Platform/NoRegs.hs
@@ -5,5 +5,5 @@ module GHC.Platform.NoRegs where
import GHC.Prelude
#define MACHREGS_NO_REGS 1
-#include "../../../includes/CodeGen.Platform.hs"
+#include "CodeGen.Platform.h"
diff --git a/compiler/GHC/Platform/PPC.hs b/compiler/GHC/Platform/PPC.hs
index 5b4f3bfb14..86da0e4b05 100644
--- a/compiler/GHC/Platform/PPC.hs
+++ b/compiler/GHC/Platform/PPC.hs
@@ -6,5 +6,5 @@ import GHC.Prelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_powerpc 1
-#include "../../../includes/CodeGen.Platform.hs"
+#include "CodeGen.Platform.h"
diff --git a/compiler/GHC/Platform/RISCV64.hs b/compiler/GHC/Platform/RISCV64.hs
index 88754d4838..899776921f 100644
--- a/compiler/GHC/Platform/RISCV64.hs
+++ b/compiler/GHC/Platform/RISCV64.hs
@@ -6,5 +6,5 @@ import GHC.Prelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_riscv64 1
-#include "../../../includes/CodeGen.Platform.hs"
+#include "CodeGen.Platform.h"
diff --git a/compiler/GHC/Platform/S390X.hs b/compiler/GHC/Platform/S390X.hs
index 709d2db101..660844216e 100644
--- a/compiler/GHC/Platform/S390X.hs
+++ b/compiler/GHC/Platform/S390X.hs
@@ -6,5 +6,5 @@ import GHC.Prelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_s390x 1
-#include "../../../includes/CodeGen.Platform.hs"
+#include "CodeGen.Platform.h"
diff --git a/compiler/GHC/Platform/SPARC.hs b/compiler/GHC/Platform/SPARC.hs
index b1dad08837..d0ab5fe41a 100644
--- a/compiler/GHC/Platform/SPARC.hs
+++ b/compiler/GHC/Platform/SPARC.hs
@@ -6,5 +6,5 @@ import GHC.Prelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_sparc 1
-#include "../../../includes/CodeGen.Platform.hs"
+#include "CodeGen.Platform.h"
diff --git a/compiler/GHC/Platform/X86.hs b/compiler/GHC/Platform/X86.hs
index e065036f61..24b4ca8ab6 100644
--- a/compiler/GHC/Platform/X86.hs
+++ b/compiler/GHC/Platform/X86.hs
@@ -6,5 +6,5 @@ import GHC.Prelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_i386 1
-#include "../../../includes/CodeGen.Platform.hs"
+#include "CodeGen.Platform.h"
diff --git a/compiler/GHC/Platform/X86_64.hs b/compiler/GHC/Platform/X86_64.hs
index 27c4232975..5911bd37e7 100644
--- a/compiler/GHC/Platform/X86_64.hs
+++ b/compiler/GHC/Platform/X86_64.hs
@@ -6,5 +6,5 @@ import GHC.Prelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_x86_64 1
-#include "../../../includes/CodeGen.Platform.hs"
+#include "CodeGen.Platform.h"
diff --git a/compiler/GHC/Runtime/Heap/Layout.hs b/compiler/GHC/Runtime/Heap/Layout.hs
index 51f209f6b6..1195f83937 100644
--- a/compiler/GHC/Runtime/Heap/Layout.hs
+++ b/compiler/GHC/Runtime/Heap/Layout.hs
@@ -181,7 +181,7 @@ data SMRep
type IsStatic = Bool
-- From an SMRep you can get to the closure type defined in
--- includes/rts/storage/ClosureTypes.h. Described by the function
+-- rts/include/rts/storage/ClosureTypes.h. Described by the function
-- rtsClosureType below.
data ClosureTypeInfo
@@ -404,8 +404,8 @@ cardTableSizeW platform elems =
-----------------------------------------------------------------------------
-- deriving the RTS closure type from an SMRep
-#include "../includes/rts/storage/ClosureTypes.h"
-#include "../includes/rts/storage/FunTypes.h"
+#include "ClosureTypes.h"
+#include "FunTypes.h"
-- Defines CONSTR, CONSTR_1_0 etc
-- | Derives the RTS closure type from an 'SMRep'
diff --git a/compiler/GHC/StgToCmm/ArgRep.hs b/compiler/GHC/StgToCmm/ArgRep.hs
index 2ec0e177e8..cc618a16ed 100644
--- a/compiler/GHC/StgToCmm/ArgRep.hs
+++ b/compiler/GHC/StgToCmm/ArgRep.hs
@@ -120,11 +120,11 @@ idArgRep platform = toArgRep platform . idPrimRep
-- * GHC.StgToCmm.Layout.stdPattern maybe to some degree?
--
-- * the RTS_RET(stg_ap_*) and RTS_FUN_DECL(stg_ap_*_fast)
--- declarations in includes/stg/MiscClosures.h
+-- declarations in rts/include/stg/MiscClosures.h
--
--- * the SLOW_CALL_*_ctr declarations in includes/stg/Ticky.h,
+-- * the SLOW_CALL_*_ctr declarations in rts/include/stg/Ticky.h,
--
--- * the TICK_SLOW_CALL_*() #defines in includes/Cmm.h,
+-- * the TICK_SLOW_CALL_*() #defines in rts/include/Cmm.h,
--
-- * the PR_CTR(SLOW_CALL_*_ctr) calls in rts/Ticky.c,
--
diff --git a/compiler/GHC/StgToCmm/Layout.hs b/compiler/GHC/StgToCmm/Layout.hs
index eeae70f747..0a74291ebd 100644
--- a/compiler/GHC/StgToCmm/Layout.hs
+++ b/compiler/GHC/StgToCmm/Layout.hs
@@ -541,7 +541,7 @@ mkVirtConstrSizes profile field_reps
-------------------------------------------------------------------------
-- bring in ARG_P, ARG_N, etc.
-#include "../includes/rts/storage/FunTypes.h"
+#include "FunTypes.h"
mkArgDescr :: Platform -> [Id] -> ArgDescr
mkArgDescr platform args
diff --git a/compiler/GHC/StgToCmm/Ticky.hs b/compiler/GHC/StgToCmm/Ticky.hs
index 76748f2b0d..1317dcbe17 100644
--- a/compiler/GHC/StgToCmm/Ticky.hs
+++ b/compiler/GHC/StgToCmm/Ticky.hs
@@ -29,12 +29,12 @@ Some of the relevant source files:
* GHC.Cmm.Parser expands some macros using generators defined in
this module
- * includes/stg/Ticky.h declares all of the global counters
+ * rts/include/stg/Ticky.h declares all of the global counters
- * includes/rts/Ticky.h declares the C data type for an
+ * rts/include/rts/Ticky.h declares the C data type for an
STG-declaration's counters
- * some macros defined in includes/Cmm.h (and used within the RTS's
+ * some macros defined in rts/include/Cmm.h (and used within the RTS's
CMM code) update the global ticky counters
* at the end of execution rts/Ticky.c generates the final report
@@ -247,7 +247,7 @@ emitTickyCounter cloType name args
; fun_descr_lit <- newStringCLit $ renderWithContext ctx ppr_for_ticky_name
; arg_descr_lit <- newStringCLit $ map (showTypeCategory . idType . fromNonVoid) args
; emitDataLits ctr_lbl
- -- Must match layout of includes/rts/Ticky.h's StgEntCounter
+ -- Must match layout of rts/include/rts/Ticky.h's StgEntCounter
--
-- krc: note that all the fields are I32 now; some were I16
-- before, but the code generator wasn't handling that
diff --git a/compiler/GHC/StgToCmm/Utils.hs b/compiler/GHC/StgToCmm/Utils.hs
index a1b13e2e8d..4913bbd3ce 100644
--- a/compiler/GHC/StgToCmm/Utils.hs
+++ b/compiler/GHC/StgToCmm/Utils.hs
@@ -198,7 +198,7 @@ emitRtsCallGen res lbl args safe
-- Here we generate the sequence of saves/restores required around a
-- foreign call instruction.
--- TODO: reconcile with includes/Regs.h
+-- TODO: reconcile with rts/include/Regs.h
-- * Regs.h claims that BaseReg should be saved last and loaded first
-- * This might not have been tickled before since BaseReg is callee save
-- * Regs.h saves SparkHd, ParkT1, SparkBase and SparkLim
@@ -206,7 +206,7 @@ emitRtsCallGen res lbl args safe
-- This code isn't actually used right now, because callerSaves
-- only ever returns true in the current universe for registers NOT in
-- system_regs (just do a grep for CALLER_SAVES in
--- includes/stg/MachRegs.h). It's all one giant no-op, and for
+-- rts/include/stg/MachRegs.h). It's all one giant no-op, and for
-- good reason: having to save system registers on every foreign call
-- would be very expensive, so we avoid assigning them to those
-- registers when we add support for an architecture.
diff --git a/compiler/GHC/SysTools/BaseDir.hs b/compiler/GHC/SysTools/BaseDir.hs
index ad16fac025..03169523c6 100644
--- a/compiler/GHC/SysTools/BaseDir.hs
+++ b/compiler/GHC/SysTools/BaseDir.hs
@@ -100,7 +100,7 @@ make)
set in `aclocal.m4`. This allows the rest of the build system to have access
to these and other values determined by configure.
- Based on this file, `includes/ghc.mk` when ran will produce the settings file
+ Based on this file, `rts/include/ghc.mk` when ran will produce the settings file
by echoing the values into a the final file. Coincidentally this is also
where `ghcplatform.h` and `ghcversion.h` generated which contains information
about the build platform and sets CPP for use by the entire build.
@@ -118,7 +118,7 @@ hadrian)
The last part of this is the `generateSettings` in `src/Rules/Generate.hs`
which produces the desired settings file out of Hadrian. This is the
- equivalent to `includes/ghc.mk`.
+ equivalent to `rts/include/ghc.mk`.
--
diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in
index e9993e7776..2520576498 100644
--- a/compiler/ghc.cabal.in
+++ b/compiler/ghc.cabal.in
@@ -23,6 +23,19 @@ Category: Development
Build-Type: Simple
Cabal-Version: >=1.10
+extra-source-files:
+ Unique.h
+ CodeGen.Platform.h
+ -- Shared with rts via hard-link at configure time. This is safer
+ -- for Windows, where symlinks don't work out of the box, so we
+ -- can't just commit some in git.
+ Bytecodes.h
+ ClosureTypes.h
+ FunTypes.h
+ MachRegs.h
+ -- Target sensative, should not be used.
+ MachDeps.h
+
Flag internal-interpreter
Description: Build with internal interpreter support.
Default: False
@@ -56,6 +69,15 @@ Flag dynamic-system-linker
Library
Default-Language: Haskell2010
Exposed: False
+ Includes: Unique.h
+ -- CodeGen.Platform.h -- invalid as C, skip
+ -- shared with rts via symlink
+ Bytecodes.h
+ ClosureTypes.h
+ FunTypes.h
+ -- MachRegs.h -- hits #error, skip
+ -- target sensative, should not be used
+ MachDeps.h
Build-Depends: base >= 4.11 && < 4.17,
deepseq >= 1.4 && < 1.5,
diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 7766482509..08004b1c5c 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -93,9 +93,8 @@ compiler/stage$1/build/GHC/Settings/Config.hs : mk/config.mk mk/project.mk | $$$
@echo 'cStage = show ($1 :: Int)' >> $$@
@echo done.
-compiler/stage$1/build/GHC/Platform/Constants.hs : $$(includes_GHCCONSTANTS_HASKELL_TYPE) | $$$$(dir $$$$@)/.
- $$(call removeFiles,$$@)
- "$$(CP)" $$< $$@
+compiler/stage$1/build/GHC/Platform/Constants.hs : $$(deriveConstants_INPLACE) | $$$$(dir $$$$@)/.
+ $$< --gen-haskell-type -o $$@
endef
$(eval $(call compilerConfig,0))
diff --git a/configure.ac b/configure.ac
index 7563ed5af9..da7598d621 100644
--- a/configure.ac
+++ b/configure.ac
@@ -770,6 +770,18 @@ dnl --------------------------------------------------------------
dnl End of configure script option section
dnl --------------------------------------------------------------
+dnl ** Copy headers shared by the RTS and compiler
+dnl --------------------------------------------------------------
+dnl We can't commit symlinks without breaking Windows in the default
+dnl configuration.
+AC_MSG_NOTICE([Creating links for headers shared by the RTS and compiler])
+ln -f rts/include/rts/Bytecodes.h compiler/
+ln -f rts/include/rts/storage/ClosureTypes.h compiler/
+ln -f rts/include/rts/storage/FunTypes.h compiler/
+ln -f rts/include/MachDeps.h compiler/
+ln -f rts/include/stg/MachRegs.h compiler/
+AC_MSG_NOTICE([done.])
+
dnl ** Copy the files from the "fs" utility into the right folders.
dnl --------------------------------------------------------------
AC_MSG_NOTICE([Creating links for in-tree file handling routines])
@@ -1222,7 +1234,7 @@ AC_COMPILE_IFELSE(
AC_DEFINE([CC_SUPPORTS_TLS],[0],[Define to 1 if __thread is supported])
])
-dnl large address space support (see includes/rts/storage/MBlock.h)
+dnl large address space support (see rts/include/rts/storage/MBlock.h)
dnl
dnl Darwin has vm_allocate/vm_protect
dnl Linux has mmap(MAP_NORESERVE)/madv(MADV_DONTNEED)
diff --git a/docs/coding-style.html b/docs/coding-style.html
index 5c84b3a27e..29112bf60f 100644
--- a/docs/coding-style.html
+++ b/docs/coding-style.html
@@ -11,7 +11,7 @@
<h2>Comments</h2>
<p>These coding style guidelines are mainly intended for use in
-<tt>ghc/rts</tt> and <tt>ghc/includes</tt>.
+<tt>rts</tt>.
<p>NB These are just suggestions. They're not set in stone. Some of
them are probably misguided. If you disagree with them, feel free to
@@ -207,7 +207,7 @@ the RTS is currently enabled with the <tt>-DS</tt> RTS flag.
sanity checking in various parts of the system when <tt>DEBUG</tt> is
defined. For example, to get the scheduler to be verbose about what
it is doing, you would say <tt>+RTS -Ds -RTS</tt>. See
-<tt>includes/RtsFlags.h</tt> and <tt>rts/RtsFlags.c</tt> for the full
+<tt>rts/include/RtsFlags.h</tt> and <tt>rts/RtsFlags.c</tt> for the full
set of debugging flags. To check one of these flags in the code,
write:
diff --git a/docs/storage-mgt/ldv.tex b/docs/storage-mgt/ldv.tex
index ab2c8b9532..9084ae1ea4 100644
--- a/docs/storage-mgt/ldv.tex
+++ b/docs/storage-mgt/ldv.tex
@@ -100,7 +100,7 @@ all events associated with any closures and update necessary information.
All events associated with closures are handled by one of the three
macros defined
-in @includes/StgLdv.h@: @LDV_recordCreate()@, @LDV_recordUse()@, and
+in @rts/include/StgLdv.h@: @LDV_recordCreate()@, @LDV_recordUse()@, and
@LDV_recordDead()@.
\begin{itemize}
@@ -145,10 +145,10 @@ typedef struct {
\end{code}
For instance, the LDV word of a closure @c@ can now be accessed with
@c->header.prof.hp.ldvw@ (or by @LDVW(c)@ where @LDVW()@ is a macro in
-@includes/StgLdvProf.h@).
+@rts/include/StgLdvProf.h@).
An LDV word is divided into three fields, whose position is specified
-by three constants in @includes/StgLdvProf.h@:
+by three constants in @rts/include/StgLdvProf.h@:
\begin{itemize}
\item{@LDV_STATE_MASK@} corresponds to the state flag.
\item{@LDV_CREATE_MASK@} corresponds to the creation time.
@@ -163,7 +163,7 @@ The creation time field and the most recent use time field can be set only by th
macros @LDV_recordCreate()@ and @LDV_recordUse()@.
@LDV_recordCreate()@ must be called whenever a new dynamic closure is created,
and this is handily accomplished by rewriting the macro @SET_PROF_HDR()@
-(in @includes/ClosureMacros.h@) (we do not need to change @SET_STATIC_PROF_HDR()@
+(in @rts/include/ClosureMacros.h@) (we do not need to change @SET_STATIC_PROF_HDR()@
because static closures are not involved in LDVU profiling at all):
\begin{code}
@@ -388,7 +388,7 @@ There are four cases in which a closure is destroyed:
\begin{enumerate}
\item A closure is overwritten with a blackhole:
- @UPD_BH_UPDATABLE()@ in @includes/StgMacros.h@,
+ @UPD_BH_UPDATABLE()@ in @rts/include/StgMacros.h@,
@threadLazyBlackHole()@ and @threadSqueezeStack()@ in @GC.c@,
the entry code for @BLACKHOLE@ closures in @StgMiscClosures.hc@ (a
@BLACKHOLE@ closure is changed into a @BLACKHOLE_BQ@ closure).
@@ -500,7 +500,7 @@ size, we invoke @LDV_recordDead_FILL_SLOP_DYNAMIC()@ only from:
\item @threadLazyBlackHole()@ and @threadSqueezeStack()@ in @GC.c@
(for lazy blackholing),
\item @UPD_BH_UPDATABLE()@ in
-@includes/StgMacros.h@ (for eager blackholing, which isn't the
+@rts/include/StgMacros.h@ (for eager blackholing, which isn't the
default),
\item @updateWithIndirection()@ and @updateWithPermIndirection()@
in @Storage.h@.\footnote{Actually slop words created in
@@ -538,7 +538,7 @@ and no assumptions made upon LDVU profiling hold any longer.
In order to yield correct LDVU profiling results, we must make sure
that @LDV_recordUse()@ be called on a closure whenever it is used;
otherwise, most of closures would be reported to be in the void phase.
-@includes/StgLdvProf.h@ provides an entry macro @LDV_ENTER@ which
+@rts/include/StgLdvProf.h@ provides an entry macro @LDV_ENTER@ which
expands to @LDV_recordUse()@. The compiler arranges to invoke
@LDV_ENTER@ in the entry code for every dynamic closure it generates
code for (constructors, thunks and functions). We also have to add
@@ -629,10 +629,10 @@ are almost the same, though.
This section gives a summary of changes made to the GHC in
implementing LDVU profiling.
-Only three files (@includes/StgLdvProf.h@, @LdvProfile.c@, and
+Only three files (@rts/include/StgLdvProf.h@, @LdvProfile.c@, and
@LdvProfile.h@) are new, and all others exist in the GHC.
-@\includes@ directory:
+@\rts\include@ directory:
\begin{description}
\item[StgLdvProf.h] defines type @LdvGenInfo@, constants, and macros related
diff --git a/docs/storage-mgt/rp.tex b/docs/storage-mgt/rp.tex
index ced5c0cd4f..c0b7b5c904 100644
--- a/docs/storage-mgt/rp.tex
+++ b/docs/storage-mgt/rp.tex
@@ -212,21 +212,21 @@ directive as well unless otherwise mentioned.}
\subsection{Adding a new field to Haskell closures}
We want to add a retainer set field of type @retainerSet@ to every
-closure, so we create a new file @includes/StgRetainerProf.h@ where
+closure, so we create a new file @rts/include/StgRetainerProf.h@ where
we define the type @retainerSet@.
The actual definition of @retainerSet@ will be given later.
\begin{code}
-/* includes/StgRetainerProf.h */
+/* rts/include/StgRetainerProf.h */
typedef ... retainerSet;
\end{code}
We make type @retainerSet@ to be publicly available by including
-@includes/StgRetainerProf.h@ itself to @includes/Stg.h@ (not wrapped
+@rts/include/StgRetainerProf.h@ itself to @rts/include/Stg.h@ (not wrapped
by @PROFILING@).
\begin{code}
-/* includes/Stg.h */
+/* rts/include/Stg.h */
#include "StgRetainerProf.h"
\end{code}
@@ -254,14 +254,14 @@ of certain types of closures and their layout.
When building the runtime system, the @gcc@ compiler correctly figures out
the size of every structure on its own.
However,
-GHC simply reads @includes/Constants.h@ to determine the size of
+GHC simply reads @rts/include/Constants.h@ to determine the size of
closures assumed by the runtime system.
Thus, we must change the constants used by the GHC itself (as opposed to
-the runtime system). They are all found in @includes/Constants.h@.
+the runtime system). They are all found in @rts/include/Constants.h@.
We increase each of them by 1 to reflect the retainer set field which is one
word long:
\begin{code}
-/* includes/Constants.h */
+/* rts/include/Constants.h */
#define PROF_HDR_SIZE 2
#define SCC_UF_SIZE 5
#define SCC_SEQ_FRAME_SIZE 4
@@ -269,7 +269,7 @@ word long:
@PROF_HDR_SIZE@ denotes the size of the structure @StgProfHeader@, which
is now two words long.
@SCC_UF_SIZE@ and @SCC_SEQ_FRAME_SIZE@ denote the size of the structures
-@StgUpdateFrame@ and @StgSeqFrame@ (in @includes/Closures.h@) in
+@StgUpdateFrame@ and @StgSeqFrame@ (in @rts/include/Closures.h@) in
words.
Now we must rebuild the GHC so that, when executed, the code generated by
@@ -404,10 +404,10 @@ Finally we may need to initialize the retainer set field of an update frame
(stack closure) when it is pushed onto the stack for the first time.
For instance, if we want to initialize the retainer set field of update
frames to a null pointer, we can rewrite the macro @PUSH_STD_CCCS()@
-(in @includes/Updates.h@) as follows:
+(in @rts/include/Updates.h@) as follows:
\begin{code}
-/* includes/Updates.h */
+/* rts/include/Updates.h */
#define PUSH_STD_CCCS(frame) \
(frame->header.prof.ccs = CCCS, frame->header.prof.rs = NULL)
\end{code}
@@ -418,10 +418,10 @@ Hence, the above modification is entirely unnecessary.
Also, update frames are the only exception to the standard way of creating
stack closures: all the other types of stack closures with a retainer set
field are eventually initialized by
-the macro @SET\_HDR()@ (in @includes/ClosureMacros.h@), which in turn
+the macro @SET\_HDR()@ (in @rts/include/ClosureMacros.h@), which in turn
invokes @SET\_PROF\_HDR()@. This is not the case for update frames.
-Compare @PUSH\_UPD\_FRAME()@ (in @includes/Updates.h@) and
-@PUSH\_SEQ\_FRAME()@ (in @includes/StgMacros.h@) for clarification.
+Compare @PUSH\_UPD\_FRAME()@ (in @rts/include/Updates.h@) and
+@PUSH\_SEQ\_FRAME()@ (in @rts/include/StgMacros.h@) for clarification.
\section{Retainer Sets}
@@ -439,7 +439,7 @@ implementation.
The function @R()@ in Figure~\ref{fig-retaineralgorithm} returns
the identity of a retainer. In order to implement it, we need
a type for retainer identity.
-The type @retainer@ (in @includes/StgRetainerProf.h@) is introduced for
+The type @retainer@ (in @rts/include/StgRetainerProf.h@) is introduced for
this purpose.
There are various ways of defining the type @retainer@.
@@ -470,7 +470,7 @@ retainer getRetainerFrom(StgClosure *c) { return c->header.prof.ccs; }
\subsection{Retainer sets and the cost function}
A retainer set is stored in the structure @retainerSet@
-(in @includes/StgRetainerProf.h@):
+(in @rts/include/StgRetainerProf.h@):
\begin{code}
typedef struct _retainerSet {
@@ -721,7 +721,7 @@ In addition to the thread closures, weak pointers are also considered
as roots; they may not be reachable from any thread closure yet are still
being in used.
A weak pointer has three pointer fields: @key@, @value@, and
-@finalizer@ (see the structure @StgWeak@ in @includes/Closures.h@).
+@finalizer@ (see the structure @StgWeak@ in @rts/include/Closures.h@).
It turns out that these pointers may not be valid all the time:
at a certain point during execution, for instance, the pointer @key@ may point
to a dead closure.
@@ -875,7 +875,7 @@ A retainer profiling scheme specifies \emph{what} retainer profiling
yields (as opposed to \emph{how} retainer profiling computes the retainer
set for every live object).
It is determined primarily by the meaning of retainer identity,
-that is, the type @retainer@ (in @includes/StgRetainerProf.h@).
+that is, the type @retainer@ (in @rts/include/StgRetainerProf.h@).
The function @getRetainerFrom()@ must be defined according to the
definition of the type @retainer@.
@@ -1032,10 +1032,10 @@ execution of retainer profiling.
This section gives a summary of changes made to the GHC in
implementing retainer profiling.
-Only three files (@includes/StgRetainerProf.h@, @RetainerProfile.c@, and
+Only three files (@rts/include/StgRetainerProf.h@, @RetainerProfile.c@, and
@RetainerProfile.h@) are new, and all others exist in the GHC.
-@\includes@ directory:
+@\rts\include@ directory:
\begin{description}
\item[StgRetainerProf.h] defines types @retainer@ and @retainerSet@.
diff --git a/docs/storage-mgt/sm.tex b/docs/storage-mgt/sm.tex
index 4a52d61f5b..28941a5e73 100644
--- a/docs/storage-mgt/sm.tex
+++ b/docs/storage-mgt/sm.tex
@@ -620,7 +620,7 @@ objects whose contents can be updated and hence may contain pointers to
younger generations.
Every object in this linked list is a dynamic object residing in the heap
and has a structure compatible with @StgMutClosure@.
-The structure @StgMutClosure@ (@includes/Closures.h@) has a field
+The structure @StgMutClosure@ (@rts/include/Closures.h@) has a field
@mut_link@ (called a mutable link field) of type @StgMutClosure *@, which
points to the next object in this linked list.
The end mark of this linked list is a pointer to a statically allocated object
@@ -655,14 +655,14 @@ contain static objects (as opposed to dynamic objects residing in the heap)
in its list @mut_once_list@. This happens when a static
thunk, also known as a \emph{constant applicative form} (CAF), is entered.
When a CAF (corresponding to closure type @THUNK_STATIC@, defined
-in @includes/ClosureTypes.h@) is entered,
+in @rts/include/ClosureTypes.h@) is entered,
it is first put in the list @mut_once_list@ of the oldest generation
and then overwritten with an appropriate static indirection object
(corresponding to closure type @IND_STATIC@).\footnote{Actually a static
indirection object does not have a @mut\_link@ field.
We use its @static\_link@ field as a substitute for @mut\_link@.
See the structure @StgIndStatic@ in @include/Closures.h@.}\footnote{For
-details of this operation, see the macro @UPD\_CAF()@ in @includes/Updates.h@}
+details of this operation, see the macro @UPD\_CAF()@ in @rts/include/Updates.h@}
If the CAF is dynamically loaded (e.g., in an interactive environment), it is
instead put in a separate linked list @caf_list@
(declared in @Storage.c@).
diff --git a/ghc.mk b/ghc.mk
index a244c1b53c..94c2ce38ee 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -634,7 +634,7 @@ BUILD_DIRS += driver/ghc
BUILD_DIRS += driver/haddock
BUILD_DIRS += libffi
BUILD_DIRS += utils/deriveConstants
-BUILD_DIRS += includes
+BUILD_DIRS += rts/include
BUILD_DIRS += rts
BUILD_DIRS += bindisttest
BUILD_DIRS += utils/genapply
@@ -1043,7 +1043,7 @@ $(eval $(call bindist-list,.,\
$(BINDIST_LIBS) \
$(BINDIST_HI) \
$(BINDIST_EXTRAS) \
- includes/Makefile \
+ rts/include/Makefile \
$(includes_H_FILES) \
$(includes_1_H_CONFIG) \
$(includes_1_H_PLATFORM) \
@@ -1331,8 +1331,8 @@ CLEAN_FILES += compiler/ghc.cabal.old
# These are no longer generated, but we still clean them for a while
# as they may still be in old GHC trees:
-CLEAN_FILES += includes/GHCConstants.h
-CLEAN_FILES += includes/DerivedConstants.h
+CLEAN_FILES += rts/include/GHCConstants.h
+CLEAN_FILES += rts/include/DerivedConstants.h
$(foreach n,0 1 2, \
$(foreach h,$(includes_$n_H_CONFIG) $(includes_$n_H_PLATFORM) $(includes_$n_H_VERSION), \
$(eval CLEAN_FILES += $h)))
@@ -1347,7 +1347,7 @@ clean : clean_files clean_libraries
clean_files :
$(call removeFiles,$(CLEAN_FILES))
# this is here since CLEAN_FILES can't handle folders
- $(call removeTrees,includes/dist-derivedconstants)
+ $(call removeTrees,rts/include/dist-derivedconstants)
$(call removeTrees,inplace/bin)
$(call removeTrees,inplace/lib)
$(call removeTrees,libraries/bootstrapping.conf)
@@ -1433,7 +1433,7 @@ distclean : clean
$(call removeTrees,bindisttest/a)
# Not sure why this is being cleaned here.
- $(call removeTrees,includes/dist-derivedconstants)
+ $(call removeTrees,rts/include/dist-derivedconstants)
# Also clean Windows-only inplace directories.
# Don't delete 'inplace' itself, it contains source files.
diff --git a/hadrian/src/Rules/Lint.hs b/hadrian/src/Rules/Lint.hs
index 218dff8047..828744ba0b 100644
--- a/hadrian/src/Rules/Lint.hs
+++ b/hadrian/src/Rules/Lint.hs
@@ -48,7 +48,7 @@ base :: Action ()
base = do
buildDir <- buildRoot
let stage1Lib = buildDir </> "stage1/lib"
- let machDeps = "includes/MachDeps.h"
+ let machDeps = "rts/include/MachDeps.h"
let ghcautoconf = stage1Lib </> "ghcautoconf.h"
let ghcplatform = stage1Lib </> "ghcplatform.h"
-- ./configure is called here manually because we need to generate
@@ -60,7 +60,7 @@ base = do
cmd_ (Cwd "libraries/base") "./configure"
need [ghcautoconf, ghcplatform, machDeps]
let includeDirs =
- [ "includes"
+ [ "rts/include"
, "libraries/base/include"
, stage1Lib
]
@@ -71,14 +71,13 @@ compiler = do
buildDir <- buildRoot
let stage1Lib = buildDir </> "stage1/lib"
let stage1Compiler = buildDir </> "stage1/compiler/build"
- let machDeps = "includes/MachDeps.h"
+ let machDeps = "rts/include/MachDeps.h"
let compilerDir = "compiler"
let ghcautoconf = stage1Lib </> "ghcautoconf.h"
let ghcplatform = stage1Lib </> "ghcplatform.h"
need $ mconcat [[ghcautoconf, ghcplatform], hsIncls stage1Compiler, [machDeps]]
let includeDirs =
- [ "includes"
- , stage1Lib
+ [ stage1Lib
, compilerDir
, ghcplatform
, stage1Compiler
diff --git a/hadrian/src/Settings/Builders/Cabal.hs b/hadrian/src/Settings/Builders/Cabal.hs
index c175cd6500..468757adca 100644
--- a/hadrian/src/Settings/Builders/Cabal.hs
+++ b/hadrian/src/Settings/Builders/Cabal.hs
@@ -113,8 +113,7 @@ configureArgs = do
, arg $ "-I" ++ libPath
-- See https://github.com/snowleopard/hadrian/issues/523
, arg $ "-iquote"
- , arg $ top -/- pkgPath pkg
- , arg $ "-I" ++ top -/- "includes" ]
+ , arg $ top -/- pkgPath pkg ]
ldFlags = ldArgs <> (getStagedSettingList ConfGccLinkerArgs)
cppFlags = cppArgs <> (getStagedSettingList ConfCppArgs)
cldFlags <- unwords <$> (cFlags <> ldFlags)
diff --git a/hadrian/src/Settings/Builders/Common.hs b/hadrian/src/Settings/Builders/Common.hs
index dfb90a1003..8daa8a1f88 100644
--- a/hadrian/src/Settings/Builders/Common.hs
+++ b/hadrian/src/Settings/Builders/Common.hs
@@ -31,7 +31,7 @@ cIncludeArgs = do
ffiIncludeDir <- getSetting FfiIncludeDir
libdwIncludeDir <- getSetting FfiIncludeDir
libPath <- expr $ stageLibPath stage
- mconcat [ notStage0 ||^ package compiler ? arg "-Iincludes"
+ mconcat [ notStage0 ||^ package compiler ? arg "-Irts/include"
, arg $ "-I" ++ libPath
, arg $ "-I" ++ path
, pure . map ("-I"++) . filter (/= "") $ [iconvIncludeDir, gmpIncludeDir]
diff --git a/hadrian/src/Settings/Builders/DeriveConstants.hs b/hadrian/src/Settings/Builders/DeriveConstants.hs
index 63813050b4..6801dc05fb 100644
--- a/hadrian/src/Settings/Builders/DeriveConstants.hs
+++ b/hadrian/src/Settings/Builders/DeriveConstants.hs
@@ -42,7 +42,7 @@ includeCcArgs = do
, getSettingList $ ConfCcArgs Stage1
, flag GhcUnregisterised ? arg "-DUSE_MINIINTERPRETER"
, arg "-Irts"
- , arg "-Iincludes"
+ , arg "-Irts/include"
, arg $ "-I" ++ libPath
, notM targetSupportsSMP ? arg "-DNOSMP"
, arg "-fcommon" ]
diff --git a/hadrian/src/Settings/Builders/HsCpp.hs b/hadrian/src/Settings/Builders/HsCpp.hs
index 4595e2098e..9f821d66b8 100644
--- a/hadrian/src/Settings/Builders/HsCpp.hs
+++ b/hadrian/src/Settings/Builders/HsCpp.hs
@@ -10,7 +10,7 @@ hsCppBuilderArgs = builder HsCpp ? do
libPath <- expr $ stageLibPath stage
mconcat [ getSettingList HsCppArgs
, arg "-P"
- , arg "-Iincludes"
+ , arg "-Irts/include"
, arg $ "-I" ++ libPath
, arg $ "-I" ++ ghcPath
, arg "-x", arg "c"
diff --git a/libraries/base/GHC/Conc/Sync.hs b/libraries/base/GHC/Conc/Sync.hs
index ecae88cfc5..c51afb9d83 100644
--- a/libraries/base/GHC/Conc/Sync.hs
+++ b/libraries/base/GHC/Conc/Sync.hs
@@ -570,7 +570,7 @@ threadStatus (ThreadId t) = IO $ \s ->
case threadStatus# t s of
(# s', stat, _cap, _locked #) -> (# s', mk_stat (I# stat) #)
where
- -- NB. keep these in sync with includes/rts/Constants.h
+ -- NB. keep these in sync with rts/include/rts/Constants.h
mk_stat 0 = ThreadRunning
mk_stat 1 = ThreadBlocked BlockedOnMVar
mk_stat 2 = ThreadBlocked BlockedOnBlackHole
diff --git a/libraries/base/GHC/ExecutionStack/Internal.hsc b/libraries/base/GHC/ExecutionStack/Internal.hsc
index 46deccbd73..87b2e41900 100644
--- a/libraries/base/GHC/ExecutionStack/Internal.hsc
+++ b/libraries/base/GHC/ExecutionStack/Internal.hsc
@@ -41,7 +41,7 @@ import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Storable (Storable(..))
import System.IO.Unsafe (unsafePerformIO, unsafeInterleaveIO)
--- N.B. See includes/rts/Libdw.h for notes on stack representation.
+-- N.B. See rts/include/rts/Libdw.h for notes on stack representation.
-- | A location in the original program source.
data SrcLoc = SrcLoc { sourceFile :: String
diff --git a/libraries/base/cbits/inputReady.c b/libraries/base/cbits/inputReady.c
index 44e6dfc605..46b5577cfc 100644
--- a/libraries/base/cbits/inputReady.c
+++ b/libraries/base/cbits/inputReady.c
@@ -21,8 +21,8 @@
#endif
/* select and supporting types is not Posix */
-/* #include "rts/PosixSource.h" */
-#include "Rts.h"
+/* #include <rts/PosixSource.h> */
+#include <Rts.h>
#include <limits.h>
#include <stdbool.h>
#include "HsBase.h"
diff --git a/libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs b/libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs
index 1d25abee51..5eefe02d0d 100644
--- a/libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs
+++ b/libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs
@@ -12,7 +12,7 @@ import GHC.Generics
{- ---------------------------------------------
-- Enum representing closure types
-- This is a mirror of:
--- includes/rts/storage/ClosureTypes.h
+-- rts/include/rts/storage/ClosureTypes.h
-- ---------------------------------------------}
data ClosureType
diff --git a/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs b/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs
index 3b51b22ceb..e15ae7008b 100644
--- a/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs
+++ b/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs
@@ -98,7 +98,7 @@ areBoxesEqual (Box a) (Box b) = case reallyUnsafePtrEqualityUpToTag# a b of
type Closure = GenClosure Box
-- | This is the representation of a Haskell value on the heap. It reflects
--- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/storage/Closures.h>
+-- <https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/storage/Closures.h>
--
-- The data type is parametrized by `b`: the type to store references in.
-- Usually this is a 'Box' with the type synonym 'Closure'.
diff --git a/libraries/ghc-heap/GHC/Exts/Heap/InfoTable/Types.hsc b/libraries/ghc-heap/GHC/Exts/Heap/InfoTable/Types.hsc
index 943a234391..667301157a 100644
--- a/libraries/ghc-heap/GHC/Exts/Heap/InfoTable/Types.hsc
+++ b/libraries/ghc-heap/GHC/Exts/Heap/InfoTable/Types.hsc
@@ -28,7 +28,7 @@ type HalfWord = Word16
type EntryFunPtr = FunPtr (Ptr () -> IO (Ptr ()))
-- | This is a somewhat faithful representation of an info table. See
--- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/storage/InfoTables.h>
+-- <https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/storage/InfoTables.h>
-- for more details on this data structure.
data StgInfoTable = StgInfoTable {
entry :: Maybe EntryFunPtr, -- Just <=> not TABLES_NEXT_TO_CODE
diff --git a/libraries/ghc-heap/GHC/Exts/Heap/ProfInfo/Types.hs b/libraries/ghc-heap/GHC/Exts/Heap/ProfInfo/Types.hs
index 579d29098c..5ff030d923 100644
--- a/libraries/ghc-heap/GHC/Exts/Heap/ProfInfo/Types.hs
+++ b/libraries/ghc-heap/GHC/Exts/Heap/ProfInfo/Types.hs
@@ -7,14 +7,14 @@ import Data.Word
import GHC.Generics
-- | This is a somewhat faithful representation of StgTSOProfInfo. See
--- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/storage/TSO.h>
+-- <https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/storage/TSO.h>
-- for more details on this data structure.
data StgTSOProfInfo = StgTSOProfInfo {
cccs :: Maybe CostCentreStack
} deriving (Show, Generic, Eq, Ord)
-- | This is a somewhat faithful representation of CostCentreStack. See
--- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/prof/CCS.h>
+-- <https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/prof/CCS.h>
-- for more details on this data structure.
data CostCentreStack = CostCentreStack {
ccs_ccsID :: Int,
@@ -32,7 +32,7 @@ data CostCentreStack = CostCentreStack {
} deriving (Show, Generic, Eq, Ord)
-- | This is a somewhat faithful representation of CostCentre. See
--- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/prof/CCS.h>
+-- <https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/prof/CCS.h>
-- for more details on this data structure.
data CostCentre = CostCentre {
cc_ccID :: Int,
@@ -46,7 +46,7 @@ data CostCentre = CostCentre {
} deriving (Show, Generic, Eq, Ord)
-- | This is a somewhat faithful representation of IndexTable. See
--- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/prof/CCS.h>
+-- <https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/prof/CCS.h>
-- for more details on this data structure.
data IndexTable = IndexTable {
it_cc :: CostCentre,
diff --git a/libraries/ghci/GHCi/InfoTable.hsc b/libraries/ghci/GHCi/InfoTable.hsc
index 8a1f7d1153..9cc9ac1557 100644
--- a/libraries/ghci/GHCi/InfoTable.hsc
+++ b/libraries/ghci/GHCi/InfoTable.hsc
@@ -70,7 +70,7 @@ mkJumpToAddr a = case hostPlatformArch of
ArchSPARC -> pure $
-- After some consideration, we'll try this, where
-- 0x55555555 stands in for the address to jump to.
- -- According to includes/rts/MachRegs.h, %g3 is very
+ -- According to rts/include/rts/MachRegs.h, %g3 is very
-- likely indeed to be baggable.
--
-- 0000 07155555 sethi %hi(0x55555555), %g3
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 35f6e2d087..95c9fe9378 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -154,7 +154,7 @@ endif
GhcUnregisterised=@Unregisterised@
# ArchSupportsSMP should be set iff there is support for that arch in
-# includes/stg/SMP.h
+# rts/include/stg/SMP.h
ifeq "$(TargetArch_CPP)" "arm"
# We don't support load/store barriers pre-ARMv7. See #10433.
ArchSupportsSMP=$(if $(filter $(ARM_ISA),ARMv5 ARMv6),NO,YES)
diff --git a/mk/tree.mk b/mk/tree.mk
index 5a61a4a4aa..fa3d99a18c 100644
--- a/mk/tree.mk
+++ b/mk/tree.mk
@@ -10,7 +10,7 @@
# indicates a directory relative to the top of the source tree.
GHC_UTILS_DIR = utils
-GHC_INCLUDE_DIRS = includes includes/dist includes/dist-derivedconstants/header includes/dist-ghcconstants/header
+GHC_INCLUDE_DIRS = rts/include rts/include/dist rts/include/dist-derivedconstants/header rts/include/dist-ghcconstants/header
GHC_RTS_DIR = rts
GHC_DRIVER_DIR = driver
diff --git a/rts/.tsan-suppressions b/rts/.tsan-suppressions
index 734faff5a6..dab647227e 100644
--- a/rts/.tsan-suppressions
+++ b/rts/.tsan-suppressions
@@ -1,5 +1,5 @@
# ThreadSanitizer suppressions.
-# See Note [ThreadSanitizer] in includes/rts/TSANUtils.h.
+# See Note [ThreadSanitizer] in rts/include/rts/TSANUtils.h.
# This is a known race but is benign
race:capability_is_busy
diff --git a/rts/AdjustorAsm.S b/rts/AdjustorAsm.S
index 2795b83b63..59ac2b49cb 100644
--- a/rts/AdjustorAsm.S
+++ b/rts/AdjustorAsm.S
@@ -1,4 +1,4 @@
-#include "../includes/ghcconfig.h"
+#include "include/ghcconfig.h"
/* ******************************** PowerPC ******************************** */
diff --git a/rts/Capability.h b/rts/Capability.h
index 14ba9ef2d7..4a27e618fe 100644
--- a/rts/Capability.h
+++ b/rts/Capability.h
@@ -253,10 +253,10 @@ INLINE_HEADER void releaseCapability_ (Capability* cap STG_UNUSED,
bool always_wakeup STG_UNUSED) {};
#endif
-// declared in includes/rts/Threads.h:
+// declared in rts/include/rts/Threads.h:
// extern Capability MainCapability;
-// declared in includes/rts/Threads.h:
+// declared in rts/include/rts/Threads.h:
// extern uint32_t n_capabilities;
// extern uint32_t enabled_capabilities;
diff --git a/rts/LdvProfile.c b/rts/LdvProfile.c
index aef1703c4a..b56c4d07bb 100644
--- a/rts/LdvProfile.c
+++ b/rts/LdvProfile.c
@@ -70,7 +70,7 @@ processHeapClosureForDead( const StgClosure *c )
if (IS_FORWARDING_PTR(info)) {
// The size of the evacuated closure is currently stored in
// the LDV field. See SET_EVACUAEE_FOR_LDV() in
- // includes/StgLdvProf.h.
+ // rts/include/StgLdvProf.h.
return LDVW(c);
}
info = INFO_PTR_TO_STRUCT(info);
diff --git a/rts/Printer.c b/rts/Printer.c
index 90a40f2626..d2a5c67ca4 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -996,7 +996,7 @@ void printObj( StgClosure *obj )
Closure types
NOTE: must be kept in sync with the closure types in
- includes/rts/storage/ClosureTypes.h
+ rts/include/rts/storage/ClosureTypes.h
-------------------------------------------------------------------------- */
const char *closure_type_names[] = {
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c
index 68e412c9c7..964cb99e9f 100644
--- a/rts/RetainerProfile.c
+++ b/rts/RetainerProfile.c
@@ -49,7 +49,7 @@ information about the retainers is still applicable.
/*
Note: what to change in order to plug-in a new retainer profiling scheme?
- (1) type retainer in ../includes/StgRetainerProf.h
+ (1) type retainer in include/StgRetainerProf.h
(2) retainer function R(), i.e., getRetainerFrom()
(3) the two hashing functions, hashKeySingleton() and hashKeyAddElement(),
in RetainerSet.h, if needed.
diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c
index 38e1b8071c..0632dfa6df 100644
--- a/rts/RtsSymbols.c
+++ b/rts/RtsSymbols.c
@@ -397,7 +397,7 @@
#endif
/* Modules compiled with -ticky may mention ticky counters */
-/* This list should marry up with the one in $(TOP)/includes/stg/Ticky.h */
+/* This list should marry up with the one in $(TOP)/rts/include/stg/Ticky.h */
#define RTS_TICKY_SYMBOLS \
SymI_NeedsDataProto(ticky_entry_ctrs) \
SymI_NeedsDataProto(top_ct) \
diff --git a/rts/Schedule.c b/rts/Schedule.c
index 4a4b2d494a..3306f00ff3 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -2621,7 +2621,7 @@ scheduleThreadOn(Capability *cap, StgWord cpu USED_IF_THREADS, StgTSO *tso)
#endif
}
-// See includes/rts/Threads.h
+// See rts/include/rts/Threads.h
void
scheduleWaitThread (StgTSO* tso, /*[out]*/HaskellObj* ret, Capability **pcap)
{
diff --git a/rts/Schedule.h b/rts/Schedule.h
index 4c692842e7..5aaafd9d88 100644
--- a/rts/Schedule.h
+++ b/rts/Schedule.h
@@ -130,7 +130,7 @@ void resurrectThreads (StgTSO *);
#if !IN_STG_CODE
-/* END_TSO_QUEUE and friends now defined in includes/stg/MiscClosures.h */
+/* END_TSO_QUEUE and friends now defined in rts/include/stg/MiscClosures.h */
/* Add a thread to the end of the run queue.
* NOTE: tso->link should be END_TSO_QUEUE before calling this macro.
diff --git a/rts/StgCRun.c b/rts/StgCRun.c
index b439b7e36a..25a931994d 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -880,7 +880,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) {
those regs not used in Thumb mode. Hard to judge if this is
needed, but certainly Haskell code is using them for
placing GHC's virtual registers there. See
- includes/stg/MachRegs.h Please note that Haskell code is
+ rts/include/stg/MachRegs.h Please note that Haskell code is
compiled by GHC/LLVM into ARM code (not Thumb!), at least
as of February 2012 */
: "%r4", "%r5", "%r6", "%r8", "%r9", "%r10", "%11", "%ip", "%lr"
diff --git a/rts/StgPrimFloat.h b/rts/StgPrimFloat.h
index 70ece8f074..4c77b3d995 100644
--- a/rts/StgPrimFloat.h
+++ b/rts/StgPrimFloat.h
@@ -16,6 +16,6 @@ void __decodeDouble_2Int (I_ *man_sign, W_ *man_high, W_ *man_low, I_ *exp,
void __decodeFloat_Int (I_ *man, I_ *exp, StgFloat flt);
// __{int,word}_encode{Float,Double} are public, declared in
-// includes/rts/PrimFloat.h.
+// rts/include/rts/PrimFloat.h.
#include "EndPrivate.h"
diff --git a/includes/.dir-locals.el b/rts/include/.dir-locals.el
index 9e13ffa6ba..9e13ffa6ba 100644
--- a/includes/.dir-locals.el
+++ b/rts/include/.dir-locals.el
diff --git a/includes/Cmm.h b/rts/include/Cmm.h
index 94951bc9f8..94951bc9f8 100644
--- a/includes/Cmm.h
+++ b/rts/include/Cmm.h
diff --git a/includes/HsFFI.h b/rts/include/HsFFI.h
index 7c25599f83..7c25599f83 100644
--- a/includes/HsFFI.h
+++ b/rts/include/HsFFI.h
diff --git a/includes/MachDeps.h b/rts/include/MachDeps.h
index 98a90814d9..98a90814d9 100644
--- a/includes/MachDeps.h
+++ b/rts/include/MachDeps.h
diff --git a/includes/Makefile b/rts/include/Makefile
index c72fe8fc78..d0dc985cbe 100644
--- a/includes/Makefile
+++ b/rts/include/Makefile
@@ -10,6 +10,6 @@
#
# -----------------------------------------------------------------------------
-dir = includes
-TOP = ..
+dir = rts/include
+TOP = ../..
include $(TOP)/mk/sub-makefile.mk
diff --git a/includes/Rts.h b/rts/include/Rts.h
index e3471cf333..e3471cf333 100644
--- a/includes/Rts.h
+++ b/rts/include/Rts.h
diff --git a/includes/RtsAPI.h b/rts/include/RtsAPI.h
index e2d1845819..e2d1845819 100644
--- a/includes/RtsAPI.h
+++ b/rts/include/RtsAPI.h
diff --git a/includes/Stg.h b/rts/include/Stg.h
index 46f71c0241..46f71c0241 100644
--- a/includes/Stg.h
+++ b/rts/include/Stg.h
diff --git a/includes/ghc.mk b/rts/include/ghc.mk
index 5e3060c238..88cb12caff 100644
--- a/includes/ghc.mk
+++ b/rts/include/ghc.mk
@@ -13,24 +13,24 @@
#
# Header files built from the configure script's findings
#
-includes_0_H_CONFIG = includes/dist/build/ghcautoconf.h
-includes_1_H_CONFIG = includes/dist-install/build/ghcautoconf.h
+includes_0_H_CONFIG = rts/include/dist/build/ghcautoconf.h
+includes_1_H_CONFIG = rts/include/dist-install/build/ghcautoconf.h
includes_2_H_CONFIG = $(includes_1_H_CONFIG)
-includes_0_H_PLATFORM = includes/dist/build/ghcplatform.h
-includes_1_H_PLATFORM = includes/dist-install/build/ghcplatform.h
+includes_0_H_PLATFORM = rts/include/dist/build/ghcplatform.h
+includes_1_H_PLATFORM = rts/include/dist-install/build/ghcplatform.h
includes_2_H_PLATFORM = $(includes_1_H_PLATFORM)
-includes_0_H_VERSION = includes/dist/build/ghcversion.h
-includes_1_H_VERSION = includes/dist-install/build/ghcversion.h
+includes_0_H_VERSION = rts/include/dist/build/ghcversion.h
+includes_1_H_VERSION = rts/include/dist-install/build/ghcversion.h
includes_2_H_VERSION = $(includes_1_H_VERSION)
-BUILD_0_INCLUDE_DIR = includes/dist/build
-BUILD_1_INCLUDE_DIR = includes/dist-install/build
+BUILD_0_INCLUDE_DIR = rts/include/dist/build
+BUILD_1_INCLUDE_DIR = rts/include/dist-install/build
BUILD_2_INCLUDE_DIR = $(BUILD_1_INCLUDE_DIR)
#
-# All header files are in includes/{one of these subdirectories}
+# All header files are in rts/include/{one of these subdirectories}
#
includes_H_SUBDIRS += .
includes_H_SUBDIRS += rts
@@ -38,7 +38,7 @@ includes_H_SUBDIRS += rts/prof
includes_H_SUBDIRS += rts/storage
includes_H_SUBDIRS += stg
-includes_H_FILES := $(wildcard $(patsubst %,includes/%/*.h,$(includes_H_SUBDIRS)))
+includes_H_FILES := $(wildcard $(patsubst %,rts/include/%/*.h,$(includes_H_SUBDIRS)))
# This isn't necessary, but it makes the paths look a little prettier
includes_H_FILES := $(subst /./,/,$(includes_H_FILES))
@@ -100,7 +100,7 @@ ifneq "$(BINDIST)" "YES"
define includesHeaderConfig
# $1 = stage
-$$(includes_$1_H_CONFIG) : mk/config.h mk/config.mk includes/ghc.mk | $$$$(dir $$$$@)/.
+$$(includes_$1_H_CONFIG) : mk/config.h mk/config.mk rts/include/ghc.mk | $$$$(dir $$$$@)/.
$$(call removeFiles,$$@)
@echo "Creating $$@..."
@echo "#if !defined(__GHCAUTOCONF_H__)" > $$@
@@ -153,7 +153,7 @@ HostVendor_2_CPP = $(TargetVendor_CPP)
define includesHeaderPlatform
# $1 = stage
-$$(includes_$1_H_PLATFORM) : includes/ghc.mk includes/Makefile | $$$$(dir $$$$@)/.
+$$(includes_$1_H_PLATFORM) : rts/include/ghc.mk rts/include/Makefile | $$$$(dir $$$$@)/.
$$(call removeFiles,$$@)
@echo "Creating $$@..."
@echo "#if !defined(__GHCPLATFORM_H__)" > $$@
@@ -205,9 +205,9 @@ $(eval $(call includesHeaderPlatform,1))
# rebuilds.
# See Note [tooldir: How GHC finds mingw on Windows]
-includes_SETTINGS = includes/dist/build/settings
+includes_SETTINGS = rts/include/dist/build/settings
-$(includes_SETTINGS) : includes/Makefile | $$(dir $$@)/.
+$(includes_SETTINGS) : rts/include/Makefile | $$(dir $$@)/.
$(call removeFiles,$@)
@echo '[("GCC extra via C opts", "$(GccExtraViaCOpts)")' >> $@
@echo ',("C compiler command", "$(SettingsCCompilerCommand)")' >> $@
@@ -266,25 +266,21 @@ $(includes_SETTINGS) : includes/Makefile | $$(dir $$@)/.
# ---------------------------------------------------------------------------
# Make DerivedConstants.h for the compiler
-includes_DERIVEDCONSTANTS = includes/dist-derivedconstants/header/DerivedConstants.h
-includes_GHCCONSTANTS_HASKELL_TYPE = includes/dist-derivedconstants/header/GHCConstantsHaskellType.hs
+includes_DERIVEDCONSTANTS = rts/include/dist-derivedconstants/header/DerivedConstants.h
-DERIVE_CONSTANTS_FLAGS += --gcc-program "$(CC)"
-DERIVE_CONSTANTS_FLAGS += $(addprefix --gcc-flag$(space),$(includes_CC_OPTS) -fcommon)
-DERIVE_CONSTANTS_FLAGS += --nm-program "$(NM)"
+DERIVE_CONSTANTS_FLAGS_FOR_HEADER += --gcc-program "$(CC)"
+DERIVE_CONSTANTS_FLAGS_FOR_HEADER += $(addprefix --gcc-flag$(space),$(includes_CC_OPTS) -fcommon)
+DERIVE_CONSTANTS_FLAGS_FOR_HEADER += --nm-program "$(NM)"
ifneq "$(OBJDUMP)" ""
-DERIVE_CONSTANTS_FLAGS += --objdump-program "$(OBJDUMP)"
+DERIVE_CONSTANTS_FLAGS_FOR_HEADER += --objdump-program "$(OBJDUMP)"
endif
-DERIVE_CONSTANTS_FLAGS += --target-os "$(TargetOS_CPP)"
+DERIVE_CONSTANTS_FLAGS_FOR_HEADER += --target-os "$(TargetOS_CPP)"
ifneq "$(BINDIST)" "YES"
$(includes_DERIVEDCONSTANTS): $$(includes_H_FILES) $$(rts_H_FILES)
$(includes_DERIVEDCONSTANTS): $(deriveConstants_INPLACE) $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) | $$(dir $$@)/.
- $< --gen-header -o $@ --tmpdir $(dir $@) $(DERIVE_CONSTANTS_FLAGS)
-
-$(includes_GHCCONSTANTS_HASKELL_TYPE): $(deriveConstants_INPLACE) | $$(dir $$@)/.
- $< --gen-haskell-type -o $@ --tmpdir $(dir $@) $(DERIVE_CONSTANTS_FLAGS)
+ $< --gen-header -o $@ --tmpdir $(dir $@) $(DERIVE_CONSTANTS_FLAGS_FOR_HEADER)
endif
# ---------------------------------------------------------------------------
@@ -297,7 +293,6 @@ $(eval $(call clean-target,includes,,\
$(eval $(call all-target,includes,\
$(includes_0_H_CONFIG) $(includes_0_H_PLATFORM) $(includes_0_H_VERSION) \
$(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) $(includes_1_H_VERSION) \
- $(includes_GHCCONSTANTS_HASKELL_TYPE) \
$(includes_DERIVEDCONSTANTS)))
install: install_includes
@@ -307,7 +302,7 @@ install_includes : $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) $(includes_1_
$(INSTALL_DIR) "$(DESTDIR)$(ghcheaderdir)"
$(foreach d,$(includes_H_SUBDIRS), \
$(INSTALL_DIR) "$(DESTDIR)$(ghcheaderdir)/$d" && \
- $(INSTALL_HEADER) $(INSTALL_OPTS) includes/$d/*.h "$(DESTDIR)$(ghcheaderdir)/$d/" && \
+ $(INSTALL_HEADER) $(INSTALL_OPTS) rts/include/$d/*.h "$(DESTDIR)$(ghcheaderdir)/$d/" && \
) true
$(INSTALL_HEADER) $(INSTALL_OPTS) \
$(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) $(includes_1_H_VERSION) \
diff --git a/includes/ghcconfig.h b/rts/include/ghcconfig.h
index 7b99835a23..7b99835a23 100644
--- a/includes/ghcconfig.h
+++ b/rts/include/ghcconfig.h
diff --git a/includes/rts/Adjustor.h b/rts/include/rts/Adjustor.h
index 8965c7c8bb..8965c7c8bb 100644
--- a/includes/rts/Adjustor.h
+++ b/rts/include/rts/Adjustor.h
diff --git a/includes/rts/BlockSignals.h b/rts/include/rts/BlockSignals.h
index 46b0b0f562..46b0b0f562 100644
--- a/includes/rts/BlockSignals.h
+++ b/rts/include/rts/BlockSignals.h
diff --git a/includes/rts/Bytecodes.h b/rts/include/rts/Bytecodes.h
index b97d4d4f60..b97d4d4f60 100644
--- a/includes/rts/Bytecodes.h
+++ b/rts/include/rts/Bytecodes.h
diff --git a/includes/rts/Config.h b/rts/include/rts/Config.h
index 289950af45..289950af45 100644
--- a/includes/rts/Config.h
+++ b/rts/include/rts/Config.h
diff --git a/includes/rts/Constants.h b/rts/include/rts/Constants.h
index 9cbe47752e..9cbe47752e 100644
--- a/includes/rts/Constants.h
+++ b/rts/include/rts/Constants.h
diff --git a/includes/rts/EventLogFormat.h b/rts/include/rts/EventLogFormat.h
index b8b261ae3d..4a2b339a9e 100644
--- a/includes/rts/EventLogFormat.h
+++ b/rts/include/rts/EventLogFormat.h
@@ -187,7 +187,7 @@
/*
* Status values for EVENT_STOP_THREAD
*
- * 1-5 are the StgRun return values (from includes/Constants.h):
+ * 1-5 are the StgRun return values (from rts/include/Constants.h):
*
* #define HeapOverflow 1
* #define StackOverflow 2
diff --git a/includes/rts/EventLogWriter.h b/rts/include/rts/EventLogWriter.h
index 73a2aec64c..73a2aec64c 100644
--- a/includes/rts/EventLogWriter.h
+++ b/rts/include/rts/EventLogWriter.h
diff --git a/includes/rts/ExecPage.h b/rts/include/rts/ExecPage.h
index 4261b71259..4261b71259 100644
--- a/includes/rts/ExecPage.h
+++ b/rts/include/rts/ExecPage.h
diff --git a/includes/rts/FileLock.h b/rts/include/rts/FileLock.h
index 3d8056d7a0..3d8056d7a0 100644
--- a/includes/rts/FileLock.h
+++ b/rts/include/rts/FileLock.h
diff --git a/includes/rts/Flags.h b/rts/include/rts/Flags.h
index 11e7bfdaa7..11e7bfdaa7 100644
--- a/includes/rts/Flags.h
+++ b/rts/include/rts/Flags.h
diff --git a/includes/rts/ForeignExports.h b/rts/include/rts/ForeignExports.h
index aeb524aebf..aeb524aebf 100644
--- a/includes/rts/ForeignExports.h
+++ b/rts/include/rts/ForeignExports.h
diff --git a/includes/rts/GetTime.h b/rts/include/rts/GetTime.h
index 53207ce307..53207ce307 100644
--- a/includes/rts/GetTime.h
+++ b/rts/include/rts/GetTime.h
diff --git a/includes/rts/Globals.h b/rts/include/rts/Globals.h
index bd3aa637db..bd3aa637db 100644
--- a/includes/rts/Globals.h
+++ b/rts/include/rts/Globals.h
diff --git a/includes/rts/Hpc.h b/rts/include/rts/Hpc.h
index 85d00ca485..85d00ca485 100644
--- a/includes/rts/Hpc.h
+++ b/rts/include/rts/Hpc.h
diff --git a/includes/rts/IOInterface.h b/rts/include/rts/IOInterface.h
index 9a646cc5cf..9a646cc5cf 100644
--- a/includes/rts/IOInterface.h
+++ b/rts/include/rts/IOInterface.h
diff --git a/includes/rts/IPE.h b/rts/include/rts/IPE.h
index 81a6d553d0..81a6d553d0 100644
--- a/includes/rts/IPE.h
+++ b/rts/include/rts/IPE.h
diff --git a/includes/rts/Libdw.h b/rts/include/rts/Libdw.h
index d7bd55d06e..d7bd55d06e 100644
--- a/includes/rts/Libdw.h
+++ b/rts/include/rts/Libdw.h
diff --git a/includes/rts/LibdwPool.h b/rts/include/rts/LibdwPool.h
index 76ff41c8c7..76ff41c8c7 100644
--- a/includes/rts/LibdwPool.h
+++ b/rts/include/rts/LibdwPool.h
diff --git a/includes/rts/Linker.h b/rts/include/rts/Linker.h
index 1f3719c0c7..1f3719c0c7 100644
--- a/includes/rts/Linker.h
+++ b/rts/include/rts/Linker.h
diff --git a/includes/rts/Main.h b/rts/include/rts/Main.h
index 05924ad92b..05924ad92b 100644
--- a/includes/rts/Main.h
+++ b/rts/include/rts/Main.h
diff --git a/includes/rts/Messages.h b/rts/include/rts/Messages.h
index dbaf37bbc7..dbaf37bbc7 100644
--- a/includes/rts/Messages.h
+++ b/rts/include/rts/Messages.h
diff --git a/includes/rts/NonMoving.h b/rts/include/rts/NonMoving.h
index 314c582a1e..35a04fe940 100644
--- a/includes/rts/NonMoving.h
+++ b/rts/include/rts/NonMoving.h
@@ -33,7 +33,7 @@ EF_(stg_copyArray_barrier);
// the barrier is eliminated in the non-threaded RTS.
extern StgWord DLL_IMPORT_DATA_VAR(nonmoving_write_barrier_enabled);
-// A similar macro is defined in includes/Cmm.h for C-- code.
+// A similar macro is defined in rts/include/Cmm.h for C-- code.
#if defined(THREADED_RTS)
#define IF_NONMOVING_WRITE_BARRIER_ENABLED \
if (RTS_UNLIKELY(nonmoving_write_barrier_enabled))
diff --git a/includes/rts/OSThreads.h b/rts/include/rts/OSThreads.h
index d24a1313a6..d24a1313a6 100644
--- a/includes/rts/OSThreads.h
+++ b/rts/include/rts/OSThreads.h
diff --git a/includes/rts/Parallel.h b/rts/include/rts/Parallel.h
index 7577a3967c..7577a3967c 100644
--- a/includes/rts/Parallel.h
+++ b/rts/include/rts/Parallel.h
diff --git a/includes/rts/PosixSource.h b/rts/include/rts/PosixSource.h
index 13fd7b0ff5..13fd7b0ff5 100644
--- a/includes/rts/PosixSource.h
+++ b/rts/include/rts/PosixSource.h
diff --git a/includes/rts/PrimFloat.h b/rts/include/rts/PrimFloat.h
index 26b6f7ceec..26b6f7ceec 100644
--- a/includes/rts/PrimFloat.h
+++ b/rts/include/rts/PrimFloat.h
diff --git a/includes/rts/Profiling.h b/rts/include/rts/Profiling.h
index b329a493db..b329a493db 100644
--- a/includes/rts/Profiling.h
+++ b/rts/include/rts/Profiling.h
diff --git a/includes/rts/Signals.h b/rts/include/rts/Signals.h
index 96f0756538..96f0756538 100644
--- a/includes/rts/Signals.h
+++ b/rts/include/rts/Signals.h
diff --git a/includes/rts/SpinLock.h b/rts/include/rts/SpinLock.h
index c1fe6c866c..c1fe6c866c 100644
--- a/includes/rts/SpinLock.h
+++ b/rts/include/rts/SpinLock.h
diff --git a/includes/rts/StableName.h b/rts/include/rts/StableName.h
index 4e4f976dae..4e4f976dae 100644
--- a/includes/rts/StableName.h
+++ b/rts/include/rts/StableName.h
diff --git a/includes/rts/StablePtr.h b/rts/include/rts/StablePtr.h
index 73cd5bed4d..73cd5bed4d 100644
--- a/includes/rts/StablePtr.h
+++ b/rts/include/rts/StablePtr.h
diff --git a/includes/rts/StaticPtrTable.h b/rts/include/rts/StaticPtrTable.h
index 5753e957bd..5753e957bd 100644
--- a/includes/rts/StaticPtrTable.h
+++ b/rts/include/rts/StaticPtrTable.h
diff --git a/includes/rts/TSANUtils.h b/rts/include/rts/TSANUtils.h
index 72f4541a89..72f4541a89 100644
--- a/includes/rts/TSANUtils.h
+++ b/rts/include/rts/TSANUtils.h
diff --git a/includes/rts/TTY.h b/rts/include/rts/TTY.h
index 9892571a17..9892571a17 100644
--- a/includes/rts/TTY.h
+++ b/rts/include/rts/TTY.h
diff --git a/includes/rts/Threads.h b/rts/include/rts/Threads.h
index 51c11742ca..51c11742ca 100644
--- a/includes/rts/Threads.h
+++ b/rts/include/rts/Threads.h
diff --git a/includes/rts/Ticky.h b/rts/include/rts/Ticky.h
index 93043d8514..93043d8514 100644
--- a/includes/rts/Ticky.h
+++ b/rts/include/rts/Ticky.h
diff --git a/includes/rts/Time.h b/rts/include/rts/Time.h
index ab291cd6c5..ab291cd6c5 100644
--- a/includes/rts/Time.h
+++ b/rts/include/rts/Time.h
diff --git a/includes/rts/Timer.h b/rts/include/rts/Timer.h
index c60cd37590..c60cd37590 100644
--- a/includes/rts/Timer.h
+++ b/rts/include/rts/Timer.h
diff --git a/includes/rts/Types.h b/rts/include/rts/Types.h
index 51e8f80e66..51e8f80e66 100644
--- a/includes/rts/Types.h
+++ b/rts/include/rts/Types.h
diff --git a/includes/rts/Utils.h b/rts/include/rts/Utils.h
index 4aee9c3a67..4aee9c3a67 100644
--- a/includes/rts/Utils.h
+++ b/rts/include/rts/Utils.h
diff --git a/includes/rts/prof/CCS.h b/rts/include/rts/prof/CCS.h
index 7685f03003..7685f03003 100644
--- a/includes/rts/prof/CCS.h
+++ b/rts/include/rts/prof/CCS.h
diff --git a/includes/rts/prof/Heap.h b/rts/include/rts/prof/Heap.h
index 90700c809b..90700c809b 100644
--- a/includes/rts/prof/Heap.h
+++ b/rts/include/rts/prof/Heap.h
diff --git a/includes/rts/prof/LDV.h b/rts/include/rts/prof/LDV.h
index 73f7786537..73f7786537 100644
--- a/includes/rts/prof/LDV.h
+++ b/rts/include/rts/prof/LDV.h
diff --git a/includes/rts/storage/Block.h b/rts/include/rts/storage/Block.h
index 626cddb2a2..730947e375 100644
--- a/includes/rts/storage/Block.h
+++ b/rts/include/rts/storage/Block.h
@@ -11,7 +11,7 @@
#include "ghcconfig.h"
/* The actual block and megablock-size constants are defined in
- * includes/Constants.h, all constants here are derived from these.
+ * rts/include/Constants.h, all constants here are derived from these.
*/
/* Block related constants (BLOCK_SHIFT is defined in Constants.h) */
diff --git a/includes/rts/storage/ClosureMacros.h b/rts/include/rts/storage/ClosureMacros.h
index b841ef8be0..b841ef8be0 100644
--- a/includes/rts/storage/ClosureMacros.h
+++ b/rts/include/rts/storage/ClosureMacros.h
diff --git a/includes/rts/storage/ClosureTypes.h b/rts/include/rts/storage/ClosureTypes.h
index 85dc1a0ce4..85dc1a0ce4 100644
--- a/includes/rts/storage/ClosureTypes.h
+++ b/rts/include/rts/storage/ClosureTypes.h
diff --git a/includes/rts/storage/Closures.h b/rts/include/rts/storage/Closures.h
index ebb836bca2..ebb836bca2 100644
--- a/includes/rts/storage/Closures.h
+++ b/rts/include/rts/storage/Closures.h
diff --git a/includes/rts/storage/FunTypes.h b/rts/include/rts/storage/FunTypes.h
index 3b066ef7dc..3b066ef7dc 100644
--- a/includes/rts/storage/FunTypes.h
+++ b/rts/include/rts/storage/FunTypes.h
diff --git a/includes/rts/storage/GC.h b/rts/include/rts/storage/GC.h
index 478503aaee..478503aaee 100644
--- a/includes/rts/storage/GC.h
+++ b/rts/include/rts/storage/GC.h
diff --git a/includes/rts/storage/Heap.h b/rts/include/rts/storage/Heap.h
index b3b1efaf9f..b3b1efaf9f 100644
--- a/includes/rts/storage/Heap.h
+++ b/rts/include/rts/storage/Heap.h
diff --git a/includes/rts/storage/InfoTables.h b/rts/include/rts/storage/InfoTables.h
index b97e12982b..b97e12982b 100644
--- a/includes/rts/storage/InfoTables.h
+++ b/rts/include/rts/storage/InfoTables.h
diff --git a/includes/rts/storage/MBlock.h b/rts/include/rts/storage/MBlock.h
index 3acefda9a0..3acefda9a0 100644
--- a/includes/rts/storage/MBlock.h
+++ b/rts/include/rts/storage/MBlock.h
diff --git a/includes/rts/storage/TSO.h b/rts/include/rts/storage/TSO.h
index 61215d9f38..61215d9f38 100644
--- a/includes/rts/storage/TSO.h
+++ b/rts/include/rts/storage/TSO.h
diff --git a/includes/stg/DLL.h b/rts/include/stg/DLL.h
index 133f4c0d42..11902fc239 100644
--- a/includes/stg/DLL.h
+++ b/rts/include/stg/DLL.h
@@ -37,7 +37,7 @@
# define DLLIMPORT
#endif
-/* The view of the ghc/includes/ header files differ ever so
+/* The view of the rts/include/ header files differ ever so
slightly depending on whether the RTS is being compiled
or not - so we're forced to distinguish between two.
[oh, you want details :) : Data symbols defined by the RTS
diff --git a/includes/stg/MachRegs.h b/rts/include/stg/MachRegs.h
index d50969b66a..d50969b66a 100644
--- a/includes/stg/MachRegs.h
+++ b/rts/include/stg/MachRegs.h
diff --git a/includes/stg/MachRegsForHost.h b/rts/include/stg/MachRegsForHost.h
index e902d528f6..e902d528f6 100644
--- a/includes/stg/MachRegsForHost.h
+++ b/rts/include/stg/MachRegsForHost.h
diff --git a/includes/stg/MiscClosures.h b/rts/include/stg/MiscClosures.h
index 30469c603d..c4cb7d45a4 100644
--- a/includes/stg/MiscClosures.h
+++ b/rts/include/stg/MiscClosures.h
@@ -622,7 +622,7 @@ extern StgWord CCS_SYSTEM[];
// scope and must match prototype assumed by
// 'GHC.StgToCmm.Prof'
// as opposed to real prototype declared in
-// 'includes/rts/prof/CCS.h'
+// 'rts/include/rts/prof/CCS.h'
void enterFunCCS (void *reg, void *ccsfn);
void * pushCostCentre (void *ccs, void *cc);
diff --git a/includes/stg/Prim.h b/rts/include/stg/Prim.h
index 20b3d45bee..20b3d45bee 100644
--- a/includes/stg/Prim.h
+++ b/rts/include/stg/Prim.h
diff --git a/includes/stg/Regs.h b/rts/include/stg/Regs.h
index e37ce3eba4..e37ce3eba4 100644
--- a/includes/stg/Regs.h
+++ b/rts/include/stg/Regs.h
diff --git a/includes/stg/SMP.h b/rts/include/stg/SMP.h
index 57eb618592..de706da290 100644
--- a/includes/stg/SMP.h
+++ b/rts/include/stg/SMP.h
@@ -35,7 +35,7 @@ void arm_atomic_spin_unlock(void);
* pointed to by p with the value w, returning the old value.
*
* Used for locking closures during updates (see lockClosure()
- * in includes/rts/storage/SMPClosureOps.h) and the MVar primops.
+ * in rts/include/rts/storage/SMPClosureOps.h) and the MVar primops.
*/
EXTERN_INLINE StgWord xchg(StgPtr p, StgWord w);
diff --git a/includes/stg/Ticky.h b/rts/include/stg/Ticky.h
index 3d9d4aee4f..3d9d4aee4f 100644
--- a/includes/stg/Ticky.h
+++ b/rts/include/stg/Ticky.h
diff --git a/includes/stg/Types.h b/rts/include/stg/Types.h
index 696df3e206..696df3e206 100644
--- a/includes/stg/Types.h
+++ b/rts/include/stg/Types.h
diff --git a/rts/package.conf.in b/rts/package.conf.in
index b0796595ff..50a372b2f0 100644
--- a/rts/package.conf.in
+++ b/rts/package.conf.in
@@ -68,11 +68,11 @@ extra-libraries:
include-dirs: INCLUDE_DIR FFI_INCLUDE_DIR
#else /* !INSTALLING */
include-dirs: TOP"/rts/dist/build"
- TOP"/includes"
- TOP"/includes/dist-derivedconstants/header"
+ TOP"/rts/include"
+ TOP"/rts/include/dist-derivedconstants/header"
FFI_INCLUDE_DIR
LIBDW_INCLUDE_DIR
- TOP"/includes/dist-install/build"
+ TOP"/rts/include/dist-install/build"
#endif
includes: Stg.h
diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
index a08e007c2a..6e535a777c 100644
--- a/rts/rts.cabal.in
+++ b/rts/rts.cabal.in
@@ -51,7 +51,7 @@ flag thread-sanitizer
description:
Enable checking for data races using the ThreadSanitizer (TSAN)
mechanism supported by GCC and Clang. See Note [ThreadSanitizer]
- in @includes/rts/TSANUtils.h@.
+ in @rts/include/rts/TSANUtils.h@.
default: False
library
@@ -141,13 +141,13 @@ library
if !flag(smp)
cpp-options: -DNOSMP
- include-dirs: build ../includes includes
- includes/dist-derivedconstants/header @FFIIncludeDir@
+ include-dirs: build include
+ include/dist-derivedconstants/header @FFIIncludeDir@
@LibdwIncludeDir@
includes: Stg.h
install-includes: Cmm.h HsFFI.h MachDeps.h Rts.h RtsAPI.h Stg.h
ghcautoconf.h ghcconfig.h ghcplatform.h ghcversion.h
- -- ^ from ../includes
+ -- ^ from include
DerivedConstants.h ffi.h ffitarget.h
-- ^ generated
rts/Adjustor.h
@@ -176,6 +176,7 @@ library
rts/PrimFloat.h
rts/Profiling.h
rts/IPE.h
+ rts/PosixSource.h
rts/Signals.h
rts/SpinLock.h
rts/StableName.h
diff --git a/rts/sm/Compact.h b/rts/sm/Compact.h
index be9a09d4ab..9f4b396005 100644
--- a/rts/sm/Compact.h
+++ b/rts/sm/Compact.h
@@ -48,7 +48,7 @@
where we allocate single-word heap objects (e.g. a non-top-level FUN with
empty payload) we add one non-pointer field to the payload so that the object
will have two words. The minimum amount of words in the payload is defined in
- includes/rts/Constants.h as MIN_PAYLOAD_SIZE.
+ rts/include/rts/Constants.h as MIN_PAYLOAD_SIZE.
(See also !1701 where we discussed lifting this restriction and allocating
two bits per object)
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 0528c15fc9..f44fce9147 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -255,10 +255,10 @@ $1/$2/build/tmp/$$($1_$2_PROG)-wrapper.c: driver/utils/dynwrapper.c | $$$$(dir $
cat driver/utils/dynwrapper.c >> $$@
$1/$2/build/tmp/$$($1_$2_PROG_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG)-inplace-wrapper.c $1/$2/build/tmp/$$($1_$2_PROG).dll | $$$$(dir $$$$@)/.
- $$(call cmd,$1_$2_HC) -no-hs-main -no-auto-link-packages -optc-g -optc-O0 -Iincludes $$< -o $$@
+ $$(call cmd,$1_$2_HC) -no-hs-main -no-auto-link-packages -optc-g -optc-O0 $$< -o $$@
$1/$2/build/tmp/$$($1_$2_PROG) : $1/$2/build/tmp/$$($1_$2_PROG)-wrapper.c $1/$2/build/tmp/$$($1_$2_PROG).dll | $$$$(dir $$$$@)/.
- $$(call cmd,$1_$2_HC) -no-hs-main -no-auto-link-packages -optc-g -optc-O0 -Iincludes $$< -o $$@
+ $$(call cmd,$1_$2_HC) -no-hs-main -no-auto-link-packages -optc-g -optc-O0 $$< -o $$@
$1/$2/build/tmp/$$($1_$2_PROG).dll : $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/.
$$(call build-dll,$1,$2,$$($1_$2_PROGRAM_WAY),,$$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS),$$@)
diff --git a/testsuite/tests/codeGen/should_compile/cg007.hs b/testsuite/tests/codeGen/should_compile/cg007.hs
index 5ef739bd47..bfeb5d677f 100644
--- a/testsuite/tests/codeGen/should_compile/cg007.hs
+++ b/testsuite/tests/codeGen/should_compile/cg007.hs
@@ -6,7 +6,7 @@ import Foreign.C.Types
{-
During 6.11, this was failing like this:
-In file included from /ghc/includes/Stg.h:207,
+In file included from /rts/include/Stg.h:207,
from /tmp/ghc2904_0/ghc2904_0.hc:3:0:
/tmp/ghc2904_0/ghc2904_0.hc: In function `swM_ret':
diff --git a/testsuite/tests/llvm/should_run/subsections_via_symbols/Makefile b/testsuite/tests/llvm/should_run/subsections_via_symbols/Makefile
index ab81b8ceb5..10147ed108 100644
--- a/testsuite/tests/llvm/should_run/subsections_via_symbols/Makefile
+++ b/testsuite/tests/llvm/should_run/subsections_via_symbols/Makefile
@@ -4,7 +4,7 @@ include $(TOP)/mk/test.mk
# pass -dead_strip to the linker.
HCFLAGS = -O2 -fllvm
-HCINC = $(TOP)/../includes
+HCINC = $(TOP)/../rts/include
.PHONY: subsections_via_symbols
subsections_via_symbols:
diff --git a/utils/deriveConstants/Main.hs b/utils/deriveConstants/Main.hs
index 5a227fb63f..8d3a6798c0 100644
--- a/utils/deriveConstants/Main.hs
+++ b/utils/deriveConstants/Main.hs
@@ -10,7 +10,7 @@ into non-C source containing this information.
We want to get information about code generated by the C compiler,
such as the sizes of types, and offsets of struct fields. We need
this because the layout of certain runtime objects is defined in C
-headers (e.g. includes/rts/storage/Closures.h), but we need access to
+headers (e.g. rts/include/rts/storage/Closures.h), but we need access to
the layout of these structures from a Haskell program (GHC).
One way to do this is to compile and run a C program that includes the
@@ -46,15 +46,15 @@ main = do opts <- parseArgs
Nothing -> die ("No " ++ descr ++ " given")
mode <- getOption "mode" o_mode
fn <- getOption "output filename" o_outputFilename
- os <- getOption "target os" o_targetOS
-
- let haskellWanteds = [ what | (wh, what) <- wanteds os
- , wh `elem` [Haskell, Both] ]
case mode of
- Gen_Haskell_Type -> writeHaskellType fn haskellWanteds
+ Gen_Haskell_Type ->
+ writeHaskellType fn
+ [ what | (wh, what) <- wanteds "OS must not matter"
+ , wh `elem` [Haskell, Both] ]
Gen_Computed cm ->
- do tmpdir <- getOption "tmpdir" o_tmpdir
+ do os <- getOption "target os" o_targetOS
+ tmpdir <- getOption "tmpdir" o_tmpdir
gccProg <- getOption "gcc program" o_gccProg
nmProg <- getOption "nm program" o_nmProg
let verbose = o_verbose opts
@@ -715,7 +715,7 @@ getWanted verbose os tmpdir gccProgram gccFlags nmProgram mobjdumpProgram
"#define PROFILING",
"#define THREADED_RTS",
"",
- "#include \"PosixSource.h\"",
+ "#include \"rts/PosixSource.h\"",
"#include \"Rts.h\"",
"#include \"StableName.h\"",
"#include \"Capability.h\"",
diff --git a/utils/deriveConstants/deriveConstants.cabal b/utils/deriveConstants/deriveConstants.cabal
index 36ba7ebe1f..503cae1f25 100644
--- a/utils/deriveConstants/deriveConstants.cabal
+++ b/utils/deriveConstants/deriveConstants.cabal
@@ -8,7 +8,7 @@ Maintainer: XXX
Synopsis: Derive header files containing various constants for the GHC build process
Description:
This utility is responsible for generating a number of C header files
- needed during the GHC build process. See @includes/ghc.mk@ in the GHC
+ needed during the GHC build process. See @rts/include/ghc.mk@ in the GHC
build system for details.
Category: Development
build-type: Simple
diff --git a/utils/genapply/Main.hs b/utils/genapply/Main.hs
index a6d944efa4..a0209966db 100644
--- a/utils/genapply/Main.hs
+++ b/utils/genapply/Main.hs
@@ -15,16 +15,16 @@ module Main(main) where
-- Note [Genapply target as host for RTS macros]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- We improperly include *HOST* macros for our target...
-#include "../../includes/ghcconfig.h"
+#include "../../rts/include/ghcconfig.h"
-- ...so that this header defines the right stuff. It is the RTS's host, but
-- our target, as we are generating code that uses that RTS.
-#include "../../includes/stg/MachRegsForHost.h"
+#include "../../rts/include/stg/MachRegsForHost.h"
-#include "../../includes/rts/Constants.h"
+#include "../../rts/include/rts/Constants.h"
-- Needed for TAG_BITS
-#include "../../includes/MachDeps.h"
+#include "../../rts/include/MachDeps.h"
import Prelude hiding ((<>))
@@ -1002,7 +1002,7 @@ applyTypes = [
-- changes, so we could share the apply/save code between lots of cases.
--
-- NOTE: other places to change if you change stackApplyTypes:
--- - includes/rts/storage/FunTypes.h
+-- - rts/include/rts/storage/FunTypes.h
-- - GHC.StgToCmm.Layout: stdPattern
stackApplyTypes = [
[],