summaryrefslogtreecommitdiff
path: root/hadrian/src/Settings.hs
Commit message (Collapse)AuthorAgeFilesLines
* Rename ghci.sh and build.sh to ghci and build respectivelyXavier Denis2020-02-291-3/+3
| | | | | | Convert hadrian buildscripts to unsuffixed, dashed form final cleanups
* hadrian: Allow override of Cabal configuration in hadrian.settingsBen Gamari2020-02-081-5/+15
| | | | | Fixes #17612 by adding a `cabal.configure.opts` key for `hadrian.settings`.
* hadrian: Throw error on duplicate-named flavoursBen Gamari2020-01-251-4/+6
| | | | | | | Throw an error if the user requests a flavour for which there is more than one match. Fixes #17156.
* hadrian: Add `validate` and `slow validate` flavoursBen Gamari2019-10-081-1/+2
|
* [hadrian] Rebuild programs on dynamicGhcPrograms/ghcProfiled changeArtem Pyanykh2019-09-231-18/+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: implement key-value settings for builder optionsAlp Mestanogullari2019-07-091-3/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They take the general form `foo.bar.baz [+]= some values`, where `=` completely overrides the arguments for a builder and `+=` extends them. We currenly only support settings for updating the GHC and C compiler options, of the form: ``` {stage0, ..., stage3 or *}.{package name or *} .ghc.{c, hs, link, deps, toolargs or *}.opts {stage0, ..., stage3 or *}.{package name or *} .cc.{c, deps or *}.opts ``` The supported settings and their use is covered in the new section of `hadrian/doc/user-settings.md`, while the implementation is explained in a new Note [Hadrian settings]. Most of the logic is implemented in a new module, `Settings.Parser`, which contains key-value assignment/extension parsers as well as utilities for specifying allowed settings at a high-level, generating a `Predicate` from such a description or generating the list of possible completions for a given string. The additions to the `Settings` module make use of this to describe the settings that Hadrian currently supports, and apply all such key-value settings (from the command line and `<root>/hadrian.settings`) to the flavour that Hadrian is going to proceed with. This new setting system comes with support for generating Bash completions, implemented in `hadrian/completion.sh` and Hadrian's `autocomplete` target: > source hadrian/completion.sh > hadrian/build.sh stage1.base.ghc.<TAB> stage1.base.ghc.c.opts stage1.base.ghc.hs.opts stage1.base.ghc.*.opts stage1.base.ghc.deps.opts stage1.base.ghc.link.opts stage1.base.ghc.toolargs.opts
* Hadrian: don't accept p_dyn for executables, to fix --flavour=profAlp Mestanogullari2019-04-141-4/+8
|
* Add a bench flavour to HadrianSebastian Graf2019-03-201-3/+4
|
* Hadrian: Add ./hadrian/ghci.sh script for fast development feedbackMatthew Pickering2019-03-121-1/+3
| | | | | | | | | | | | | | | | | | Running the `./hadrian/ghci` target will load the main compiler into a ghci session. This is intended for fast development feedback, modules are only typechecked so it isn't possible to run any functions in the repl. You can also use this target with `ghcid`. The first time this command is run hadrian will need to compile a few dependencies which will take 1-2 minutes. Loading GHC into GHCi itself takes about 30 seconds. Internally this works by calling a new hadrian target called `tool-args`. This target prints out the package and include flags which are necessary to load files into ghci. The same target is intended to be used by other tooling which uses the GHC API in order to set up the correct GHC API session. For example, using this target it is also possible to use HIE when developing on GHC.
* Build and copy libffi shared libraries correctly and enable dynamically ↵David Eichmann2019-02-221-3/+8
| | | | | | | | | | | | | | 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
* Hadrian: Fix untracked dependenciesAndrey Mokhov2019-02-201-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a preparation for #16295: https://ghc.haskell.org/trac/ghc/ticket/16295 This commit mostly focuses on getting rid of untracked dependencies, which prevent Shake's new `--shared` feature from appropriately caching build rules. There are three different solutions to untracked dependencies: * Track them! This is the obvious and the best approach, but in some situations we cannot use it, for example, because a build rule creates files whose names are not known statically and hence cannot be specified as the rule's outputs. * Use Shake's `produces` to record outputs dynamically, within the rule. * Use Shake's `historyDisable` to disable caching for a particular build rule. We currently use this approach only for `ghc-pkg` which mutates the package database and the file `package.cache`. These two tickets are fixed as the result: Ticket #16271: ​https://ghc.haskell.org/trac/ghc/ticket/16271 Ticket #16272: ​https://ghc.haskell.org/trac/ghc/ticket/16272 (this one is fixed only partially: we correctly record the dependency, but we still copy files into the RTS build tree).
* Hadrian: add LLVM flavoursAlec Theriault2019-02-101-1/+3
| | | | | | This adds a handful of LLVM flavours and the accompanying documentation. These flavours are mostly uninteresting, but exist in the Make system.
* Hadrian: introduce userDefaultFlavour, making default flavour overridableAlp Mestanogullari2018-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Add 'hadrian/' from commit '45f3bff7016a2a0cd9a5455a882ced984655e90b'Ben Gamari2018-10-231-0/+66
| | | | | | 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-68/+0
| | | | | Sadly subtrees haven't worked quite as well as we would have liked for developers. See Hadrian #440.
* Merge commit '7b0b9f603bb1215e2b7af23c2404d637b95a4988' as 'hadrian'Andrey Mokhov2017-11-061-0/+68