From d5de970dafd5876ef30601697576167f56b9c132 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 22 Jul 2021 07:26:47 +0000 Subject: 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. --- rts/rts.cabal.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'rts/rts.cabal.in') 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 -- cgit v1.2.1