summaryrefslogtreecommitdiff
path: root/hadrian/src/Rules/Program.hs
Commit message (Collapse)AuthorAgeFilesLines
* Hadrian: Take care of assembler source filesStefan Schulze Frielinghaus2019-10-111-4/+6
| | | | Fixes #17286.
* [hadrian] Rebuild programs on dynamicGhcPrograms/ghcProfiled changeArtem Pyanykh2019-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if you change these ^ flavour parameters, rebuilding is not triggered, since `programContext` doesn't set up a dependency on those values. Exposing these values via an oracle does set the dependency and properly triggers a rebuild of binaries. Several attempts to factor out these actions ended up in cyclic dependency here or there. I'm not absolutely happy with this variant either, but at least it works. ==== Issue repro: In UserSettings.hs: ``` dbgDynamic = defaultFlavour { name = "dbg-dynamic" , dynamicGhcPrograms = pure True, ... } dbgStatic = defaultFlavour { name = "dbg-static" , dynamicGhcPrograms = pure False ... } ``` Then in console: ``` $ hadrian/build.sh -j --flavour=dbg-dynamic ... does the build $ hadrian/build.sh -j --flavour=dbg-static ... does nothing, considers binaries up to date ```
* Hadrian: make settings, platformConstants, etc dependencies of lib:ghcAlp Mestanogullari2019-08-021-4/+1
| | | | | | | | | | | This fixes #17003, where a user directly asked for the 'docs-haddock' target without building a complete stage 2 GHC first. Since haddock only depends on lib:ghc, the stage 2 GHC executable wasn't built, and neither were the settings, platformConstants, llvm-passes and llvm-targets files, since they are declared to be dependencies of exe:ghc. This makes sense in general since all GHC API users (haddock is one) will likely want those files to be there.
* Hadrian: Track RTS library symlink targetsDavid Eichmann2019-06-131-2/+2
| | | | | This requires creating RTS library symlinks when registering, outside of the rule for the registered library file.
* Refactor Libffi and RTS rulesDavid Eichmann2019-05-211-0/+1
| | | | | | | | | This removes a hack that copies libffi files to the rts build directory. This was done in a libffi rule, but now an rts rule correctly needs and copies the relevant files from the libffi build dir to the rts build dir. Issues: #16272 #16304
* Hadrian: programs need registered ghc-pkg librariesDavid Eichmann2019-05-101-0/+9
| | | | | | | | In Hadrian, building programs (e.g. `ghc` or `haddock`) requires libraries located in the ghc-pkg package database i.e. _build/stage1/lib/x86_64-linux-ghc-8.9.0.20190430/libHSdeepseq-1.4.4.0-ghc8.9.0.20190430.so Add the corresponding `need`s for these library files and the subsequent rules.
* Hadrian: track mingw, ship it in bindists, more robust install scriptAlp Mestanogullari2019-03-041-0/+13
|
* Build and copy libffi shared libraries correctly and enable dynamically ↵David Eichmann2019-02-221-13/+7
| | | | | | | | | | | | | | 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
* 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-161-0/+3
| | | | ...and does so in the lib folder of the right stage
* Hadrian: Add support for building stage3Matthew Pickering2019-01-091-1/+1
| | | | | | | | | | | | | | | | 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`.
* Revert dynamically linking ghc.David Eichmann2018-12-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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
* hadrian: eliminate most of the remaining big rule enumerationsAlp Mestanogullari2018-12-071-51/+60
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* hadrian: build ghc-iserv-dynDavid Eichmann2018-11-141-10/+13
| | | | | | | | | | | | | ... in addition to ghc-iserv and ghc-iserv-prof, as it is required to get 10+ tests to pass Reviewers: bgamari, alpmestan Reviewed By: alpmestan Subscribers: alpmestan, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5327
* hadrian: build ghc-iserv-prof in addition to ghc-iservAlp Mestanogullari2018-11-011-6/+15
| | | | | | | | | | | | | | | | | | | As it is required for 10+ tests. Hadrian didn't give us a chance to build a given executable in vanilla and profiling, simultaneously, under two different names. This patch implements support for this in general and applies it to ghc-iserv[-prof]. Test Plan: scc001 fails without this patch, passes with it. Reviewers: snowleopard, bgamari Reviewed By: bgamari Subscribers: simonpj, ndmitchell, simonmar, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5255
* Add 'hadrian/' from commit '45f3bff7016a2a0cd9a5455a882ced984655e90b'Ben Gamari2018-10-231-0/+77
| | | | | | git-subtree-dir: hadrian git-subtree-mainline: 575b35f4cdc18045bccd42d341d6f25d95c0696c git-subtree-split: 45f3bff7016a2a0cd9a5455a882ced984655e90b
* Remove Hadrian submoduleBen Gamari2018-10-231-7/+0
|
* Bump hadrian submoduleBen Gamari2018-08-051-21/+5
|
* Bump hadrian submoduleBen Gamari2018-06-121-5/+21
|
* Update hadrian submoduleBen Gamari2018-06-071-16/+6
|
* Update Hadrian submoduleAndrey Mokhov2018-04-261-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Link to Quick Start guide * Update README.md (hadrian/578) * Fix AppVeyor (hadrian/577) * Fix CircleCI * Generic library rules (hadrian/571) * Fix lint error (hadrian/575) * Fix missing libHSghc-8.5-0.a (hadrian/574) * Fix the path to touchy (hadrian/572) * Fix integer-gmp build (hadrian/568) * Undo fs*.h workaround * Fix copying of fs*.h files during RTS registration (hadrian/566) * Fix Windows build, improve error reporting (hadrian/565) * Fix Windows build (hadrian/563) * Fix boot and configure on AppVeyor (hadrian/561) * Preliminary bindist (hadrian/558, hadrian/555) * Unregister stage0 package first if it needs to be cloned (hadrian/552) * Fix Circle CI (hadrian/553) * Fix warnings (hadrian/547) * Merge pull request hadrian/542 from Mistuke/fix-specific-file * Use Cabal directly in place of ghc-cabal + make build root configurable (hadrian/531) * Add user-defined flavour example for turning off dynamic linking (hadrian/535) * Add clean routines for fs (hadrian/533) * Add 'git' to nativeBuildInputs in shell.nix (hadrian/530) * Add extra include paths when invoking ghc-cabal (hadrian/526) * Merge pull request hadrian/528 from snowleopard/bump-cabal * Merge pull request hadrian/521 from snowleopard/drop-chmod * Change permission bits for build.cabal.sh, fixes hadrian/517 (hadrian/520) * Pin nixpkgs and all-cabal-hashes in shell.nix (hadrian/511) * Add troubleshooting section
* Update Hadrian submoduleAndrey Mokhov2018-02-241-22/+8
| | | | | | | | | | | | | | | * Make shell.nix less broken (hadrian/510) * Add --configure flag to the script * Undo iserv changes (hadrian/507) * Fix ghc-cabal: Parsec modules are now found in libraries/parsec/src (hadrian/506) * Move a bunch of types into dedicated modules (hadrian/502) * Add --quickjump to Haddock (hadrian/505) * Add iserv library (hadrian/504) * Merge pull request hadrian/503 from snowleopard/angerman-patch-1 * Merge pull request hadrian/500 from snowleopard/runtime-deps * Fix Hadrian after Cabal changes (hadrian/498) * Drop custom logic for Scav_thr and Evac_thr (hadrian/497) * Fix Haddock (hadrian/496)
* Bump hadrian submoduleBen Gamari2018-01-261-18/+23
|
* Add hadrian as a submoduleBen Gamari2017-12-081-0/+21
| | | | | It will remain a submodule until we are ready to merge Hadrian into the tree.
* Rip out hadrian subtreeBen Gamari2017-12-081-113/+0
| | | | | Sadly subtrees haven't worked quite as well as we would have liked for developers. See Hadrian #440.
* Update HadrianBen Gamari2017-11-221-3/+0
|
* Merge commit '7b0b9f603bb1215e2b7af23c2404d637b95a4988' as 'hadrian'Andrey Mokhov2017-11-061-0/+116