summaryrefslogtreecommitdiff
path: root/hadrian
Commit message (Collapse)AuthorAgeFilesLines
* Update Wiki URLs to point to GitLabTakenobu Tani2019-03-254-6/+6
| | | | | | | | | | | | | | | | | | | | | | | This moves all URL references to Trac Wiki to their corresponding GitLab counterparts. This substitution is classified as follows: 1. Automated substitution using sed with Ben's mapping rule [1] Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy... New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy... 2. Manual substitution for URLs containing `#` index Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...#Zzz New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...#zzz 3. Manual substitution for strings starting with `Commentary` Old: Commentary/XxxYyy... New: commentary/xxx-yyy... See also !539 [1]: https://gitlab.haskell.org/bgamari/gitlab-migration/blob/master/wiki-mapping.json
* Refactor ./hadrian/ghci.sh for better error messagesMatthew Pickering2019-03-251-1/+4
| | | | | | By separating these two lines, if the first command fails then `ghci` is not loaded. Before it would still load ghci but display lots of errors about not being able to find modules.
* Add a bench flavour to HadrianSebastian Graf2019-03-205-38/+53
|
* Bump Cabal submodule to 3.0Ben Gamari2019-03-191-1/+1
| | | | | Metric Increase: haddock.Cabal
* Add flavours linkSimon Peyton Jones2019-03-151-0/+1
|
* Update Trac ticket URLs to point to GitLabRyan Scott2019-03-156-7/+7
| | | | | This moves all URL references to Trac tickets to their corresponding GitLab counterparts.
* Hadrian: remove unneeded rpaths.David Eichmann2019-03-151-4/+13
| | | | Issue #12770
* Hadrian: remove unneeded imports.David Eichmann2019-03-153-6/+0
|
* Hadrian: build (and retrieve) binary distributions in CIAlp Mestanogullari2019-03-131-1/+1
| | | | | | | | | With all the recent fixes to the binary-dist rule in Hadrian, we can now run that rule in CI and keep the bindists around in gitlab as artifacts, just like we do for the make CI jobs. To get 'autoreconf' to work in the Windows CI, we have to run it through the shell interpreter, so this commit does that along the way.
* Remove training whitespaceMatthew Pickering2019-03-121-1/+1
|
* Hadrian: Add ./hadrian/ghci.sh script for fast development feedbackMatthew Pickering2019-03-1210-5/+123
| | | | | | | | | | | | | | | | | | Running the `./hadrian/ghci` target will load the main compiler into a ghci session. This is intended for fast development feedback, modules are only typechecked so it isn't possible to run any functions in the repl. You can also use this target with `ghcid`. The first time this command is run hadrian will need to compile a few dependencies which will take 1-2 minutes. Loading GHC into GHCi itself takes about 30 seconds. Internally this works by calling a new hadrian target called `tool-args`. This target prints out the package and include flags which are necessary to load files into ghci. The same target is intended to be used by other tooling which uses the GHC API in order to set up the correct GHC API session. For example, using this target it is also possible to use HIE when developing on GHC.
* Hadrian: Fix rpath so shared objects work after being copiedMatthew Pickering2019-03-121-2/+2
| | | | | | After being copied all the shared objects end up in the same directory. Therefore the correct rpath is `$ORIGIN` rather than the computed path which is relative to the directory where it is built.
* Hadrian: Make makeRelativeNoSysLink totalMatthew Pickering2019-03-121-7/+8
| | | | | | makeRelativeNoSysLink would previously crash for no reason if the first argument as `./` due to the call to `head`. This refactoring keeps the behaviour the same but doesn't crash in this corner case.
* Hadrian: Make libsuf and distDir stage awareMatthew Pickering2019-03-125-10/+15
| | | | | The version suffix needs to be the version of the stage 0 compiler when building shared libraries with the stage 0 compiler.
* Hadrian: Allow passing CABFLAGS into build.cabal.shMatthew Pickering2019-03-121-1/+1
| | | | | Setting `CABFLAGS=args` will pass the additional arguments to cabal when it is invoked.
* Rip out perl dependencyBen Gamari2019-03-093-5/+1
| | | | | | The object splitter was the last major user of perl. There remain a few uses in nofib but we can just rely on the system's perl for this since it's not critical to the build.
* Hadrian: Drop remaining symlink traversal code from build scriptsAndrey Mokhov2019-03-082-64/+6
| | | | | | | | | | This partly resolves #16325 (https://ghc.haskell.org/trac/ghc/ticket/16325). As previously discussed in https://github.com/snowleopard/hadrian/issues/667, we do not need the symlink traversal code in build scripts. However, it appears we forgot to delete this code from our Stack-based build scripts, which led to placing all build artefacts in an unexpected location when using Hadrian in combination with symlink trees. This commit fixes this.
* Hadrian: various improvements around the 'test' ruleAlp Mestanogullari2019-03-086-106/+218
| | | | | | | | | | | | | | - introduce a -k/--keep-test-files flag to prevent cleanup - add -dstg-lint to the options that are always passed to tests - infer library ways from the compiler to be tested instead of getting them from the flavour (like make) - likewise for figuring out whether the compiler to be tested is "debugged" - specify config.exeext - correctly specify config.in_tree_compiler, instead of always passing True - fix formatting of how we pass a few test options - add (potential) extensions to check-* program names - build check-* programs with the compiler to be tested - set TEST_HC_OPTS_INTERACTIVE and PYTHON env vars when running tests
* Handle absolute paths to build roots in Hadrian.P.C. Shyamshankar2019-03-066-10/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #16187. This patch fixes various path concatenation issues to allow functioning builds with hadrian when the build root location is specified with an absolute path. Remarks: - The path concatenation operator (-/-) now handles absolute second operands appropriately. Its behavior should match that of POSIX (</>) in this regard. - The `getDirectoryFiles*` family of functions only searches for matches under the directory tree rooted by its first argument; all of the results are also relative to this root. If the first argument is the empty string, the current working directory is used. This patch passes the appropriate directory (almost always either `top` or `root`), and subsequently attaches that directory prefix so that the paths refer to the appropriate files. - Windows `tar` does not like colons (':') in paths to archive files, it tries to resolve them as remote paths. The `--force-local` option remedies this, and is applied on windows builds.
* Rip out object splittingBen Gamari2019-03-0515-108/+8
| | | | | | | | | | | | | | | The splitter is an evil Perl script that processes assembler code. Its job can be done better by the linker's --gc-sections flag. GHC passes this flag to the linker whenever -split-sections is passed on the command line. This is based on @DemiMarie's D2768. Fixes Trac #11315 Fixes Trac #9832 Fixes Trac #8964 Fixes Trac #8685 Fixes Trac #8629
* Hadrian: track mingw, ship it in bindists, more robust install scriptAlp Mestanogullari2019-03-045-27/+84
|
* detect 'autoreconf' path during configure, and use it in hadrianAlp Mestanogullari2019-03-032-2/+14
|
* Hadrian: introduce ways to skip some documentation targetsAlp Mestanogullari2019-03-016-9/+159
| | | | | | | | | The initial motivation for this is to have a chance to run the binary distribution rules in our Windows CI without having to install sphinx-build and xelatex there, while retaining the ability to generate haddocks. I just ended up extending this idea a little bit so as to have control over whether we build haddocks, (sphinx) HTML manuals, (sphinx) PDF manuals and (sphinx) manpages.
* Expression/command ambiguity resolutionVladislav Zavialov2019-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes 'HsArrApp' and 'HsArrForm' from 'HsExpr' by introducing a new ambiguity resolution system in the parser. Problem: there are places in the grammar where we do not know whether we are parsing an expression or a command: proc x -> do { (stuff) -< x } -- 'stuff' is an expression proc x -> do { (stuff) } -- 'stuff' is a command Until we encounter arrow syntax (-<) we don't know whether to parse 'stuff' as an expression or a command. The old solution was to parse as HsExpr always, and rejig later: checkCommand :: LHsExpr GhcPs -> P (LHsCmd GhcPs) This meant polluting 'HsExpr' with command-related constructors. In other words, limitations of the parser were affecting the AST, and all other code (the renamer, the typechecker) had to deal with these extra constructors by panicking. We fix this abstraction leak by parsing into an intermediate representation, 'ExpCmd': data ExpCmdG b where ExpG :: ExpCmdG HsExpr CmdG :: ExpCmdG HsCmd type ExpCmd = forall b. ExpCmdG b -> PV (Located (b GhcPs)) checkExp :: ExpCmd -> PV (LHsExpr GhcPs) checkCmd :: ExpCmd -> PV (LHsCmd GhcPs) checkExp f = f ExpG -- interpret as an expression checkCmd f = f CmdG -- interpret as a command See Note [Ambiguous syntactic categories] for details. Now the intricacies of parsing have no effect on the hsSyn AST when it comes to the expression/command ambiguity. Future work: apply the same principles to the expression/pattern ambiguity.
* Build and copy libffi shared libraries correctly and enable dynamically ↵David Eichmann2019-02-228-64/+164
| | | | | | | | | | | | | | linking ghc. Test Plan: Ensure build environment does NOT have a system libffi installed (you may want to use a nix environment). Then `hadrian/build.sh -c --flavour=default` Reviewers: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15837
* Hadrian: Fix untracked dependenciesAndrey Mokhov2019-02-2024-334/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a preparation for #16295: https://ghc.haskell.org/trac/ghc/ticket/16295 This commit mostly focuses on getting rid of untracked dependencies, which prevent Shake's new `--shared` feature from appropriately caching build rules. There are three different solutions to untracked dependencies: * Track them! This is the obvious and the best approach, but in some situations we cannot use it, for example, because a build rule creates files whose names are not known statically and hence cannot be specified as the rule's outputs. * Use Shake's `produces` to record outputs dynamically, within the rule. * Use Shake's `historyDisable` to disable caching for a particular build rule. We currently use this approach only for `ghc-pkg` which mutates the package database and the file `package.cache`. These two tickets are fixed as the result: Ticket #16271: ​https://ghc.haskell.org/trac/ghc/ticket/16271 Ticket #16272: ​https://ghc.haskell.org/trac/ghc/ticket/16272 (this one is fixed only partially: we correctly record the dependency, but we still copy files into the RTS build tree).
* Remove `parallel` as a submoduleAlec Theriault2019-02-164-6/+3
| | | | | | | | | | | `parallel` is used in exactly one place in the GHC tree: the T2317 test. It seems almost by accident that it is a submodule; libraries needed only for tests should net be included as submodules (see `QuickCheck`, `async`, `haskell98`, `regex-compat`, `utf8-string`, `vector` and more for examples). T2317 will now get run only when `parallel` is installed instead of `parallel` being required for the testsuite to run.
* Hadrian: enable -Wcompat=error in the testsuiteVladislav Zavialov2019-02-151-0/+1
|
* Hadrian: add LLVM flavoursAlec Theriault2019-02-104-3/+65
| | | | | | This adds a handful of LLVM flavours and the accompanying documentation. These flavours are mostly uninteresting, but exist in the Make system.
* Remove ghctags (#16274)Sylvain Henry2019-02-102-5/+4
|
* Upgrade to the latest stack resolverNeil Mitchell2019-02-091-2/+5
|
* Simplify the build.stack.bat script to use 'stack run'Neil Mitchell2019-02-091-6/+2
|
* Hadrian: compile libgmp static on WindowsTamar Christina2019-02-081-0/+3
|
* Add werror function to Flavour.hsMatthew Pickering2019-02-033-1/+22
| | | | | This function makes it easy to turn on `-Werror` in the correct manner to mimic how CI turns on -Werror.
* Update user-settings.md with a pointer to `Packages`Sebastian Graf2019-02-021-1/+5
| | | [skip ci]
* Hadrian: Fix outdated link.Andrey Mokhov2019-01-311-1/+1
|
* Hadrian: Update instructions for building on WindowsAndrey Mokhov2019-01-312-24/+25
| | | | | | The `hadrian/doc/windows.md` file has falled out of date. In particular it still points to the old GitHub repository, and uses incorrect path to GHC. This patch fixes it.
* Add O2 to hsCompiler on stage0 for most hadrian flavours.klebinger.andreas@gmx.at2019-01-316-10/+10
|
* Only build vanilla way in devel2 flavourMatthew Pickering2019-01-301-1/+4
| | | | Fixes #16210
* Avoid compiling Hadrian dependencies with profiling on Cabal/LinuxNeil Mitchell2019-01-301-1/+1
|
* Avoid compiling Hadrian dependencies with profiling on Cabal/WindowsNeil Mitchell2019-01-301-1/+1
|
* Revert "Batch merge"Ben Gamari2019-01-303-6/+3
| | | | This reverts commit 76c8fd674435a652c75a96c85abbf26f1f221876.
* Batch mergeBen Gamari2019-01-303-3/+6
|
* hadrian: use new-exec to make sure alex & happy are in PATH (#16120)Adam Sandberg Eriksson2019-01-273-2/+8
|
* A few typofixesGabor Greif2019-01-231-1/+1
|
* Hadrian: support in-tree GMPAlec Theriault2019-01-236-11/+17
| | | | | | | | | | | | | | | | | | | | | | Summary: This adds top-level configure flags '--with-intree-gmp' and '--with-framework-preferred', both of which are especially relevant on MacOS. Besides gaining two new flags, Hadrian also had to be taught what to do with the 'framework' in .cabal files. Test Plan: ./boot && ./configure --with-intree-gmp && ./hadrian/build.sh ./boot && ./configure --with-gmp-framework-preferred && ./hadrian/build.sh # on macos Reviewers: carter, snowleopard, alpmestan, hvr, goldfire, bgamari Subscribers: rwbarton, erikd GHC Trac Issues: #16001 Differential Revision: https://phabricator.haskell.org/D5417
* Hadrian: install patches 'haddock-{html,interface}'Alec Theriault2019-01-231-0/+22
| | | | | | | | | | | | | Since the `$(docdir)` can be picked independently from the `$(libdir)`, we need to make sure that that the `haddock-html` and `haddock-interface` fields in the package DB (which is in the `$(libdir)`) get updated to point to the appropriate places in the `$(docdir)`. NB: in the make system, `ghc-cabal` would cover this sort of thing by re-running `configure` on installation, but here we get away with a couple lines of `sed` and a call to `ghc-pkg recache`. Fixes #16202.
* Fix hadrian prof flavour so that it builds a profiled version of GHCMatthew Pickering2019-01-231-2/+9
| | | | | | | | In Alp's refactoring of `getProgramContexts` he removed a call to `getProgramContext` which was where the logic for this used to be implemented. Fixes #16214
* Make sure 'haddock' package also copies resourcesAlec Theriault2019-01-166-34/+31
| | | | ...and does so in the lib folder of the right stage
* Hadrian: handle Haddock's resource directoryAlec Theriault2019-01-163-18/+29
| | | | | | | | | | | | | | | | Fixes #16105 * Require Haddock's resource as runtime dependencies of the Haddock builder. This means we no longer have to `need` particular resources in every other documentation rule. * Do a _tracked_ copy of both the 'html' and 'latex' folder resource folders. * Move resources into `stage1/lib` (NB: the `haddock` binary goes in `stage1/bin`). Besides now actually matching the Haddock script wrapper generated by BinaryDist, this also prepares for Haddock in relocatable build folder detecting its own resources.