summaryrefslogtreecommitdiff
path: root/ghc.mk
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Rip out perl dependencyBen Gamari2019-03-091-6/+0
| | | | | | 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.
* Rip out object splittingBen Gamari2019-03-051-10/+0
| | | | | | | | | | | | | | | 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
* Remove `parallel` as a submoduleAlec Theriault2019-02-161-4/+0
| | | | | | | | | | | `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.
* Remove ghctags (#16274)Sylvain Henry2019-02-101-17/+4
|
* Support printing `integer-simple` Integers in GHCiAlec Theriault2019-01-161-0/+1
| | | | | | | | | | 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).
* Update `Cabal` submoduleHerbert Valerio Riedel2019-01-141-3/+0
| | | | | | | 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>
* Fix bindist for ghci libraryZejun Wu2019-01-061-2/+5
| | | | | | | | | | | | | | | | | | | | Summary: https://phabricator.haskell.org/D5169 built libghci for both vanilla way and profiling way. We need to include both in the bindist list so they will be installed. Test Plan: ``` $ grep '^BuildFlavour' mk/build.mk BuildFlavour=perf $ make test_bindist $ grep HSghc-prim bindist-list.uniq ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.o ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.p_o ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3-ghc8.7.20190101.so ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3_p.a ```
* Support the GHCi debugger with -fexternal-interpreterSimon Marlow2018-07-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * All the tests in tests/ghci.debugger now pass with -fexternal-interpreter. These tests are now run with the ghci-ext way in addition to the normal way so we won't break it in the future. * I removed all the unsafeCoerce# calls from RtClosureInspect. Yay! The main changes are: * New messages: GetClosure and Seq. GetClosure is a remote interface to GHC.Exts.Heap.getClosureData, which required Binary instances for various datatypes. Fortunately this wasn't too painful thanks to DeriveGeneric. * No cheating by unsafeCoercing values when printing them. Now we have to turn the Closure representation back into the native representation when printing Int, Float, Double, Integer and Char. Of these, Integer was the most painful - we now have a dependency on integer-gmp due to needing access to the representation. * Fixed a bug in rts/Heap.c - it was bogusly returning stack content as pointers for an AP_STACK closure. Test Plan: * `cd testsuite/tests/ghci.debugger && make` * validate Reviewers: bgamari, patrickdoc, nomeata, angerman, hvr, erikd, goldfire Subscribers: alpmestan, snowleopard, rwbarton, thomie, carter GHC Trac Issues: #13184 Differential Revision: https://phabricator.haskell.org/D4955
* Remove random submoduleBen Gamari2018-07-141-1/+1
| | | | | I believe this was originally introduced to help test DPH, which is now gone.
* Move `iserv` into `utils` and change package name from `iserv-bin` to `iserv`Moritz Angermann2018-06-071-6/+7
| | | | | | | | | | | | | | | | | | 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
* vectorise: Put it out of its miseryBen Gamari2018-06-021-19/+2
| | | | | | | | | | | | | | | | | | | | | Poor DPH and its vectoriser have long been languishing; sadly it seems there is little chance that the effort will be rekindled. Every few years we discuss what to do with this mass of code and at least once we have agreed that it should be archived on a branch and removed from `master`. Here we do just that, eliminating heaps of dead code in the process. Here we drop the ParallelArrays extension, the vectoriser, and the `vector` and `primitive` submodules. Test Plan: Validate Reviewers: simonpj, simonmar, hvr, goldfire, alanz Reviewed By: simonmar Subscribers: goldfire, rwbarton, thomie, mpickering, carter Differential Revision: https://phabricator.haskell.org/D4761