| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before we really only had two verbosity levels, normal and verbose.
There are now three levels:
Normal: Commands show stderr (no stdout) and minimal build failure messages.
Verbose (-V): Commands also show stdout, build failure message contains
callstack and additional information
Diagnostic (-VV): Very verbose output showing all command lines and passing -v3 to cabal commands.
-V is similar to the default verbosity from before (but a little more
verbose)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change reduces the default verbosity of error messages to omit the
stack trace information from the printed output.
For example, before all errors would have a long call trace:
```
Error when running Shake build system:
at action, called at src/Rules.hs:39:19 in main:Rules
at need, called at src/Rules.hs:61:5 in main:Rules
* Depends on: _build/stage1/lib/package.conf.d/ghc-9.3.conf
* Depends on: _build/stage1/compiler/build/libHSghc-9.3.a
* Depends on: _build/stage1/compiler/build/GHC/Tc/Solver/Rewrite.o
* Depends on: _build/stage1/compiler/build/GHC/Tc/Solver/Rewrite.o _build/stage1/compiler/build/GHC/Tc/Solver/Rewrite.hi
at cmd', called at src/Builder.hs:330:23 in main:Builder
at cmd, called at src/Builder.hs:432:8 in main:Builder
* Raised the exception:
```
Which can be useful but it confusing for GHC rather than hadrian
developers.
Ticket #20386
|
| |
|
| |
|
|
|
|
| |
The compiler should be independent of the target.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the output contain a lot of verbose information about timining
various things to do with shake which wasn't so useful for developers.
```
shakeArgsWith 0.000s 0%
Function shake 0.010s 0%
Database read 0.323s 12% ===
With database 0.031s 1%
Running rules 2.301s 86% =========================
Pool finished (1786 threads, 5 max) 0.003s 0%
Cleanup 0.000s 0%
Total 2.669s 100%
Build completed in 2.67s
```
Now the output just contains the last line
```
Build completed in 2.67s
```
Ticket #20381
|
|
|
|
|
|
| |
The "ipe" transformer compilers everything in stage2 with
`-finfo-table-map` and `-fdistinct-constructor-tables` to produce a
compiler which is usable with `-hi` profiling and ghc-debug.
|
|
|
|
| |
As noted in #20327, the previous guidance was out-of-date.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously Hadrian would simply install the settings file generated in
the build environment during the binary distribution installation. This
is wrong since these environments may differ (e.g. different `cc`
versions).
We noticed on Darwin when installation of a binary distribution produced
on a newer Darwin release resulted in a broken compiler due to the
installed `settings` file incorrectly claiming that `cc` supported
`-no-pie`.
Fixing this sadly requires a bit of code duplication since `settings` is
produced by Hadrian and not `configure`. For now I have simply
duplicated the `settings` generation logic used by the Make build system
into Hadrian's bindist Makefile.
Ultimately the solution will probably involve shipping a freestanding
utility to replace `configure`'s toolchain probing logic and generate a
toolchain description file (similar to `settings`) as described
in #19877.
Fixes #20253.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For some inexplicable reason `-P` only takes effect on the mac version
of p when you also pass `-R`.
> Symbolic links are always followed unless the -R flag is set, in which case symbolic
> links are not followed, by default.
> -P If the -R option is specified, no symbolic links are followed. This is the
> default.
Fixes #20254
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
```
[matt@nixos:~/ghc-unique-spin]$ ls _build/bindist/ghc-9.3.20210813-x86_64-unknown-linux/bin/
ghc haddock runghc
ghc-9.3.20210813 haddock-ghc-9.3.20210813 runghc-9.3.20210813
ghc-iserv hp2ps runhaskell
ghc-iserv-dyn hp2ps-ghc-9.3.20210813 runhaskell-9.3.20210813
ghc-iserv-dyn-ghc-9.3.20210813 hpc unlit
ghc-iserv-ghc-9.3.20210813 hpc-ghc-9.3.20210813 unlit-ghc-9.3.20210813
ghc-pkg hsc2hs
ghc-pkg-9.3.20210813 hsc2hs-ghc-9.3.20210813
[matt@nixos:~/ghc-unique-spin]$ ls _build/bindist/ghc-9.3.20210813-x86_64-unknown-linux/wrappers/
ghc ghc-pkg-9.3.20210813 hpc runghc-9.3.20210813
ghc-9.3.20210813 haddock hpc-ghc-9.3.20210813 runhaskell
ghci haddock-ghc-9.3.20210813 hsc2hs runhaskell-9.3.20210813
ghci-9.3.20210813 hp2ps hsc2hs-ghc-9.3.20210813
ghc-pkg hp2ps-ghc-9.3.20210813 runghc
```
See the discussion on #19571 where we decided that it was most sensible
to use the same version number as a suffix for all executables. For
those whose version number is different to normal (for example, haddock
as it's own versioning scheme) the additional "ghc" suffix is used.
Cabal already knows to look for this suffix so should work nicely with
existing tooling.
|
|
|
|
|
| |
This reduces the resulting binary size on windows where the executables
were statically linked.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #19571
bin folder now containers/
```
ghc ghc-iserv-dyn-9.3.20210813 hp2ps hsc2hs-0.68.8 unlit
ghc-9.3.20210813 ghc-pkg hp2ps-0.1 runghc unlit-0.1
ghc-iserv ghc-pkg-9.3.20210813 hpc runghc-9.3.20210813
ghc-iserv-9.3.20210813 haddock hpc-0.68 runhaskell
ghc-iserv-dyn haddock-2.24.0 hsc2hs runhaskell-9.3.20210813
```
which installed via wrappers looks like
```
lrwxrwxrwx 1 matt users 16 Aug 13 17:32 ghc -> ghc-9.3.20210813
-rwxr-xr-x 1 matt users 446 Aug 13 17:32 ghc-9.3.20210813
lrwxrwxrwx 1 matt users 17 Aug 13 17:32 ghci -> ghci-9.3.20210813
-rwxr-xr-x 1 matt users 480 Aug 13 17:32 ghci-9.3.20210813
lrwxrwxrwx 1 matt users 20 Aug 13 17:32 ghc-pkg -> ghc-pkg-9.3.20210813
-rwxr-xr-x 1 matt users 506 Aug 13 17:32 ghc-pkg-9.3.20210813
lrwxrwxrwx 1 matt users 14 Aug 13 17:32 haddock -> haddock-2.24.0
-rwxr-xr-x 1 matt users 454 Aug 13 17:32 haddock-2.24.0
lrwxrwxrwx 1 matt users 9 Aug 13 17:32 hp2ps -> hp2ps-0.1
-rwxr-xr-x 1 matt users 420 Aug 13 17:32 hp2ps-0.1
lrwxrwxrwx 1 matt users 8 Aug 13 17:32 hpc -> hpc-0.68
-rwxr-xr-x 1 matt users 418 Aug 13 17:32 hpc-0.68
lrwxrwxrwx 1 matt users 13 Aug 13 17:32 hsc2hs -> hsc2hs-0.68.8
-rwxr-xr-x 1 matt users 1.2K Aug 13 17:32 hsc2hs-0.68.8
lrwxrwxrwx 1 matt users 19 Aug 13 17:32 runghc -> runghc-9.3.20210813
-rwxr-xr-x 1 matt users 457 Aug 13 17:32 runghc-9.3.20210813
lrwxrwxrwx 1 matt users 23 Aug 13 17:32 runhaskell -> runhaskell-9.3.20210813
-rwxr-xr-x 1 matt users 465 Aug 13 17:32 runhaskell-9.3.20210813
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since !6133 we are more consistent about producing versioned
executables but we still didn't produce versioned wrappers. This patch
adds the corresponding versioned wrappers to match the versioned
executables in the relocatable bindist.
I also fixed the ghci wrapper so that it wasn't overwritten during
installation.
The final bindir looks like:
```
lrwxrwxrwx 1 matt users 16 Aug 12 11:56 ghc -> ghc-9.3.20210809
-rwxr-xr-x 1 matt users 674 Aug 12 11:56 ghc-9.3.20210809
lrwxrwxrwx 1 matt users 17 Aug 12 11:56 ghci -> ghci-9.3.20210809
-rwxr-xr-x 1 matt users 708 Aug 12 11:56 ghci-9.3.20210809
lrwxrwxrwx 1 matt users 20 Aug 12 11:56 ghc-pkg -> ghc-pkg-9.3.20210809
-rwxr-xr-x 1 matt users 734 Aug 12 11:56 ghc-pkg-9.3.20210809
lrwxrwxrwx 1 matt users 14 Aug 12 11:56 haddock -> haddock-2.24.0
-rwxr-xr-x 1 matt users 682 Aug 12 11:56 haddock-2.24.0
lrwxrwxrwx 1 matt users 9 Aug 12 11:56 hp2ps -> hp2ps-0.1
-rwxr-xr-x 1 matt users 648 Aug 12 11:56 hp2ps-0.1
lrwxrwxrwx 1 matt users 8 Aug 12 11:56 hpc -> hpc-0.68
-rwxr-xr-x 1 matt users 646 Aug 12 11:56 hpc-0.68
lrwxrwxrwx 1 matt users 13 Aug 12 11:56 hsc2hs -> hsc2hs-0.68.8
-rwxr-xr-x 1 matt users 1.4K Aug 12 11:56 hsc2hs-0.68.8
lrwxrwxrwx 1 matt users 19 Aug 12 11:56 runghc -> runghc-9.3.20210809
-rwxr-xr-x 1 matt users 685 Aug 12 11:56 runghc-9.3.20210809
```
Fixes #20225
|
|
|
|
|
|
|
| |
This is necessary because the symlink needs to be created between two
arbritary filepaths in the build tree, it's hard to compute how to get
between them relatively. As this symlink doesn't end up in a bindist
then it's fine for it to be absolute.
|
|
|
|
| |
This reverts commit d45e3cda669c5822aa213d42bf7f7c551b9d1bbf.
|
|
|
|
|
|
|
|
| |
`stack sdist` in the hadrian directory reported:
Package check reported the following errors:
To use the 'extra-doc-files' field the package needs to specify at
least 'cabal-version: >= 1.18'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The symlink structure now looks like:
```
lrwxrwxrwx 1 matt users 16 Aug 3 16:27 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/ghc -> ghc-9.3.20210721
-rwxr-xr-x 1 matt users 1750336 Aug 3 15:00 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/ghc-9.3.20210721
lrwxrwxrwx 1 matt users 22 Aug 3 16:27 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/ghc-iserv -> ghc-iserv-9.3.20210721
-rwxr-xr-x 1 matt users 31703176 Aug 3 15:00 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/ghc-iserv-9.3.20210721
lrwxrwxrwx 1 matt users 26 Aug 3 16:27 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/ghc-iserv-dyn -> ghc-iserv-dyn-9.3.20210721
-rwxr-xr-x 1 matt users 40808 Aug 3 15:00 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/ghc-iserv-dyn-9.3.20210721
lrwxrwxrwx 1 matt users 20 Aug 3 16:27 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/ghc-pkg -> ghc-pkg-9.3.20210721
-rwxr-xr-x 1 matt users 634872 Aug 3 15:00 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/ghc-pkg-9.3.20210721
lrwxrwxrwx 1 matt users 14 Aug 3 16:27 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/haddock -> haddock-2.24.0
-rwxr-xr-x 1 matt users 4336664 Aug 3 15:00 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/haddock-2.24.0
lrwxrwxrwx 1 matt users 9 Aug 3 16:27 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/hp2ps -> hp2ps-0.1
-rwxr-xr-x 1 matt users 49312 Aug 3 15:00 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/hp2ps-0.1
lrwxrwxrwx 1 matt users 8 Aug 3 16:27 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/hpc -> hpc-0.68
-rwxr-xr-x 1 matt users 687896 Aug 3 15:00 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/hpc-0.68
lrwxrwxrwx 1 matt users 13 Aug 3 16:27 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/hsc2hs -> hsc2hs-0.68.8
-rwxr-xr-x 1 matt users 729904 Aug 3 15:00 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/hsc2hs-0.68.8
lrwxrwxrwx 1 matt users 19 Aug 3 16:27 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/runghc -> runghc-9.3.20210721
-rwxr-xr-x 1 matt users 57672 Aug 3 15:00 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/runghc-9.3.20210721
lrwxrwxrwx 1 matt users 9 Aug 3 16:27 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/unlit -> unlit-0.1
-rwxr-xr-x 1 matt users 14896 Aug 3 15:00 _build/bindist/ghc-9.3.20210721-x86_64-unknown-linux/bin/unlit-0.1
```
Fixes #20198
|
| |
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hadrian's `--configure` support has long been a point of contention.
While it's convenient, it also introduces a fair bit of implementation
complexity and quite a few non-trivial failure modes
(see #19804, 17883, and #15948). Moreover, the feature is actively
misleading to the user: `./configure` is the primary means for the user
to inform the build system about the system environment and in general
will require input from the user.
This commits removes the feature, replacing the flag with a stub
message informing the user of the deprecation.
Closes #20167.
|
|
|
|
|
|
|
| |
Hadrian uses the RTS ways to determine which iserv programs to embed
into bindist. But profiled iserv program (and any other code) can't be
built without profiling libs and Hadrian fails. So we disable the
profiling RTS way with the no_profiled_libs flavour transformer.
|
|
|
|
|
|
|
|
|
|
|
| |
The package.cache needs to have a later mod-time than all of the .conf
files. This invariant can be destroyed by `cp -r` and so we run `ghc-pkg
recache` to ensure the package database which is distributed is
consistent.
If you are installing a relocatable bindist, for example, on windows,
you should preserve mtimes by using cp -a or run ghc-pkg recache after
installing.
|
| |
|
|
|
|
| |
Fixes #19868
|
| |
|
|
|
|
|
|
|
|
|
| |
Before we would just copy the unversioned executable into the bindist.
Now the actual executable is copied into the bindist and a version
suffix is added. Then a wrapper or symlink is added which points to the
versioned executable.
Fixes #20074
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
create
Exes
----
Before: The whole bin/ folder was copied which could contain random old/stale/testsuite executables
After: Be precise
Wrappers
--------
Before: Wrappers were created for everything in the bin folder,
including internal executables such as "unlit"
After: Only create wrappers for the specific things which we want to
include in the user's path.
This makes the hadrian bindists match up more closely with the make
bindists.
|
| |
|
|
|
|
|
| |
Previously the rts's cabal file would claim that it bundled libffi, even
if we are using the system's libffi. Fixes #19869.
|
|
|
|
|
| |
Previously we would often allow cabal flags to default, making it harder
than necessary to reason about the effective build configuration.
|
|
|
|
|
| |
Here we introduce a very thin abstraction for allocating, filling, and
freezing executable pages to replace allocateExec.
|
| |
|
|
|
|
|
|
| |
Previously hadrian would add a -I$FfiIncludeDir flag to compiler
invocations even if FfiIncludeDir was null, resulting in compilation
errors.
|
|
|
|
|
| |
The README had got a little out of sync with the current state of
affairs.
|
|
|
|
|
| |
'-x c++' was found to be required on Darwin Clang 11 and 12.
'-std=c++' was found to be needed on Clang 12 but not 11.
|
|
|
|
|
|
|
|
|
| |
Update submodule libffi-tarballs to upstream commit 4f9e20a.
Remove C compiler flags that suppress warnings in the RTS. Those
warnings have been fixed by libffi upstream.
Fixes #19885
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- Move 'count-deps' into 'ghc/utils' so that it can be called standalone.
- Move 'testsuite/tests/parser/should_run/' tests 'CountParserDeps' and
'CountAstDeps' to 'testsuite/tests/count-deps' and reimplement in terms
of calling the utility
- Document how to use 'count-deps' in 'ghc/utils/count-deps/README'
|
|
|
|
|
|
|
|
|
| |
The rule before decided to build the whole stage1 compiler, but this was
unecessary as we were just missing one header file which can be
generated directly by calling configure.
Before: 18 minutes
After: 54s
|
|
|
|
| |
This reverts commit 673ff667c98eafc89e6746d1ac69d33b8330d755.
|