summaryrefslogtreecommitdiff
path: root/hadrian
Commit message (Collapse)AuthorAgeFilesLines
...
* Restore the --coerce option in 'happy' configurationVladislav Zavialov2019-05-142-2/+2
| | | | | | happy-1.19.10 has been released with a fix for --coerce in the presence of higher rank types. This should result in about 10% performance improvement in the parser.
* Remove all target-specific portions of Config.hsJohn Ericson2019-05-141-81/+49
| | | | | | | | | | | | | | | | | | | 1. If GHC is to be multi-target, these cannot be baked in at compile time. 2. Compile-time flags have a higher maintenance than run-time flags. 3. The old way makes build system implementation (various bootstrapping details) with the thing being built. E.g. GHC doesn't need to care about which integer library *will* be used---this is purely a crutch so the build system doesn't need to pass flags later when using that library. 4. Experience with cross compilation in Nixpkgs has shown things work nicer when compiler's can *optionally* delegate the bootstrapping the package manager. The package manager knows the entire end-goal build plan, and thus can make top-down decisions on bootstrapping. GHC can just worry about GHC, not even core library like base and ghc-prim!
* hadrian: Make settings stage specificJohn Ericson2019-05-141-2/+8
|
* Change GHC.hs to Packages.hs in Hadrian user-settings.mdGiles Anderson2019-05-131-1/+1
| | | | | ... "all packages that are currently built as part of the GHC are defined in src/Packages.hs"
* Hadrian: programs need registered ghc-pkg librariesDavid Eichmann2019-05-105-8/+121
| | | | | | | | 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.
* Purge TargetPlatform_NAME and cTargetPlatformStringJohn Ericson2019-05-081-3/+1
|
* Hadrian: override $(ghc-config-mk), to prevent redundant config generationAlp Mestanogullari2019-05-061-0/+8
| | | | | | | | | | | | This required making the 'ghc-config-mk' variable overridable in testsuite/mk/boilerplate.mk, and then making use of this in hadrian to point to '<build root>/test/ghcconfig' instead, which is where we always put the test config. Previously, we would build ghc-config and run it against the GHC to be tested, a second time, while we're running the tests, because some include testsuite/mk/boilerplate.mk. This was causing unexpected output failures.
* Remove cGhcEnableTablesNextToCodeJohn Ericson2019-05-061-3/+2
| | | | Get "Tables next to code" from the settings file instead.
* Build Hadrian with -Werror in the 'ghc-in-ghci' CI jobAlp Mestanogullari2019-04-301-0/+5
|
* Move cGHC_UNLIT_PGM to be "unlit command" in settingsJohn Ericson2019-04-301-3/+1
| | | | | | | | | | | | The bulk of the work was done in #712, making settings be make/Hadrian controlled. This commit then just moves the unlit command rules in make/Hadrian from the `Config.hs` generator to the `settings` generator in each build system. I think this is a good change because the crucial benefit is *settings* don't affect the build: ghc gets one baby step closer to being a regular cabal executable, and make/Hadrian just maintains settings as part of bootstrapping.
* Generate settings by make/hadrian instead of configureJohn Ericson2019-04-307-5/+156
| | | | This allows it to eventually become stage-specific
* Hadrian: use the testsuite driver's config.haddock arg more correctlyAlp Mestanogullari2019-04-221-1/+15
| | | | | | | | | | | | | | | 4 haddock tests assume that .haddock files have been produced, by using the 'req_haddock' modifier. The testsuite driver assumes that this condition is satisfied if 'config.haddock' is non-empty, but before this patch Hadrian was always passing the path to where the haddock executable should be, regardless of whether it is actually there or not. Instead, we now pass an empty config.haddock when we can't find all of <build root>/docs/html/libraries/<pkg>/<pkg>.haddock>, where <pkg> ranges over array, base, ghc-prim, process and template-haskell, and pass the path to haddock when all those file exists. This has the (desired) effect of skipping the 4 tests (marked as 'missing library') when the docs haven't been built, and running the haddock tests when they have.
* Hadrian: Drop old/unused CI scriptsAndrey Mokhov2019-04-193-193/+0
|
* Hadrian: fix the value we pass to the test driver for config.compiler_debuggedAlp Mestanogullari2019-04-181-3/+5
| | | | | We used to pass YES/NO, while that particular field is set to True/False. This happens to fix an unexpected pass, T9208.
* Hadrian: fix ghcDebugged and document itAlp Mestanogullari2019-04-184-5/+30
|
* Hadrian: Generate GHC wrapper scriptsAndrey Mokhov2019-04-162-1/+21
| | | | | | | | This is a temporary workaround for #16534. We generate wrapper scripts <build-root>/ghc-stage1 and <build-root>/ghc-stage2 that can be used to run Stage1 and Stage2 GHCs with the right arguments. See https://gitlab.haskell.org/ghc/ghc/issues/16534.
* Hadrian: don't accept p_dyn for executables, to fix --flavour=profAlp Mestanogullari2019-04-142-5/+10
|
* Hadrian: add binary-dist-dir targetSylvain Henry2019-04-141-1/+11
| | | | | | | This patch adds an Hadrian target "binary-dist-dir". Compared to "binary-dist", it only builds a binary distribution directory without creating the Tar archive. It makes the use/test of the bindist installation script easier.
* Hadrian: add rts shared library symlinks for backwards compatabilityDavid Eichmann2019-04-145-5/+97
| | | | | | Fixes test T3807 when building with Hadrian. Trac #16370
* Hadrian: document -a/--test-acceptAlp Mestanogullari2019-04-122-0/+33
|
* Hadrian: add a --test-accept/-a flag, to mimic 'make accept'Alp Mestanogullari2019-04-122-3/+17
| | | | | | | | | | | | | | | | | When -a or --test-accept is passed, and if one runs the 'test' target, then any test failing because of mismatching output and which is not expected to fail will have its expected output adjusted by the test driver, effectively considering the new output correct from now on. When this flag is passed, hadrian's 'test' target becomes sensitive to the PLATFORM and OS environment variable, just like the Make build system: - when the PLATFORM env var is set to "YES", when accepting a result, accept it for the current platform; - when the OS env var is set to "YES", when accepting a result, accept it for all wordsizes of the current operating system. This can all be combined with `--only="..."` and `TEST="..." to only accept the new output of a subset of tests.
* Hadrian: fix ghci wrapper script generation (#16508)Sylvain Henry2019-04-121-8/+4
|
* Hadrian: fix binary-dir with --docs=noneSylvain Henry2019-04-111-1/+7
| | | | | Hadrian's "binary-dist" target must check that the "docs" directory exists (it may not since we can disable docs generation).
* Hadrian: fix library install paths in bindist Makefile (#16498)Sylvain Henry2019-04-091-5/+12
| | | | | | | | | | | | | | | | | | | | GHC now works out-of-the-box (i.e. without any wrapper script) by assuming that @bin@ and @lib@ directories sit next to each other. In particular, its RUNPATH uses $ORIGIN-based relative path to find the libraries. However, to be good citizens we want to support the case where @bin@ and @lib@ directories (respectively BINDIR and LIBDIR) don't sit next to each other or are renamed. To do that the install script simply creates GHC specific @bin@ and @lib@ siblings directories into: LIBDIR/ghc-VERSION/{bin,lib} Then it installs wrapper scripts into BINDIR that call the appropriate programs into LIBDIR/ghc-VERSION/bin/. The issue fixed by this patch is that libraries were not installed into LIBDIR/ghc-VERSION/lib but directly into LIBDIR.
* Replace git.haskell.org with gitlab.haskell.org (#16196)Yuriy Syrovetskiy2019-04-042-2/+2
|
* Hadrian: lint ignore autom4te and ghc-pkg cache files.David Eichmann2019-04-021-0/+9
|
* Hadrian: traceAllow deep dependencies when compilling haskell object files.David Eichmann2019-04-021-0/+10
|
* Hadrian: correct deps for ghc builder.David Eichmann2019-04-011-1/+5
| | | | | | | Previously, when needing ghc as a builder, the ghcDeps (Files the GHC binary depends on) for the current stage were needed. This is incorrect as the previous stage's ghc is used for building. This commit fixes the issue, needing the previous stage's ghcDeps.
* Support Shake's --lint-fsatrace feature.David Eichmann2019-04-012-7/+10
| | | | | | Using this feature requires fsatrace (e.g. https://github.com/jacereda/fsatrace). Simply use the `--lint-fsatrace` option when running hadrian. Shake version >= 0.17.7 is required to support linting out of tree build dirs.
* Add some tips to the Troubleshooting section of READMEArtem Pelenitsyn2019-03-291-8/+17
|
* Hadrian: don't use -zorigin on darwin.David Eichmann2019-03-271-4/+3
|
* Hadrian: introduce an easy way for users to build with -split-sectionsAlp Mestanogullari2019-03-272-0/+53
| | | | | | | | | | | | | | | Any user can now trivially build any number of Haskell packages with `-split-sections` by using `splitSections`/`splitSectionsIf` on any existing or new flavour: -- build all packages but the ghc library with -split-sections splitSections :: Flavour -> Flavour -- build all packages that satisfy the given predicate -- with --split-sections splitSectionsIf :: (Package -> Bool) -> Flavour -> Flavour See the new section in `doc/user-settings.md`.
* Hadrian: trace the execution of expensive Cabal callsAndrey Mokhov2019-03-271-8/+12
| | | | | | | | | | | We use Cabal to parse, configure, register and copy packages, which are expensive operations that are currently not visible to Shake's profiling infrastructure. By using `traced` we tell Shake to add these IO actions to the profiling report, helping us to identify performance bottlenecks. We use short tracing keys, as recommended in Shake docs: the name of the current target is already available in the rest of the profiling information.
* Hadrian: Bump Shake to 0.17.6Andrey Mokhov2019-03-271-1/+1
| | | | | | | The new release of Shake comes with these relevant features: * use symlinks for --shared * add --compact for a Bazel/Buck style output
* Update Wiki URLs to point to GitLabTakenobu Tani2019-03-254-6/+6
| | | | | | | | | | | | | | | | | | | | | | | 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
* Refactor ./hadrian/ghci.sh for better error messagesMatthew Pickering2019-03-251-1/+4
| | | | | | By separating these two lines, if the first command fails then `ghci` is not loaded. Before it would still load ghci but display lots of errors about not being able to find modules.
* Add a bench flavour to HadrianSebastian Graf2019-03-205-38/+53
|
* Bump Cabal submodule to 3.0Ben Gamari2019-03-191-1/+1
| | | | | Metric Increase: haddock.Cabal
* Add flavours linkSimon Peyton Jones2019-03-151-0/+1
|
* Update Trac ticket URLs to point to GitLabRyan Scott2019-03-156-7/+7
| | | | | This moves all URL references to Trac tickets to their corresponding GitLab counterparts.
* Hadrian: remove unneeded rpaths.David Eichmann2019-03-151-4/+13
| | | | Issue #12770
* Hadrian: remove unneeded imports.David Eichmann2019-03-153-6/+0
|
* Hadrian: build (and retrieve) binary distributions in CIAlp Mestanogullari2019-03-131-1/+1
| | | | | | | | | With all the recent fixes to the binary-dist rule in Hadrian, we can now run that rule in CI and keep the bindists around in gitlab as artifacts, just like we do for the make CI jobs. To get 'autoreconf' to work in the Windows CI, we have to run it through the shell interpreter, so this commit does that along the way.
* Remove training whitespaceMatthew Pickering2019-03-121-1/+1
|
* Hadrian: Add ./hadrian/ghci.sh script for fast development feedbackMatthew Pickering2019-03-1210-5/+123
| | | | | | | | | | | | | | | | | | 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.
* Hadrian: Fix rpath so shared objects work after being copiedMatthew Pickering2019-03-121-2/+2
| | | | | | After being copied all the shared objects end up in the same directory. Therefore the correct rpath is `$ORIGIN` rather than the computed path which is relative to the directory where it is built.
* Hadrian: Make makeRelativeNoSysLink totalMatthew Pickering2019-03-121-7/+8
| | | | | | makeRelativeNoSysLink would previously crash for no reason if the first argument as `./` due to the call to `head`. This refactoring keeps the behaviour the same but doesn't crash in this corner case.
* Hadrian: Make libsuf and distDir stage awareMatthew Pickering2019-03-125-10/+15
| | | | | The version suffix needs to be the version of the stage 0 compiler when building shared libraries with the stage 0 compiler.
* Hadrian: Allow passing CABFLAGS into build.cabal.shMatthew Pickering2019-03-121-1/+1
| | | | | Setting `CABFLAGS=args` will pass the additional arguments to cabal when it is invoked.
* Rip out perl dependencyBen Gamari2019-03-093-5/+1
| | | | | | 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.