| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows ghc and its dependencies to be built using a normal
invocation of cabal-install. Each componenent which relied on generated
files or additional configuration now has a Setup.hs file.
There are also various fixes to the cabal files to satisfy
cabal-install.
There is a new hadrian command which will build a stage2 compiler and
then a stage3 compiler by using cabal.
```
./hadrian/build build-cabal
```
There is also a new CI job which tests running this command.
For the 9.4 release we will upload all the dependent executables to
hackage and then end users will be free to build GHC and GHC executables
via cabal.
There are still some unresolved questions about how to ensure soundness
when loading plugins into a reinstalled GHC (#20742) which will be
tighted up in due course.
Fixes #19896
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is, rather unintuitively, part of the goal of making the packages
that make of the GHC distribution more freestanding. `ghcversion.h` is
very simple, so we easily can move it out of the main build systems
(make and Hadrian). By doing so, the RTS becomes less of a special case
to those build systems as the header, already existing in the source
tree, appears like any other.
We could do this with the upcomming RTS configure, but it hardly matters
because there is nothing platform-specific here, it is just versioning
information like the other files the top-level configure can be
responsible for.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Primops types were dependent on the target word-size at *compiler*
compilation time. It's an issue for multi-target as GHC may not have the
correct primops types for the target.
This patch fixes some primops types: if they take or return fixed 64-bit
values they now always use `Int64#/Word64#`, even on 64-bit
architectures (where they used `Int#/Word#` before). Users of these
primops may now need to convert from Int64#/Word64# to Int#/Word# (a
no-op at runtime).
This is a stripped down version of !3658 which goes the all way of
changing the underlying primitive types of Word64/Int64. This is left
for future work.
T12545 allocations increase ~4% on some CI platforms and decrease ~3% on
AArch64.
Metric Increase:
T12545
Metric Decrease:
T12545
|
|
|
|
|
|
|
|
|
| |
We should strive to make our includes in terms of the RTS as much as
possible. One place there that is not possible, the llvm version, we
make a new tiny header
Stage numbers are somewhat arbitrary, if we simple need a newer RTS, we
should say so.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are best thought of as being part of the RTS.
- After !6791, `ghcautoconf.h` won't be used by the compiler
inappropriately.
- `ghcversion.h` is only used once outside the RTS, which is
`compiler/cbits/genSym.c`. Except we *do* mean the RTS GHC is built
against there, so it's better if we always get get the installed
version.
- `ghcplatform.h` alone is used extensively outside the RTS, but
since we no longer have a target platform it is perfectly
safe/correct to get the info from the previous RTS.
All 3 are exported from the RTS currently and in the bootstrap window.
This commit just swaps directories around, such that the new headers may
continue to be used in stage 0 despite the reasoning above, but the idea
is that we can subsequently make more interesting changes doubling down
on the reasoning above.
In particular, in !6803 we'll start "morally" moving `ghcautonconf.h`
over, introducing an RTS configure script and temporary header of its
`AC_DEFINE`s until the top-level configure script doesn't define any
more.
Progress towards #17191
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the following find and replace:
- `rts/dist` -> `rts/dist-install` # for paths
- `rts_dist` -> `rts_dist-install` # for make rules and vars
- `,dist` -> `,dist-install` # for make, just in rts/ghc.mk`
Why do this? Does it matter when the RTS is just built once? The answer
is, yes, I think it does, because I want the distdir--stage
correspondence to be consistent.
In particular, for #17191 and continuing from
d5de970dafd5876ef30601697576167f56b9c132 I am going to make the headers
(`rts/includes`) increasingly the responsibility of the RTS (hence their
new location). However, those headers are current made for multiple
stages. This will probably become unnecessary as work on #17191
progresses and the compiler proper becomes more of a freestanding cabal
package (e.g. a library that can be downloaded from Hackage and built
without any autoconf). However, until that is finished, we have will
transitional period where the RTS and headers need to agree on dirs for
multiple stages.
I know the make build system is going away, but it's not going yet, so I
need to change it to unblock things :).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
isovector recently noticed that it is broken and regardless it is
superceded by `hadrian/ghci`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After commit 55ef3bdc28681a22ceccf207707c49229f9b7559, running `./configure`
now generates a `driver/ghci/ghci-wrapper.cabal` file from
`driver/ghci/ghci-wrapper.cabal.in`, which pollutes the `git` tree:
```
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
driver/ghci/ghci-wrapper.cabal
nothing added to commit but untracked files present (use "git add" to track)
```
Since `driver/ghci/ghci-wrapper.cabal` is autogenerated, the sensible thing to
do is to add it to `.gitignore`. While I was in town, I also added the standard
`*.in` file disclaimer to `driver/ghci/ghci-wrapper.cabal.in`.
[ci skip]
|
|
|
|
|
| |
This wraps the existing GHCi wrapper script (driver/ghci/ghci.c) in a
cabal file and adds the package to Hadrian.
|
|
|
|
| |
[ci skip]
|
| |
|
|
|
|
|
| |
Ignore files from "new style" cabal builds (dist-newstyle folders) and
from clangd (C language server).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the users guide fails to build (as in #17346), a
`docs/users_guide/.log` file will be generated with contents that
look something like this:
```
WARNING: unknown config value 'latex_paper_size' in override, ignoring
/home/rgscott/Software/ghc5/docs/users_guide/ghci.rst:3410: WARNING: u'ghc-flag' reference target not found: -pgmo ?option?
/home/rgscott/Software/ghc5/docs/users_guide/ghci.rst:3410: WARNING: u'ghc-flag' reference target not found: -pgmo ?port?
Encoding error:
'ascii' codec can't encode character u'\u27e8' in position 132: ordinal not in range(128)
The full traceback has been saved in /tmp/sphinx-err-rDF2LX.log, if you want to report the issue to the developers.
```
This definitely should not be checked in to version control, so let's
add this to `.gitignore`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The generated headers are now generated per stage, which means we can
skip hacks like `ghc_boot_platform.h` and just have that be the stage 0
header as proper. In general, stages are to be embraced: freely generate
everything in each stage but then just build what you depend on, and
everything is symmetrical and efficient. Trying to avoid stages because
bootstrapping is a mind bender just creates tons of bespoke
mini-mind-benders that add up to something far crazier.
Hadrian was pretty close to this "stage-major" approach already, and so
was fairly easy to fix. Make needed more work, however: it did know
about stages so at least there was a scaffold, but few packages except
for the compiler cared, and the compiler used its own counting system.
That said, make and Hadrian now work more similarly, which is good for
the transition to Hadrian. The merits of embracing stage aside, the
change may be worthy for easing that transition alone.
|
|
|
|
| |
Add some files generated by hadrian and some tooling files
|
| |
|
|
|
|
|
|
| |
The code, including the generated module with the version, is now in
ghc-boot. Config.hs reexports stuff as needed, ghc-pkg doesn't need any
tricks at all.
|
|
|
|
|
|
|
|
|
| |
As of commit d37d91e9a444a7822eef1558198d21511558515e, the GHC build
now autogenerates a `includes/dist/build/settings` file. To avoid
dirtying the current `git` status, this adds `includes/dist` to
`.gitignore`.
[ci skip]
|
| |
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds trace messages that include the processes name and as such
make debugging and following the communication easier.
It also adds a note regarding the fwd*Call proxy-communication logic
between the proxy and the slave.
The proxy will now also poll for 60s to wait for the remote iserv
to come up. (Alternatively you can start the remote process
beforehand; and just have iserv-proxy connect to it)
|
|
|
|
|
|
|
| |
Along the way, I discovered that `template-haskell.cabal` was
hard-coding the GHC version (in the form of its `ghc-boot-th` version
bounds), so I decided to make life a little simpler in the future by
generating `template-haskell.cabal` with autoconf.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Currently, the version numbers for `libiserv`, `iserv`, and
`iserv-proxy` are hard-coded directly into their `.cabal` files.
These are easy to forget to update, and in fact, this has already
happened once (see #15866). Let's use `autoconf` to do this for us
so that it is not forgotten in the future.
Test Plan: ./validate
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, erikd, carter
GHC Trac Issues: #15866
Differential Revision: https://phabricator.haskell.org/D5302
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: I tend to accumulate these and they are often quite useful to keep around.
Reviewers: monoidal
Reviewed By: monoidal
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5320
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: allow -main-is to change export list for default module
header, allowing one to change the entry point to one's program.
Test Plan: ./validate
Reviewers: bgamari, nomeata, mpickering
Reviewed By: mpickering
Subscribers: mpickering, rwbarton, carter
GHC Trac Issues: #13704
Differential Revision: https://phabricator.haskell.org/D5189
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
My very last commit to D4904 removed -fobject-code. I should have tested this
more thoroughly, because it is required to do a fresh ghci load, as some code
uses unboxed tuples.
One of my motivations for doing this was that if you run the script without
passing -odir / -hidir, it would pollute the source tree with .hi and .o files.
This also appeared to break subsequent builds. I've made it much less likely
that this will happen by instead specifying -odir and -hidir within the ghci
script rather than on the commandline.
I plan to open a separate diff which adds a test that these scripts work.
Until this patch is merged, the workaround is to do `./utils/ghc-in-ghci/run.sh -fobject-code`
Reviewers: bgamari, alpmestan, monoidal
Reviewed By: alpmestan, monoidal
Subscribers: alpmestan, rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D5015
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Implement the "Embrace Type :: Type" GHC proposal,
.../ghc-proposals/blob/master/proposals/0020-no-type-in-type.rst
GHC 8.0 included a major change to GHC's type system: the Type :: Type
axiom. Though casual users were protected from this by hiding its
features behind the -XTypeInType extension, all programs written in GHC
8+ have the axiom behind the scenes. In order to preserve backward
compatibility, various legacy features were left unchanged. For example,
with -XDataKinds but not -XTypeInType, GADTs could not be used in types.
Now these restrictions are lifted and -XTypeInType becomes a redundant
flag that will be eventually deprecated.
* Incorporate the features currently in -XTypeInType into the
-XPolyKinds and -XDataKinds extensions.
* Introduce a new extension -XStarIsType to control how to parse * in
code and whether to print it in error messages.
Test Plan: Validate
Reviewers: goldfire, hvr, bgamari, alanz, simonpj
Reviewed By: goldfire, simonpj
Subscribers: rwbarton, thomie, mpickering, carter
GHC Trac Issues: #15195
Differential Revision: https://phabricator.haskell.org/D4748
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is done for consistency. We usually call the package file the same name the
folder has. The move into `utils` is done so that we can move the library into
`libraries/iserv` and the proxy into `utils/iserv-proxy` and then break the
`iserv.cabal` apart. This will make building the cross compiler with TH
simpler, because we can build the library and proxy as separate packages.
Test Plan: ./validate
Reviewers: bgamari, goldfire, erikd
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4436
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This pulls parts of Joachim Breitner's ghc-heap-view library inside GHC.
The bits added are the C hooks into the RTS and a basic Haskell wrapper
to these C hooks. The main reason for these to be added to GHC proper
is that the code needs to be kept in sync with the closure types
defined by the RTS. It is expected that the version of HeapView shipped
with GHC will always work with that version of GHC and that extra
functionality can be layered on top with a library like ghc-heap-view
distributed via Hackage.
Test Plan: validate
Reviewers: simonmar, hvr, nomeata, austin, Phyx, bgamari, erikd
Reviewed By: bgamari
Subscribers: carter, patrickdoc, tmcgilchrist, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3055
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This shims out fopen and sopen so that they use modern APIs under the hood
along with namespaced paths.
This lifts the MAX_PATH restrictions from Haskell programs and makes the new
limit ~32k.
There are only some slight caveats that have been documented.
Some utilities have not been upgraded such as lndir, since all these things are
different cabal packages I have been forced to copy the source in different places
which is less than ideal. But it's the only way to keep sdist working.
Test Plan: ./validate
Reviewers: hvr, bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #10822
Differential Revision: https://phabricator.haskell.org/D4416
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4446
|
|
|
|
|
|
| |
See Phab:D4377 for the rationale. We will try this again.
This reverts commit 7c173b9043f7a9a5da46c5b0cc5fc3b38d1a7019.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is done for consistency. We usually call the package file the same name the
folder has. The move into `utils` is done so that we can move the library into
`libraries/iserv` and the proxy into `utils/iserv-proxy` and then break the
`iserv.cabal` apart. This will make building the cross compiler with TH
simpler, because we can build the library and proxy as separate packages.
Reviewers: bgamari, simonmar, goldfire, erikd
Reviewed By: simonmar
Subscribers: tdammers, rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4377
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4206
|
|
|
|
|
|
|
|
|
|
| |
Overlap with commit 2f463873, resulted in `hooks/LongGCSync.c`
missing from the `rts.cabal.in` file. As the `rts.cabal` file is only
used by hadrian, this did not trigger with the make base build
system which can do globbing.
Also ignore the `rts.cabal` file, as it's generated by configure
from the `rts.cabal.in`.
|
|
|
|
|
|
|
|
| |
Unfortunately this (ironically) ended up breaking bindist testing since
we didn't have a package-data.mk. Unfortunately there is no easy way to
fix this.
This reverts commit 1e9f90af7311c33de0f7f5b7dba594725596d675.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are needed by the testsuite and consequently must be shipped in
the testsuite tarball to ensure that we can test binary distributions.
See #13897.
Test Plan: Validate
Reviewers: austin
Subscribers: snowleopard, rwbarton, thomie
GHC Trac Issues: #13897
Differential Revision: https://phabricator.haskell.org/D4039
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This tool can be used to generate dll's for any list of object files
given to it. It will then repartition them automatically to fit within
a dll and generates as many dll's as needed to do this. Cyclic dependencies
between these generated dlls are handle automatically so there is no need
to tell it how to partition.
It is also a lot more general than `dll-split` as it is able to split any
package not just `libGHC`. It also uses a trick using GNU style import libraries
to hide the splitting from the rest of the pipeline. Which means come linking time
you don't need to know which dll contains what symbol or how many split dlls were
created.
The import libraries are by default created with libtool. However since libtool is BFD
based it is very slow. So if present and detected by configure the `genlib` tool
from the msys2 project is used. This makes a difference of about ~45 minutes when compiling.
To install `genlib` run `pacman -Sy mingw-w64-$(uname -m)-tools-git`.
More detailed explaination of the process can be found here
https://ghc.haskell.org/trac/ghc/wiki/WindowsDynamicLinking
Test Plan: ./validate
Reviewers: austin, hvr, bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: snowleopard, rwbarton, thomie, erikd, #ghc_windows_task_force
GHC Trac Issues: #5987
Differential Revision: https://phabricator.haskell.org/D3883
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes all dependencies the users guide had on `mkUserGuidePart`.
The generation of the flag reference table and the various pieces of the
man page is now entirely contained within the Spinx extension
`flags.py`. You can see the man page generation on the orphan page
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghc.html
The extension works by collecting all of the meta-data attached to the
`ghc-flag` directives and then formatting and displaying it at
`flag-print` directives. There is a single printing directive that can
be customized with two options, what format to display (table, list, or
block of flags) and an optional category to limit the output to
(verbosity, warnings, codegen, etc.).
New display formats can be added by creating a function
`generate_flag_xxx` (where `xxx` is a description of the format) which
takes a list of flags and a category and returns a new `xxx`. Then just
add a reference in the dispatch table `handlers`. That display can now
be run by passing `:type: xxx` to the `flag-print` directive.
`flags.py` contains two maps of settings that can be adjusted. The first
is a canonical list of flag categories, and the second sets default
categories for files.
The only functionality that Sphinx could not replace was the
`what_glasgow_exts_does.gen.rst` file. `mkUserGuidePart` actually just
reads the list of flags from `compiler/main/DynFlags.hs` which Sphinx
cannot do. As the flag is deprecated, I added the list as a static file
which can be updated manually.
Additionally, this patch updates every single documented flag with the
data from `mkUserGuidePart` to generate the reference table.
Fixes #11654 and, incidentally, #12155.
Reviewers: austin, bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #11654, #12155
Differential Revision: https://phabricator.haskell.org/D3839
|
|
|
|
|
|
|
|
|
|
| |
Summary: This is generated when building `ghc-cabal`.
Reviewers: hvr, bgamari, austin
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3813
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate, try ingesting into Jenkins.
Reviewers: austin
Subscribers: rwbarton, thomie
GHC Trac Issues: #13716
Differential Revision: https://phabricator.haskell.org/D3796
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
`.gitignore` contains a very broad ignore entry for `foo*`.
This has bitten us before and should probably be removed.
Reviewers: bgamari, austin
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D3054
|
|
|
|
| |
Following fe75d2d4db44cee72d505bba24bd44c1a2a75613.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libraries/integer-gmp/gmp/objs/__.SYMDEF SORTED is created by Mac OS
builds.
Test Plan: validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2840
|