summaryrefslogtreecommitdiff
path: root/hadrian/src/Settings/Builders
Commit message (Collapse)AuthorAgeFilesLines
* ci: Try not buffering python outputMatthew Pickering2021-11-031-1/+2
|
* Hadrian: display command line above errors (#20490)Sylvain Henry2021-10-151-1/+12
|
* ci: test in-tree compiler in hadrianZubin Duggal2021-10-131-8/+2
|
* hadrian, testsuite: Teach Hadrian to query the testsuite driver for dependenciesZubin Duggal2021-10-131-11/+19
| | | | Issues #19072, #17728, #20176
* hadrian: Remove deprecated tracing functionsMatthew Pickering2021-09-282-4/+4
|
* Move `/includes` to `/rts/include`, sort per package betterJohn Ericson2021-08-094-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add exe suffix to executables in testsuiteMatthew Pickering2021-07-271-4/+4
|
* 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.
* Pass '-x c++' and '-std=c++11' to `cc` for cpp files, in HadrianEthan Kiang2021-07-061-3/+9
| | | | | '-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.
* hadrian: Pass correct leading_underscore configuration to testsMatthew Pickering2021-06-231-0/+2
|
* Make 'count-deps' a ghc/util standalone programShayne Fletcher2021-06-051-0/+2
| | | | | | | | - 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'
* Revert "hadrian: Don't always links against libffi"Matthew Pickering2021-05-251-1/+2
| | | | This reverts commit 673ff667c98eafc89e6746d1ac69d33b8330d755.
* [hadrian] Do not add full tool pathsMoritz Angermann2021-05-251-1/+6
| | | | | | This prohuibits CC=clang to work generically and will always bake in the clang that is found on the build machine in PATH, what ever clang that might be. It might not even be on the final host.
* hadrian: Don't always links against libffiMatthew Pickering2021-05-111-2/+1
| | | | | | | | | The RTS flag `ffi` is set to either True or False depending on whether we want to link against `libffi`, therefore in order to work out whether to add the build tree to the arguments we check whether `ffi` is in the extraLibs or not before adding the argument. Fixes #16022
* Don't produce platformConstants fileSylvain Henry2021-04-101-1/+0
| | | | It isn't used for anything anymore
* Remove dynamic-by-default (#16782)Sylvain Henry2021-04-072-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dynamic-by-default was a mechanism to automatically select the -dynamic way for some targets. It was implemented in a convoluted way: it was defined as a flavour option, hence it couldn't be passed as a global settings (which are produced by `configure` before considering flavours), so a build system rule was used to pass -DDYNAMIC_BY_DEFAULT to the C compiler so that deriveConstants could infer it. * Make build system has it disabled for 8 years (951e28c0625ece7e0db6ac9d4a1e61e2737b10de) * It has never been implemented in Hadrian * Last time someone tried to enable it 1 year ago it didn't work (!2436) * Having this as a global constant impedes making GHC multi-target (see !5427) This commit fully removes support for dynamic-by-default. If someone wants to reimplement something like this, it would probably need to move the logic in the compiler. (Doing this would probably need some refactoring of the way the compiler handles DynFlags: DynFlags are used to store and to pass enabled ways to many parts of the compiler. It can be set by command-line flags, GHC API, global settings. In multi-target GHC, we will use DynFlags to load the target platform and its constants: but at this point with the current DynFlags implementation we can't easily update the existing DynFlags with target-specific options such as dynamic-by-default without overriding ways previously set by the user.)
* Add -Wcompat to hadrianOleg Grenrus2021-03-311-0/+1
| | | | Update submodules haskeline and hpc
* GHC Exactprint main commitAlan Zimmerman2021-03-201-2/+2
| | | | | | | | Metric Increase: T10370 parsing001 Updates haddock submodule
* hadrian: Pass -fno-use-rpaths to GHC while linkingBen Gamari2021-03-061-0/+4
| | | | | | | This mirrors the make build system and ensures that we don't end up with references to the build directory in the final executable. Fixes #19485.
* Fix Windows build with autoconf >=2.70 (#19189)Sylvain Henry2021-02-271-1/+1
|
* Hadrian: Add support for packages with C++ filesMatthew Pickering2021-02-051-1/+18
|
* Reduce default test verbosityMatthew Pickering2021-01-281-1/+8
|
* Hadrian: Pass -jshakethreads to Haddock invocationsalexbiehl2021-01-171-1/+3
|
* hadrian: disable ghc package environments #18988Adam Sandberg Ericsson2020-12-221-0/+1
|
* hadrian: fix ghc-pkg uses (#17601)Sylvain Henry2020-11-281-6/+24
| | | | | Make sure ghc-pkg doesn't read the compiler "settings" file by passing --no-user-package-db.
* testsuite: Add --top flag to driverGHC GitLab CI2020-11-021-1/+1
| | | | | This allows us to make `config.top` a proper Path. Previously it was a str, which caused the Ghostscript detection logic to break.
* hadrian: Don't quote metric baseline argumentBen Gamari2020-10-281-1/+1
| | | Previously this was quoted inappropriately.
* Don't quote argument to Hadrian's test-env flag (#18656)Ryan Scott2020-09-121-1/+1
| | | | | | | Doing so causes the name of the test environment to gain an extra set of double quotes, which changes the name entirely. Fixes #18656.
* hadrian: Don't include -fdiagnostics-color in argument hashGHC GitLab CI2020-09-101-0/+3
| | | | | | | Otherwise the input hash will vary with whether colors are requested, which changed with `isatty`. Fixes #18672.
* 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
|
* Refactor handling of object mergingBen Gamari2020-08-052-1/+9
| | | | | | | | | 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-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-3/+0
|
* Put PlatformConstants into PlatformSylvain Henry2020-07-251-5/+9
|
* hadrian: ignore cabal configure verbosity related flags #18131Adam Sandberg Ericsson2020-07-071-0/+1
|
* Hadrian: fix build on Mac OS Catalina (#17798)Sylvain Henry2020-06-181-0/+1
|
* Update HadrianSylvain Henry2020-06-171-0/+4
| | | | | | | | | | | | | | | * 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: 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.
* Add :doc to GHC.Primmniip2020-04-231-0/+1
|
* Hadrian: Make -i paths absoluteMatthew Pickering2020-04-141-5/+8
| | | | | | The primary reason for this change is that ghcide does not work with relative paths. It also matches what cabal and stack do, they always pass absolute paths.
* Hadrian: fix --summarySylvain Henry2020-04-091-1/+1
|
* Make hadrian pass on the no-colour setting to GHC.Andreas Klebinger2020-04-011-0/+3
| | | | Fixes #17983.
* Require GHC 8.8 as the minimum compiler for bootstrappingRyan Scott2020-03-312-3/+0
| | | | | | | | This allows us to remove several bits of CPP that are either always true or no longer reachable. As an added bonus, we no longer need to worry about importing `Control.Monad.Fail.fail` qualified to avoid clashing with `Control.Monad.fail`, since the latter is now the same as the former.
* hadrian: Fix executable extension passed to testsuite driverGHC GitLab CI2020-03-221-1/+1
|
* Hadrian: fix absolute buildroot support (#17822)Sylvain Henry2020-03-142-19/+19
| | | | Shake's "**" wildcard doesn't match absolute root. We must use "//" instead.
* hadrian: Add --broken-test flagBen Gamari2020-02-261-0/+2
| | | | | This exposes the flag of the same name supported by the testsuite driver.
* Hadrian: refactor GMP in-tree build support (#17756)Sylvain Henry2020-02-182-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Hadrian doesn't use integer-gmp/config.mk file anymore to determine if building GMP in-tree is required. "config.mk" is created by Cabal when the integer-gmp package is configured and this file is still untracked by Hadrian. This led to a tricky configure "race" because "config.mk" is built by the "setup-config" rule, but this rule is also used to find dependencies, in particular the "ghc-gmp.h" header, but the creation of this file was depending (without being tracked) on "config.mk". Now Hadrian only builds in-tree GMP if `--with-intree-gmp` is passed to the top-level configure script. * in-tree GMP isn't built once for all in a fixed stage (Stage1) anymore. It is built per stage which is required if we build a cross-compiler * switching between in-tree and external GMP is now supported without having to clean the build directory first. * "wrappers.c" now includes "ghc-gmp.h" instead of "ghc.h". It helps ensuring that the build system generates "ghc-gmp.h". * build in-tree GMP in "<root>/stageN/gmp/gmpbuild" and produce useful artefacts (libgmp.a, gmp.h, objs/*.o) in "<root>/stageN/gmp"
* GMP expects the Target platform as --host parameterSylvain Henry2020-02-141-2/+2
|
* Force -fPIC for intree GMP (fix #17799)Sylvain Henry2020-02-091-0/+1
| | | | | Configure intree GMP with `--with-pic` instead of patching it. Moreover the correct patching was only done for x86_64/darwin (see #17799).