| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This function makes it easy to turn on `-Werror` in the correct manner
to mimic how CI turns on -Werror.
|
|
|
| |
[skip ci]
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Fixes #16210
|
| |
|
| |
|
|
|
|
| |
This reverts commit 76c8fd674435a652c75a96c85abbf26f1f221876.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
...and does so in the lib folder of the right stage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Stack build script `build.stack.bat` currently fails on Windows
when invoked with the `--configure` flag, see:
https://ghc.haskell.org/trac/ghc/ticket/15982
The Cabal build script `build.cabal.bat` works reliably on my Windows
machine, so I am proposing to switch to it by default, that is, to run
it from the default `build.bat` script.
The Stack build script can still be run directly if need be.
|
| |
|
|
|
|
|
|
|
|
|
| |
objects
See https://ghc.haskell.org/trac/ghc/ticket/15971.
This is work in progress: this commit does the right thing, but does not
yet fix the ticket.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This means that `:p` no longer leaks the implementation details of
`Integer` with `integer-simple`. The `print037` test case should
exercise all possible code paths for GHCi's code around printing
`Integer`s (both in `integer-simple` and `integer-gmp`).
`ghc` the package now also has a Cabal `integer-simple` flag (like the
`integer-gmp` one).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This fixes some of the issues that surfaced when trying to build
dynamic GHC on OSX. Unfortunately, due some other `libffi`
issues, this doesn't completely fix dynamic builds on OSX.
- Use 'extra-libraries' from .cabal files instead of hardcoding
which packages need which extra libs. Also add support for
'extra-lib-dirs'.
- Make sure Hadrian looks in the right places to support both
plain '<pkg>.buildinfo' and '<pkg>.buildinfo.in' files.
- Make the '-rpath' support more robust across OS's (it previously
didn't work on OSX and possibly windows either).
Reviewers: angerman, alpmestan, adamse, DavidEichmann, bgamari, Phyx
Subscribers: rwbarton, carter
GHC Trac Issues: #15990
Differential Revision: https://phabricator.haskell.org/D5409
|
|
|
|
|
|
|
|
|
| |
This means that we can query the package DB for haddock interfaces.
Haddock uses this in its testsuite. 'cabal {v1-,v2,}-haddock' also
uses this.
Also thread through to Haddock package-specific overrides of GHC
warnings.
|
| |
|
|
|
|
| |
See https://gitlab.haskell.org/ghc/ghc/merge_requests/100#note_2349.
|
|
|
|
|
|
|
| |
* Update or remove a few outdated paragraphs
* Use consistent naming (e.g. "Stage1" instead of occasionally "stage1")
* Rewrite acknowledgements
* Some more minor revisions
|
|
|
|
|
|
|
| |
This also requires adapting `ghc-pkg` to use the new Cabal parsing API
as the old ReadP-based one has finally been evicted for good.
Hadrian bit finished by: Ben Gamari <ben@smart-cactus.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ticket enables the building of a `stage3` compiler by making the
build logic more consistent and predictable in Hadrian.
Two of the main changes are:
1. In order to build anything at stageN we use the package database
present at stageN. Fixing #16069
2. `haddock` and `ghc-tags` are built
as stage1 executables (with the stage1 compiler) rather than as
stage2 compiler. Fixing
[hadrian#661](https://github.com/snowleopard/hadrian/issues/661)
In order to build a stage3 compiler, you have to set the new `finalStage` hadrian option to `Stage3`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the hadrain version of {D5169}
* We build squashed .o and .p_o for ghci when `dynamicGhcPrograms` is
`False`
* We no longer build them for rts as ghci never loads it
we need https://github.com/haskell/cabal/pull/5592 for cabal to copy
the built `.p_o` file.
Test Plan:
```
$ grep dynamicGhc hadrian/UserSettings.hs
, dynamicGhcPrograms = return False
$ touch ...
$ hadrian/build.sh --flavour=user -j --digest-or
$ find _build/stage1/libraries/ -name 'HS*-*.*o' | wc
62 62 3664
```
```
$ grep -C3 dynamicGhc hadrian/UserSettings.hs
userFlavour :: Flavour
userFlavour = performanceFlavour
{ name = "user"
, dynamicGhcPrograms = return False
}
$ hadrian/build.sh -j --flavour=user test --verbose
Unexpected results from:
TEST="T3807 T9208 T9293 annth_make ghci057 haddock.Cabal haddock.base
haddock.compiler"
SUMMARY for test run started at Wed Dec 5 17:45:39 2018 PST
0:03:16 spent to go through
6708 total tests, which gave rise to
26015 test cases, of which
19290 were skipped
29 had missing libraries
6600 expected passes
88 expected failures
3 caused framework failures
0 caused framework warnings
1 unexpected passes
7 unexpected failures
0 unexpected stat failures
$ find _build -name 'HSbase*.*o'
_build/stage1/lib/x86_64-linux-ghc-8.7.20181204/base-4.12.0.0/HSbase-4.1
2.0.0.o
_build/stage1/lib/x86_64-linux-ghc-8.7.20181204/base-4.12.0.0/HSbase-4.1
2.0.0.p_o
_build/stage1/libraries/base/build/HSbase-4.12.0.0.o
_build/stage1/libraries/base/build/HSbase-4.12.0.0.p_o
```
Reviewers: bgamari, simonmar, snowleopard
Reviewed By: snowleopard
Subscribers: alpmestan, rwbarton, carter
GHC Trac Issues: #15779
Differential Revision: https://phabricator.haskell.org/D5270
|
|
|
|
| |
This reverts commit 442be690e1ca162e22d632df695c29f90625f33e.
|
|
|
|
|
|
|
| |
This is due to the failures documented in #16087. The condition here could be
improved as it matches on `BUILD_FLAVOUR` instead of looking at the compiler
flags. However, it's better than nothing and I hope we will be able to fix these
issues before long.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces Hadrian docs specifically
targeted at GHC devs who are used to building GHC with the make
build system, adapting a good chunk of the following quickstart
page we wrote over the last few months:
https://ghc.haskell.org/trac/ghc/wiki/Building/Hadrian/QuickStart
Reviewers: snowleopard, bgamari
Reviewed By: snowleopard
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5446
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces the `userDefaultFlavour` user setting. It should
be the name of the default flavour to use when no --flavour argument is
passed. Before this patch, we would just always default to... the
`default` flavour. With this patch, we default to whatever Flavour whose
name is `userDefaultFlavour`, therefore providing a way for users to
"persist" their choice of flavour, not having to repeat --flavour=[...]
in every hadrian command.
Test Plan:
Set `userDefaultFlavour = "quickest"`, run `hadrian/build.sh`, check
that the quickest flavour is indeed picked.
Reviewers: snowleopard, bgamari
Reviewed By: snowleopard
Subscribers: mpickering, rwbarton, carter
GHC Trac Issues: #15890
Differential Revision: https://phabricator.haskell.org/D5454
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a `-fenable-ide-info` flag which instructs GHC to generate `.hie`
files (see the wiki page:
https://ghc.haskell.org/trac/ghc/wiki/HIEFiles).
This is a rebased version of Zubin Duggal's (@wz1000) GHC changes for
his GSOC project, as posted here:
https://gist.github.com/wz1000/5ed4ddd0d3e96d6bc75e095cef95363d.
Test Plan: ./validate
Reviewers: bgamari, gershomb, nomeata, alanz, sjakobi
Reviewed By: alanz, sjakobi
Subscribers: alanz, hvr, sjakobi, rwbarton, wz1000, carter
Differential Revision: https://phabricator.haskell.org/D5239
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was supposed to be working already but didn't work when we
specified several tests with --only. This patch not only fixes this
but also makes it possible to specify a subset of tests to run with the
TEST environment variable, like the make build system. Here are some
examples:
hadrian/build.sh test --only=plugins01
hadrian/build.sh test --only="plugins01 plugins02"
TEST="plugins01 plugins02" hadrian/build.sh test
TEST=plugins03 hadrian/build.sh test --only="plugins01 plugins02"
When both the TEST environment variable and the --only flag are used,
we simply concatenate the list of tests from both sources and ask the
testsuite driver to run them all.
This patch addresses #16026.
Test Plan: hadrian/build.sh test --only="plugins01 plugins02"
Reviewers: bgamari, snowleopard
Reviewed By: bgamari, snowleopard
Subscribers: rwbarton, carter
GHC Trac Issues: #16026
Differential Revision: https://phabricator.haskell.org/D5431
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces (phony) build targets of the form
(1) stage<N>:<lib>:<name> (e.g: stage1:lib:Cabal)
(2) stage<N>:<exe>:<name> (e.g: stage2:exe:ghc-bin)
where (1) builds the given library with the stage N compiler and (2)
builds the given executable with the stage N-1 compiler. This patch may
be generating too many such targets but it's a first stab that we can
refine.
This fixes #15949.
Test Plan: hadrian/build.sh stage1:exe:ghc-bin
Reviewers: bgamari, snowleopard
Reviewed By: bgamari
Subscribers: rwbarton, carter
GHC Trac Issues: #15949
Differential Revision: https://phabricator.haskell.org/D5434
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Building a dynamically linked ghc is broken do to incorrectly building
and installing libffi. This disables building a dynamically linked ghc
and ghc-iserv-dyn while keeping most of the code in the relevant
commits: 79d5427e1 and 89fa34ecd
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, alpmestan
Reviewed By: alpmestan
Subscribers: rwbarton, carter
GHC Trac Issues: #15837
Differential Revision: https://phabricator.haskell.org/D5430
|
|
|
|
|
| |
It's currently too out-of-date to build current hadrian and is arguably
completely broken anyways (see #15794).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quickest does not build anything in a dynamic way, so that
flavour should default to not building "ghc programs" dynamically.
I ran into this problem by building the 'docs' target with quickest,
which failed because at some point we run a haddock command in a
context whose Way is sensitive to dynamicGhcPrograms, and it
started looking for dyn interface files when it shouldn't have.
Test Plan: hadrian/build.sh --flavour=quickest docs
Reviewers: snowleopard, bgamari
Reviewed By: snowleopard
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5419
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following what was done to Rules.Library some time ago and to
Rules.Compile recently (D5412), this patch moves more rules away from
the "enumerate a lot of contexts and generate one rule for each" style
and instead uses the "parse data from file path to recover context"
approach. In fact, the only rules left to convert seem to be the ones
from Rules.Generate.
This effectively decreases the pauses described in #15938 further as
well as the amount of allocations and GC that we do, unsurprisingly.
Nowhere as drastically as D5412, though.
Test Plan: perform full build and generate docs
Reviewers: snowleopard, bgamari
Reviewed By: snowleopard
Subscribers: rwbarton, carter
GHC Trac Issues: #15938
Differential Revision: https://phabricator.haskell.org/D5422
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, as reported in #15938, resuming a build "in the middle",
e.g when building _build/stage1/libraries/base/, hadrian would take up
to a whole minute to get started doing actual work, building code.
This was mostly due to a big enumeration that we do in Rules.hs, to
generate all the possible patterns for object files for 1) all ways, 2)
all packages and 3) all stages. Since rule enumeration is always
performed, whatever the target, we were always paying this cost, which
seemed to grow bigger the farther in the build we stopped and were
resuming from.
Instead, this patch borrows the approach that we took for Rules.Library
in https://github.com/snowleopard/hadrian/pull/571, which exposes all the
relevant object files under as few catch-all rules as possible (8 here),
and parses all the information we need out of the object's path.
The concrete effect of this patch that I have observed is to reduce the
45-60 seconds pause to <5 seconds. Along with the Shake performance
improvements that Neil mentions in #15938, most of the pause should
effectively disappear.
Reviewers: snowleopard, bgamari, goldfire
Reviewed By: snowleopard
Subscribers: rwbarton, carter
GHC Trac Issues: #15938
Differential Revision: https://phabricator.haskell.org/D5412
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is the latest in the 'findPtr' saga. See
* 900c47f88784b91517c00be3e1087322e62f698e
* 561748cb507505bd5b7bd76bdc57796d896b62a2
for the previous attempts. The problem with re-using the 'debug'
cabal flag for the purpose of forcing inclusion of 'findPtr' occurs
when 'debug' is one of the RTS ways, but RTS is not being compiled
with '-DDEBUG':
* the 'debug' flag gets passed to cabal, signalling to build
'rts' with the debug flavour, but also forcing inclusion of
the 'findPtr'/'_findPtr' symbol
* since '-DDEBUG' isn't enabled, that symbol doesn't show up in
the libraries, so executable that depend on 'rts' (everything)
will end up always requiring 'findPtr'/'_findPtr' but 'rts' won'y
provide it!
The fix is simple: create a a new 'find-ptr' cabal-flag whose only
purpose is forcing '-Wl,-u,findPtr'/'-Wl,-u,_findPtr'. Then, enable that
flag when the RTS is being compiled with '-DDEBUG'
Test Plan: ./hadrian/build.sh -c # on mac
Reviewers: alpmestan, snowleopard, bgamari, erikd, simonmar, Phyx
Reviewed By: alpmestan, snowleopard, Phyx
Subscribers: Phyx, rwbarton, carter
GHC Trac Issues: #15956
Differential Revision: https://phabricator.haskell.org/D5404
|
|
|
| |
See https://ghc.haskell.org/trac/ghc/ticket/15951
|
|
|
|
|
| |
Iserv is not supported on Windows. This fixes #15950 but this whole situation
feels awfully fragile to me.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Currently, Hadrian has restrictive upper bounds on
`containers` and `QuickCheck` that prevents it from building with
the latest versions of each respective library (0.6.0.1 and
2.12.6.1). There doesn't appear to be any good reason to do so,
since Hadrian builds fine with them, so let's bump the upper version
bounds accordingly.
Test Plan: ./build/hadrian.sh
Reviewers: bgamari, alpmestan, snowleopard
Reviewed By: snowleopard
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5389
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* (#15837 point 5) Use the -rpath gcc option and using the $ORIGIN
variable which the dynamic linker sets to the location of the ghc
binary.
* (#15837 point 4) "-fPIC -dynamic" options are used when building ghc
when either ghc or the rts have a dynamic way.
* (#15837 point 7) "-shared -dynload deploy" options are only used when
linking a library (no longer when linking a program).
Reviewers: bgamari, alpmestan
Reviewed By: alpmestan
Subscribers: adamse, rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5281
|