summaryrefslogtreecommitdiff
path: root/ghc.mk
Commit message (Collapse)AuthorAgeFilesLines
* Vendor filepath inside template-haskellMatthew Pickering2022-07-141-0/+4
| | | | | | | | | | | | | | | Adding filepath as a dependency of template-haskell means that it can't be reinstalled if any build-plan depends on template-haskell. This is a temporary solution for the 9.4 release. A longer term solution is to split-up the template-haskell package into the wired-in part and a non-wired-in part which can be reinstalled. This was deemed quite risky on the 9.4 release timescale. Fixes #21738 (cherry picked from commit b151b65ec469405dcf25f9358e7e99bcc8c2b3ac)
* Introduce package to capture dependency on C++ stdlibBen Gamari2022-06-171-1/+13
| | | | | | | | | | Here we introduce a new "virtual" package into the initial package database, `system-cxx-std-lib`. This gives users a convenient, platform agnostic way to link against C++ libraries, addressing #20010. Fixes #20010. (cherry picked from commit 0ef249aa26f653677c5368bb51af34f7577ba5b9)
* Disable text's dependency on simdutf by defaultBen Gamari2022-03-281-0/+4
| | | | | | | Unfortunately we are simply not currently in a good position to robustly ship binary distributions which link against C++ code like simdutf. Fixes #20724.
* hi haddock: Lex and store haddock docs in interface filesZubin Duggal2022-03-231-0/+1
| | | | | | | | | | | | | | | | | | Names appearing in Haddock docstrings are lexed and renamed like any other names appearing in the AST. We currently rename names irrespective of the namespace, so both type and constructor names corresponding to an identifier will appear in the docstring. Haddock will select a given name as the link destination based on its own heuristics. This patch also restricts the limitation of `-haddock` being incompatible with `Opt_KeepRawTokenStream`. The export and documenation structure is now computed in GHC and serialised in .hi files. This can be used by haddock to directly generate doc pages without reparsing or renaming the source. At the moment the operation of haddock is not modified, that's left to a future patch. Updates the haddock submodule with the minimum changes needed.
* Move linters into the treeMatthew Pickering2022-02-241-3/+7
| | | | | | | | | | This MR moves the GHC linters into the tree, so that they can be run directly using Hadrian. * Query all files tracked by Git instead of using changed files, so that we can run the exact same linting step locally and in a merge request. * Only check that the changelogs don't contain TBA when RELEASE=YES. * Add hadrian/lint script, which runs all the linting steps. * Ensure the hlint job exits with a failure if hlint is not installed (otherwise we were ignoring the failure). Given that hlint doesn't seem to be available in CI at the moment, I've temporarily allowed failure in the hlint job. * Run all linting tests in CI using hadrian.
* Bump Cabal submoduleBen Gamari2022-02-101-1/+2
| | | | | | | | | Adapts GHC to the factoring-out of `Cabal-syntax`. Fixes #20991. Metric Decrease: haddock.Cabal
* Add notes linter to testsuiteMatthew Pickering2022-02-081-0/+2
|
* Fix a few Note inconsistenciesBen Gamari2022-02-011-4/+3
|
* Bump bytestring submodule to 0.11.2.0Bodigrim2021-12-091-3/+3
| | | | | | | | Both tests import `Data.ByteString`, so the change in allocations is more or less expected. Metric Increase: T19695 T9630
* ghc-cabal, make: Add support for building C++ object codeBen Gamari2021-11-181-0/+1
| | | | Co-Authored By: Matthew Pickering <matthew@well-typed.com>
* Make: Do not generate ghc.* headers in stage0John Ericson2021-11-121-3/+2
| | | | | GHC should get everything it needs from the RTS, which for stage0 is the "old" RTS that comes from the bootstrap compiler.
* make: Futher systematize handling of generated headersJohn Ericson2021-11-051-12/+4
| | | | | This will make it easier to add and remove generated headers, as we will do when we add a configure script for the RTS.
* Remove `includes_GHCCONSTANTS` from make build systemJohn Ericson2021-11-021-2/+0
| | | | It is dead code.
* Make build system: Put make generated include's in RTS distdirsJohn Ericson2021-10-311-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* make build system: RTS should use dist-install not distJohn Ericson2021-10-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 :).
* Don't depend unconditionally on xattr in darwin_installBen Gamari2021-09-131-1/+3
| | | | | | Previously the Darwin installation logic would attempt to call xattr unconditionally. This would break on older Darwin releases where this utility did not exist.
* Move `/includes` to `/rts/include`, sort per package betterJohn Ericson2021-08-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Make 'count-deps' a ghc/util standalone programShayne Fletcher2021-06-051-0/+3
| | | | | | | | - 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'
* [bindist] inject xattr -c -r . into the darwin install phaseMoritz Angermann2021-05-251-0/+10
| | | | This is so awful, but at least it might get the job done.
* sdist: Fix packaging of Windows tarballsBen Gamari2021-04-021-1/+1
| | | | | | These now live in the ghc-tarballs/mingw-w64 directory. Fixes #19316.
* GHC Exactprint main commitAlan Zimmerman2021-03-201-3/+3
| | | | | | | | Metric Increase: T10370 parsing001 Updates haddock submodule
* llvmGen: Accept range of LLVM versionsBen Gamari2021-03-171-4/+5
| | | | | | | Previously we would support only one LLVM major version. Here we generalize this to accept a range, taking this range to be LLVM 10 to 11, as 11 is necessary for Apple M1 support. We also accept 12, as that is what apple ships with BigSur on the M1.
* ghc.mk: amend 'make sdist'Sergei Trofimovich2020-10-271-1/+2
| | | | | | | | | | | | | | | | | | | | Noticed 'make sdist' failure seen as: ``` "rm" -rf sdistprep/ghc/ghc-9.1.0.20201020/hadrian/_build/ (SRC_DIST_GHC_DIR)/hadrian/dist-newstyle/ /bin/sh: -c: line 0: syntax error near unexpected token `(' ``` commit 9657f6f34 ("sdist: Include hadrian sources in source distribution") added a new cleanup path without a variable expantion. The change adds variable reference. While at it move directory cleanup to a separate statement. Amends #18794 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* build system: Clean mingw tarballsBen Gamari2020-10-271-0/+7
| | | | | | Tamar noticed in !4293 that the build systems fail to clean up the mingw tarballs directory (`ghc-tarballs`). Fix this in both the make build system and Hadrian.
* sdist: Include hadrian sources in source distributionBen Gamari2020-10-091-1/+3
| | | | | | | Previously the make build system's source distribution rules neglected to include Hadrian's sources. Fixes #18794.
* Rename ghci flag into internal-interpreterSylvain Henry2020-09-161-1/+1
| | | | | "ghci" as a flag name was confusing because it really enables the internal-interpreter. Even the ghci library had a "ghci" flag...
* install: do not install sphinx doctreesEli Schwartz2020-08-181-0/+5
| | | | | | These files are 100% not needed at install time, and they contain unreproducible info. See https://reproducible-builds.org/ for why this matters.
* ghc/mk: don't build gmp packages for BIGNUM_BACKEND=nativeSergei Trofimovich2020-07-281-0/+2
| | | | | | | | | | | | | | | Before this change make-based `BIGNUM_BACKEND=native` build was failing as: ``` x86_64-pc-linux-gnu-gcc: error: libraries/ghc-bignum/gmp/objs/*.o: No such file or directory ``` This happens because ghc.mk was pulling in gmp-dependent ghc-bignum library unconditionally. The change avoid building ghc-bignum. Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/18437 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Fix build systemsSylvain Henry2020-07-251-1/+1
|
* hadrian/make: Detect makeindexBen Gamari2020-06-251-0/+5
| | | | | | Previously we would simply assume that makeindex was available. Now we correctly detect it in `configure` and respect this conclusion in hadrian and make.
* Update `make` based build systemSylvain Henry2020-06-171-21/+14
| | | | * replace integer-* package selection with ghc-bignum backend selection
* Remove custom ExceptionMonad class (#18075) (updating haddock submodule ↵Artem Pelenitsyn2020-05-041-1/+1
| | | | accordingly)
* Modules (#13009)Sylvain Henry2020-04-181-3/+3
| | | | | | | | | | | | | | * SysTools * Parser * GHC.Builtin * GHC.Iface.Recomp * Settings Update Haddock submodule Metric Decrease: Naperian parsing001
* Bump template-haskell version to 2.17.0.0Ryan Scott2020-04-141-5/+5
| | | | | | | | | | | | | | | | | | This requires bumping the `exceptions` and `text` submodules to bring in commits that bump their respective upper version bounds on `template-haskell`. Fixes #17645. Fixes #17696. Note that the new `text` commit includes a fair number of additions to the Haddocks in that library. As a result, Haddock has to do more work during the `haddock.Cabal` test case, increasing the number of allocations it requires. Therefore, ------------------------- Metric Increase: haddock.Cabal -------------------------
* Make: fix sdist target (#17848)Sylvain Henry2020-02-201-2/+2
|
* make: Be more selective in building windows-extra-src tarballBen Gamari2020-02-141-1/+1
|
* Module hierarchy: Cmm (cf #13009)Sylvain Henry2020-01-251-2/+2
|
* Bump haskeline submodule to 0.8.0.1Ben Gamari2020-01-081-0/+4
| | | | (cherry picked from commit feb3b955402d53c3875dd7a9a39f322827e5bd69)
* Bump Haskeline and add exceptions as boot libraryBen Gamari2019-11-131-0/+1
| | | | Haskeline now depends upon exceptions. See #16752.
* Don't include settings file in binary distributionBen Gamari2019-10-291-1/+1
| | | | | | | | The configuration in the installation environment (as determined by `autoconf`) may differ from the build environment and therefore we need to be sure to rebuild the settings file. Fixes #17374.
* Per stage headers, ghc_boot_platform.h -> stage 0 ghcplatform.hJohn Ericson2019-10-041-5/+7
| | | | | | | | | | | | | | | | | | 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.
* Exclude rts.cabal from source distributionsBen Gamari2019-10-031-0/+1
| | | | | | | This modifies both the Hadrian and make build systems to avoid included the rts.cabal generated by autoconf in the source distribution. Fixes #17265.
* Don't maintainer-clean libraries/ghc-boot/ghc.mk (#16953)Ryan Scott2019-07-191-1/+5
| | | | | | | | | This makes the `maintainer-clean` rule in `ghc.mk` slightly more sophisticated so that it does not remove the version-controlled file `libraries/ghc-boot/ghc.mk`, which was checked into version control in commit 24782b89907ab36fb5aef3a17584f4c10f1e2690. Fixes #16953.
* Don't package settings in bindistBen Gamari2019-07-141-1/+0
| | | | | | | | | | | | Since !712 the `settings` file is produced by the build system instead of autoconf. However, this introduced a subtle bug where we would fail to rebuild the `settings` file with what we have learned from the install-time `configure` invocation. Fix this by not packaging `settings` in the bindist tarball. The build system will take care of the rest. Also fix a bug where the value of `UseLibdw` was not being persisted to the install time `configure`.
* Bump containers submodule to v0.6.2.1Ben Gamari2019-06-251-1/+1
|
* make: Clean includes/settings fileBen Gamari2019-06-171-0/+1
| | | | | | | Now since this is generated by the build system we should ensure that it is properly cleaned. [skip ci]
* make: Fix bindist installationBen Gamari2019-06-041-1/+3
| | | | | This fixes a few vestigial references to `settings` left over from !655. Fixes #16715.
* Generate settings by make/hadrian instead of configureJohn Ericson2019-04-301-3/+2
| | | | This allows it to eventually become stage-specific
* Update Wiki URLs to point to GitLabTakenobu Tani2019-03-251-9/+9
| | | | | | | | | | | | | | | | | | | | | | | 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
* Drop utils/count_linesBen Gamari2019-03-091-1/+0
| | | | | This doesn't appear to be used anywhere in the build system and it relies on perl. Drop it.