summaryrefslogtreecommitdiff
path: root/hadrian
Commit message (Collapse)AuthorAgeFilesLines
* hadrian: Update comments on verbosity handlingMatthew Pickering2021-09-282-2/+14
|
* hadrian: Update documentation for new verbosity optionsMatthew Pickering2021-09-282-37/+5
|
* hadrian: Rework the verbosity levelsMatthew Pickering2021-09-286-26/+27
| | | | | | | | | | | | | 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)
* hadrian: Remove deprecated tracing functionsMatthew Pickering2021-09-2814-27/+27
|
* hadrian: Reduce default verbosityMatthew Pickering2021-09-283-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* testsuite: Pass CFLAGS to hsc2hs testsBen Gamari2021-09-232-0/+6
|
* hadrian: Pass CFLAGS to gmp configureGHC GitLab CI2021-09-231-0/+4
|
* Link with libm dynamically (#19877)Sylvain Henry2021-09-223-0/+3
| | | | The compiler should be independent of the target.
* hadrian: Disable verbose timing informationMatthew Pickering2021-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add "ipe" flavour transformer to add support for building with IPE debug infoMatthew Pickering2021-09-172-0/+18
| | | | | | 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.
* hadrian: Recommend use of +werror over explicit flavour modificationBen Gamari2021-09-131-4/+4
| | | | As noted in #20327, the previous guidance was out-of-date.
* hadrian: Ensure that settings is regenerated during bindist installationBen Gamari2021-09-072-1/+64
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* hadrian: Use cp -RP rather than -P in install to copy symlinksMatthew Pickering2021-08-241-1/+1
| | | | | | | | | | | | | 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
* hadrian: Use ghc version as suffix for all executablesMatthew Pickering2021-08-231-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` [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.
* hadrian: Write version wrappers in C rather than HaskellMatthew Pickering2021-08-237-22/+232
| | | | | This reduces the resulting binary size on windows where the executables were statically linked.
* hadrian: Include runhaskell in bindistMatthew Pickering2021-08-231-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* hadrian: Also produce versioned wrapper scriptsMatthew Pickering2021-08-132-34/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Create absolute symlink for test executablesMatthew Pickering2021-08-131-1/+3
| | | | | | | 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.
* Revert "hadrian: Make copyFileLinked a bit more robust"Matthew Pickering2021-08-132-14/+11
| | | | This reverts commit d45e3cda669c5822aa213d42bf7f7c551b9d1bbf.
* Hadrian: fix .cabal fileSylvain Henry2021-08-091-1/+1
| | | | | | | | `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'.
* Move `/includes` to `/rts/include`, sort per package betterJohn Ericson2021-08-095-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* hadrian: Create relative rather than absolute symlinks in binary dist folderMatthew Pickering2021-08-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove hschooks.c and -no-hs-main for ghc-binZubin Duggal2021-08-031-1/+1
|
* include README in hadrian.cabal Jens Petersen2021-08-031-0/+1
| | | [skip ci]
* hadrian: Drop --configure supportBen Gamari2021-08-024-93/+3
| | | | | | | | | | | | | | | 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: disable profiled RTS with no_profiled_libs flavour transformerSylvain Henry2021-07-281-1/+3
| | | | | | | 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.
* hadrian: Call ghc-pkg recache after copying package database into bindistMatthew Pickering2021-07-271-0/+5
| | | | | | | | | | | 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.
* hadrian: Add exe suffix to executables in testsuiteMatthew Pickering2021-07-271-4/+4
|
* packaging: Don't include configure scripts in windows bindistMatthew Pickering2021-07-271-11/+13
| | | | Fixes #19868
* packaging: Add note about wrappersMatthew Pickering2021-07-271-3/+27
|
* packaging: Create both versioned and unversioned executablesMatthew Pickering2021-07-272-6/+61
| | | | | | | | | 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
* hadrian: Remove special haddock copying ruleMatthew Pickering2021-07-271-12/+0
|
* hadrian: Update hsc2hs wrapper to match current masterMatthew Pickering2021-07-271-19/+5
|
* packaging: Give ghc-pkg the same version as ProjectVersionMatthew Pickering2021-07-271-0/+1
|
* packaging: Be more precise about which executables to copy and wrappers to ↵Matthew Pickering2021-07-271-14/+43
| | | | | | | | | | | | | | | | | | | 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.
* validate: update quick-validate flavour for validation with --fastAlina Banerjee2021-07-272-12/+18
|
* rts: Don't declare libCffi as bundled when using system libffiBen Gamari2021-07-271-0/+2
| | | | | Previously the rts's cabal file would claim that it bundled libffi, even if we are using the system's libffi. Fixes #19869.
* hadrian: Always specify flag values explicitlyBen Gamari2021-07-273-24/+33
| | | | | Previously we would often allow cabal flags to default, making it harder than necessary to reason about the effective build configuration.
* rts: Introduce and use ExecPage abstractionBen Gamari2021-07-271-1/+1
| | | | | Here we introduce a very thin abstraction for allocating, filling, and freezing executable pages to replace allocateExec.
* rts: Break up adjustor logicBen Gamari2021-07-275-13/+14
|
* hadrian: Don't add empty -I argumentswip/hadrian/libffi-includesBen Gamari2021-07-251-1/+1
| | | | | | Previously hadrian would add a -I$FfiIncludeDir flag to compiler invocations even if FfiIncludeDir was null, resulting in compilation errors.
* hadrian: Update docs targets documentation [skip ci]wip/hadrian-docs-targetsMatthew Pickering2021-07-201-3/+21
| | | | | The README had got a little out of sync with the current state of affairs.
* Pass '-x c++' and '-std=c++11' to `cc` for cpp files, in HadrianEthan Kiang2021-07-065-13/+30
| | | | | '-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.
* Fix libffi on PowerPCPeter Trommler2021-06-281-6/+1
| | | | | | | | | 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
* rts: move xxxHash out of the user namespaceTamar Christina2021-06-241-4/+2
|
* hadrian: Pass correct leading_underscore configuration to testsMatthew Pickering2021-06-231-0/+2
|
* hadrian/README.md: update bignum optionsFraser Tweedale2021-06-201-2/+1
|
* Make 'count-deps' a ghc/util standalone programShayne Fletcher2021-06-055-5/+17
| | | | | | | | - 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'
* hadrian: Speed up lint:base ruleMatthew Pickering2021-06-021-2/+8
| | | | | | | | | 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
* Revert "hadrian: Don't always links against libffi"Matthew Pickering2021-05-251-1/+2
| | | | This reverts commit 673ff667c98eafc89e6746d1ac69d33b8330d755.