summaryrefslogtreecommitdiff
path: root/hadrian
Commit message (Collapse)AuthorAgeFilesLines
* testsuite: Only run llvm ways if llc is availableBen Gamari2020-08-181-3/+0
| | | | | | | | | As noted in #18560, we previously would always run the LLVM ways since `configure` would set `SettingsLlcCommand` to something non-null when it otherwise couldn't find the `llc` executable. Now we rather probe for the existence of the `llc` executable in the testsuite driver. Fixes #18560.
* gitlab-ci: Use MR base commit as performance baselineBen Gamari2020-08-181-0/+4
|
* hadrian: depend on boot compiler version #18001Adam Sandberg Ericsson2020-08-091-1/+6
|
* Refactor handling of object mergingBen Gamari2020-08-059-3/+33
| | | | | | | | | Previously to merge a set of object files we would invoke the linker as usual, adding -r to the command-line. However, this can result in non-sensical command-lines which causes lld to balk (#17962). To avoid this we introduce a new tool setting into GHC, -pgmlm, which is the linker which we use to merge object files.
* hadrian: Fix running stage0/bin/ghc with wrong package DB. Fixes #17468.Niklas Hambüchen2020-08-032-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the invocation of `cabal configure`, `--ghc-pkg-option=--global-package-db` was already given correctly to tell `stage0/bin/ghc-pkg` that it should use the package DB in `stage1/`. However, `ghc` needs to be given this information as well, not only `ghc-pkg`! Until now that was not the case; the package DB in `stage0` was given to `ghc` instead. This was wrong, because there is no binary compatibility guarantee that says that the `stage0` DB's `package.cache` (which is written by the stage0 == system-provided ghc-pkg) can be deserialised by the `ghc-pkg` from the source code tree. As a result, when trying to add fields to `InstalledPackageInfo` that get serialised into / deserialised from the `package.cache`, errors like _build/stage0/lib/package.conf.d/package.cache: GHC.PackageDb.readPackageDb: inappropriate type (Not a valid Unicode code point!) would appear. This was because the `stage0/bin/ghc would try to deserialise the newly added fields from `_build/stage0/lib/package.conf.d/package.cache`, but they were not in there because the system `ghc-pkg` doesn't know about them and thus didn't write them there. It would try to do that because any GHC by default tries to read the global package db in `../lib/package.conf.d/package.cache`. For `stage0/bin/ghc` that *can never work* as explained above, so we must disable this default via `-no-global-package-db` and give it the correct package DB explicitly. This is the same problem as #16534, and the same fix as in MR !780 (but in another context; that one was for developers trying out the `stage0/bin/ghc` == `_build/ghc-stage1` interactively, while this fix is for a `cabal configure` invocation). I also noticed that the fix for #16534 forgot to pass `-no-global-package-db`, and have fixed that in this commit as well. It only worked until now because nobody tried to add a new ghc-pkg `.conf` field since the introduction of Hadrian.
* Fix build systemsSylvain Henry2020-07-252-8/+5
|
* Move GHC.Platform into the compilerSylvain Henry2020-07-251-10/+7
| | | | | | | Previously it was in ghc-boot so that ghc-pkg could use it. However it wasn't necessary because ghc-pkg only uses a subset of it: reading target arch and OS from the settings file. This is now done via GHC.Platform.ArchOS (was called PlatformMini before).
* Put PlatformConstants into PlatformSylvain Henry2020-07-252-5/+15
|
* Replace ghcWithNativeCodeGen with a proper Backend datatypeSylvain Henry2020-07-222-9/+1
| | | | | | | | | | | | | | | | * Represent backends with a `Backend` datatype in GHC.Driver.Backend * Don't detect the default backend to use for the target platform at compile time in Hadrian/make but at runtime. It makes "Settings" simpler and it is a step toward making GHC multi-target. * The latter change also fixes hadrian which has not been updated to take into account that the NCG now supports AIX and PPC64 (cf df26b95559fd467abc0a3a4151127c95cb5011b9 and d3c1dda60d0ec07fc7f593bfd83ec9457dfa7984) * Also we don't treat iOS specifically anymore (cf cb4878ffd18a3c70f98bdbb413cd3c4d1f054e1f)
* Remove unused "ncg" flagSylvain Henry2020-07-221-2/+1
| | | | | This flag has been removed in 066b369de2c6f7da03c88206288dca29ab061b31 in 2011.
* Enable BangPatterns, ScopedTypeVariables for ghc and hadrian by default.Andreas Klebinger2020-07-221-0/+1
| | | | This is only for their respective codebases.
* Add a Lint hadrian rule and an .hlint.yaml file in base/Hécate2020-07-184-4/+70
|
* Implement `fullCompilerVersion`Hécate2020-07-181-1/+1
| | | | | | | | Follow-up of https://gitlab.haskell.org/ghc/ghc/-/issues/18403 This MR adds `fullCompilerVersion`, a function that shares the same backend as the `--numeric-version` GHC flag, exposing a full, three-digit version datatype.
* winio: Drop Windows Vista support, require Windows 7Tamar Christina2020-07-151-10/+0
|
* hadrian: build check-ppr dynamic if GHC is build dynamicStefan Schulze Frielinghaus2020-07-131-1/+4
| | | | Fixes #18361
* hadrian: add flag to skip rebuilding dependency information #17636Adam Sandberg Ericsson2020-07-084-3/+30
|
* Hadrian: ghc-gmp.h shouldn't be a compiler dependencySylvain Henry2020-07-071-3/+0
|
* Bignum: don't build ghc-bignum with stage0Sylvain Henry2020-07-071-1/+0
| | | | Noticed by @Ericson2314
* hadrian: ignore cabal configure verbosity related flags #18131Adam Sandberg Ericsson2020-07-072-0/+4
|
* hadrian: make hadrian/ghci use the bootstrap compiler from configure #18190Adam Sandberg Ericsson2020-07-073-2/+8
|
* hadrian: link check-ppr against debugging RTS if ghcDebuggedStefan Schulze Frielinghaus2020-07-071-1/+6
|
* Add the __GHC_FULL_VERSION__ CPP macro to expose the full GHC versionHécate2020-07-031-1/+5
|
* Hadrian: fix PowerPC64le support (#17601)Sylvain Henry2020-07-021-3/+4
| | | | [ci skip]
* hadrian/make: Detect makeindexBen Gamari2020-06-253-7/+12
| | | | | | Previously we would simply assume that makeindex was available. Now we correctly detect it in `configure` and respect this conclusion in hadrian and make.
* hadrian: Bump pinned cabal.project to an existent index-stateSebastian Graf2020-06-181-1/+1
|
* Hadrian: fix build on Mac OS Catalina (#17798)Sylvain Henry2020-06-182-1/+4
|
* Update HadrianSylvain Henry2020-06-1722-132/+137
| | | | | | | | | | | | | | | * support ghc-bignum backend selection in flavours and command-line * support ghc-bignum "--check" flag (compare results of selected backend against results of the native one) in flavours and command-line (e.g. pass --bignum=check-gmp" to check the "gmp" backend) * remove the hack to workaround #15286 * build GMP only when the gmp backend is used * remove hacks to workaround `text` package flags about integer-*. We fix `text` to use ghc-bignum unconditionally in another patch
* hadrian: Build with threaded runtime if availableStefan Schulze Frielinghaus2020-06-171-18/+5
| | | | See #16873.
* hadrian: Drop redundant GHC argumentsBen Gamari2020-06-141-4/+0
| | | | Cabal should already be passing this arguments to GHC.
* hadrian: Fix rts include and library pathsBen Gamari2020-06-141-3/+6
| | | | | | | Fixes two bugs: * (?) and (<>) associated in a surprising way * We neglected to include libdw paths in the rts configure flags
* hadrian: Add missing deriveConstants dependency on ghcplatform.hBen Gamari2020-06-071-0/+3
| | | | | | | | deriveConstants wants to compile C sources which #include PosixSource.h, which itself #includes ghcplatform.h. Make sure that Hadrian knows about this dependency. Fixes #18290.
* Hadrian: fix binary-dist target for cross-compilationSylvain Henry2020-06-011-5/+8
|
* Clean up file paths for new module hierarchyTakenobu Tani2020-06-011-1/+1
| | | | | | | | | This updates comments only. This patch replaces file references according to new module hierarchy. See also: * https://gitlab.haskell.org/ghc/ghc/-/wikis/Make-GHC-codebase-more-modular * https://gitlab.haskell.org/ghc/ghc/issues/13009
* rts: Drop compatibility shims for Windows VistaBen Gamari2020-05-301-1/+1
| | | | | We can now assume that the thread and processor group interfaces are available.
* Build a threaded stage 1 if the bootstrapping GHC supports it.Travis Whitaker2020-05-294-20/+66
|
* hadrian: introduce 'install' targetAlp Mestanogullari2020-05-293-1/+38
| | | | | | | Its logic is very simple. It `need`s the `binary-dist-dir` target and runs suitable `configure` and `make install` commands for the user. A new `--prefix` command line argument is introduced to specify where GHC should be installed.
* hadrian: Don't track GHC's verbosity argumentBen Gamari2020-05-281-2/+4
| | | | | Teach hadrian to ignore GHC's -v argument in its recompilation check, thus fixing #18131.
* Hadrian: fix hp2ps error during cross-compilationSylvain Henry2020-05-241-0/+1
| | | | Fixed by @alp (see https://gitlab.haskell.org/ghc/ghc/issues/16051#note_274265)
* Hadrian: fix distDir per stageSylvain Henry2020-05-241-2/+5
|
* Hadrian: fix cross-compiler build (#16051)Sylvain Henry2020-05-241-14/+33
|
* Move Config module into GHC.SettingsSylvain Henry2020-05-242-3/+3
|
* Remove not needed hie-bios outputjneira2020-05-241-2/+0
|
* Honour previous values for CABAL and CABFLAGSjneira2020-05-241-2/+8
| | | | | | The immediate goal is let the hie-bios.bat script set CABFLAGS with `-v0` and remove all cabal output except the compiler arguments
* Add hie-bios script for windows systemsjneira2020-05-241-0/+5
| | | | It is a direct translation of the sh script
* Use Data.IntMap.disjointSimon Jakobi2020-05-141-3/+2
| | | | | | | | | Data.IntMap gained a dedicated `disjoint` function in containers-0.6.2.1. This patch applies this function where appropriate in hopes of modest compiler performance improvements. Closes #16806.
* hadrian: Tell testsuite driver about LLVM availabilityBen Gamari2020-05-131-1/+2
| | | | | | This reflects the logic present in the Make build system into Hadrian. Fixes #18167.
* hadrian: add a --freeze2 option to freeze stage 1 and 2Alp Mestanogullari2020-05-133-4/+20
|
* Remove custom ExceptionMonad class (#18075) (updating haddock submodule ↵Artem Pelenitsyn2020-05-041-0/+1
| | | | accordingly)
* Hadrian: Improve tool-args command to support more componentsMatthew Pickering2020-04-306-38/+134
| | | | | | | | There is a new command to hadrian, tool:path/to/file.hs, which returns the options needed to compile that file in GHCi. This is now used in the ghci script with argument `ghc/Main.hs` but its main purpose is to support the new multi-component branch of ghcide.
* hadrian: always capture both stdout and stderr when running a builder failsAlp Mestanogullari2020-04-271-21/+28
| | | | | | | | | | | | | The idea being that when a builder('s command) fails, we quite likely want to have all the information available to figure out why. Depending on the builder _and_ the particular problem, the useful bits of information can be printed on stdout or stderr. We accomplish this by defining a simple wrapper for Shake's `cmd` function, that just _always_ captures both streams in case the command returns a non-zero exit code, and by using this wrapper everywhere in `hadrian/src/Builder.hs`. Fixes #18089.