summaryrefslogtreecommitdiff
path: root/hadrian/src
Commit message (Collapse)AuthorAgeFilesLines
* hadrian: Only copy and install libffi headers when using in-tree libffiMatthew Pickering2022-05-102-2/+4
| | | | | | | | When passed `--use-system-libffi` then we shouldn't copy and install the headers from the system package. Instead the headers are expected to be available as a runtime dependency on the users system. Fixes #21485 #21487
* hadrian: Don't pass -j to haddockMatthew Pickering2022-05-101-3/+1
| | | | | | | | | | | This has high potential for oversubcribing as many haddock jobs can be spawned in parralel which will each request the given number of capabilities. Once -jsem is implemented (#19416, !5176) we can expose that haddock via haddock and use that to pass a semaphore. Ticket #21136
* packaging: Build perf builds with -split-sectionsMatthew Pickering2022-05-101-1/+1
| | | | | | | | | In 8f71d958 the make build system was made to use split-sections on linux systems but it appears this logic never made it to hadrian. There is the split_sections flavour transformer but this doesn't appear to be used for perf builds on linux. Closes #21135
* hadrian: Fix split-sections transformerMatthew Pickering2022-05-101-4/+7
| | | | | | | | | | | | The splitSections transformer has been broken since -dynamic-too support was implemented in hadrian. This is because we actually build the dynamic way when building the dynamic way, so the predicate would always fail. The fix is to just always pass `split-sections` even if it doesn't do anything for a particular way. Fixes #21138
* genprimopcode: Support Unicode properlyAlexis King2022-05-042-3/+38
|
* hadrian: Clean up flavour transformer definitionsBen Gamari2022-04-281-4/+3
| | | | | Previously the `ipe` and `omit_pragmas` transformers were hackily defined using the textual key-value syntax. Fix this.
* testsuite: Fix calculation about whether to pass -dynamic to compilerMatthew Pickering2022-04-282-7/+7
|
* hadrian: Don't pass -rtsopts when building librariesDouglas Wilson2022-04-281-2/+2
|
* hadrian: add debug_ghc and debug_stage1_ghc flavour transformersDouglas Wilson2022-04-283-2/+12
|
* hadrian: Enrich flavours to build profiled/debugged/threaded ghcs per stageDouglas Wilson2022-04-2811-32/+30
|
* hadrian: Add Monoid instance to WayDouglas Wilson2022-04-281-1/+4
|
* Enable eventlog support in all ways by defaultBen Gamari2022-04-2711-43/+20
| | | | | | | | | | | | | | | | | Here we deprecate the eventlogging RTS ways and instead enable eventlog support in the remaining ways. This simplifies packaging and reduces GHC compilation times (as we can eliminate two whole compilations of the RTS) while simplifying the end-user story. The trade-off is a small increase in binary sizes in the case that the user does not want eventlogging support, but we think that this is a fine trade-off. This also revealed a latent RTS bug: some files which included `Cmm.h` also assumed that it defined various macros which were in fact defined by `Config.h`, which `Cmm.h` did not include. Fixing this in turn revealed that `StgMiscClosures.cmm` failed to import various spinlock statistics counters, as evidenced by the failed unregisterised build. Closes #18948.
* Drop libtool path from settings fileBen Gamari2022-04-252-3/+0
| | | | | GHC no longers uses libtool for linking and therefore this is no longer necessary.
* testsuite: Cabalify ghc-configBen Gamari2022-04-253-21/+8
| | | | | | | To ensure that the build benefits from Hadrian's usual logic for building packages, avoiding #21409. Closes #21409.
* testsuite: More robust library way detectionBen Gamari2022-04-251-68/+4
| | | | | | | | | | | | | | | | | | Previously `test.mk` would try to determine whether the dynamic, profiling, and vanilla library ways are available by searching for `PrimOpWrappers.{,dyn_,p_}hi` in directory reported by `ghc-pkg field ghc-prim library-dirs`. However, this is extremely fragile as there is no guarantee that there is only one library directory. To handle the case of multiple `library-dirs` correct we would have to carry out the delicate task of tokenising the directory list (in shell, no less). Since this isn't a task that I am eager to solve, I have rather moved the detection logic into the testsuite driver and instead perform a test compilation in each of the ways. This should be more robust than the previous approach. I stumbled upon this while fixing #20579.
* hadrian: Clean up handling of libffi dependenciesBen Gamari2022-04-253-10/+12
|
* hadrian: Drop redundant include directoriesBen Gamari2022-04-251-10/+0
| | | | | | | | The package-specific include directories in Settings.Builders.Common.cIncludeDirs are now redundant since they now come from Cabal. Closes #20566.
* hadrian: Ensure that --extra-lib-dirs are usedBen Gamari2022-04-251-26/+5
| | | | | | | | Previously we only took `extraLibDirs` and friends from the package description, ignoring any contribution from the `LocalBuildInfo`. Fix this. Fixes #20566.
* hadrian: Enable -dlint in devel2 flavourBen Gamari2022-04-221-1/+1
| | | | Previously only -dcore-lint was enabled.
* Include the way string in the file name for dump files.Andreas Klebinger2022-04-221-1/+1
| | | | | | This can be disabled by `-fno-dump-with-ways` if not desired. Finally we will be able to look at both profiled and non-profiled dumps when compiling with dump flags and we compile in both ways.
* Hadrian: use a set to keep track of wayssheaf2022-04-1418-33/+68
| | | | | | | | The order in which ways are provided doesn't matter, so we use a data structure with the appropriate semantics to represent ways. Fixes #21378
* hadrian: Build wrappers using ghc rather than ccBen Gamari2022-04-061-2/+2
|
* hadrian: Disable ghci libraries when object merging is not availableBen Gamari2022-04-063-5/+19
|
* Fix a few new warnings when booting with GHC 9.2.2Ben Gamari2022-04-061-1/+4
| | | | | -Wuni-incomplete-patterns and apparent improvements in the pattern match checker surfaced these.
* hadrian: Clean up flavour transformer definitionsBen Gamari2022-04-061-8/+6
| | | | | Previously the `ipe` and `omit_pragmas` transformers were hackily defined using the textual key-value syntax. Fix this.
* Build ar archives with -L when "joining" objectsBen Gamari2022-04-061-0/+1
| | | | Since there may be .o files which are in fact archives.
* hadrian: Produce ar archives with L modifier on WindowsBen Gamari2022-04-062-1/+9
| | | | | | | | Since object files may in fact be archive files, we must ensure that their contents are merged rather than constructing an archive-of-an-archive. See #21068.
* hadrian: Refactor handling of ar flagsBen Gamari2022-04-064-31/+36
| | | | | Previously the setup was quite fragile as it had to assume which arguments were file arguments and which were flags.
* hadrian: Add assertion that in/out tree args are the sameMatthew Pickering2022-04-012-23/+37
| | | | | | | | There have been a few instances where this calculation was incorrect, so we add a non-terminal assertion when now checks they the two computations indeed compute the same thing. Fixes #21285
* hadrian: Fix race involving empty package databasesMatthew Pickering2022-04-013-5/+18
| | | | | | | | | | | | | | | | There was a small chance of a race occuring between the small window of 1. The first package (.conf) file get written into the database 2. hadrian calling "ghc-pkg recache" to refresh the package.conf file In this window the package database would contain rts.conf but not a package.cache file, and therefore if ghc was invoked it would error because it was missing. To solve this we call "ghc-pkg recache" at when the database is created by shake by writing the stamp file into the database folder. This also creates the package.cache file and so avoids the possibility of this race.
* hadrian: Introduce CheckProgram datatype to replace a 7-tupleMatthew Pickering2022-04-011-10/+19
|
* hadrian: allow testing linters with out of tree compilersZubin Duggal2022-04-011-21/+21
|
* hadrian: Remove linters-common from bindistMatthew Pickering2022-04-012-3/+22
| | | | | | | | | | | | | | Zubin observed that the bindists contains the utility library linters-common. There are two options: 1. Make sure only the right files are added into the bindist.. a bit tricky due to the non-trivial structure of the lib directory. 2. Remove the bad files once they get copied in.. a bit easier So I went for option 2 but we perhaps should go for option 1 in the future. Fixes #21203
* two typosEric Lindblad2022-04-012-2/+2
|
* hadrian typosEric Lindblad2022-04-014-4/+4
|
* Hadrian: make DDEBUG separate from debugged RTSsheaf2022-03-297-34/+42
| | | | | | | | | | | This patchs separates whether -DDEBUG is enabled (i.e. whether debug assertions are enabled) from whether we are using the debugged RTS (i.e. GhcDebugged = YES). This means that we properly skip tests which have been marked with `when(compiler_debugged(), skip)`. Fixes #21113, #21153 and #21234
* hadrian: Build lib:GHC with -haddock and -Winvalid-haddock (#21273)Zubin Duggal2022-03-291-0/+3
|
* Hadrian: allow testsuite to run with cross-compilers (#21292)Sylvain Henry2022-03-281-1/+3
|
* Disable text's dependency on simdutf by defaultBen Gamari2022-03-281-0/+8
| | | | | | | Unfortunately we are simply not currently in a good position to robustly ship binary distributions which link against C++ code like simdutf. Fixes #20724.
* hadrian: Flag cabal flag handlingMatthew Pickering2022-03-281-10/+5
| | | | | | | | | | | | | | | This patch basically deletes some ad-hoc handling of Cabal Flags and replaces it with a correct query of the LocalBuildInfo. The flags in the local build info can be modified by users by passing hadrian options For example (!4331) ``` *.genapply.cabal.configure.opts += --flags=unregisterised ``` And all the flags specified by the `Cabal Flags` builder were already passed to configure properly using `--flags`.
* hadrian: Correct generation of hsc2hs wrapperMatthew Pickering2022-03-241-1/+1
| | | | | | | | | | | | | | | | | If you inspect the inside of a wrapper script for hsc2hs you will see that the cflag and lflag values are concatenated incorrectly. ``` HSC2HS_EXTRA="--cflag=-U__i686--lflag=-fuse-ld=gold" ``` It should instead be ``` HSC2HS_EXTRA="--cflag=-U__i686 --lflag=-fuse-ld=gold" ``` Fixes #21221
* hi haddock: Lex and store haddock docs in interface filesZubin Duggal2022-03-233-1/+2
| | | | | | | | | | | | | | | | | | 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.
* Hadrian: account for change in late-ccs flagsheaf2022-03-171-1/+1
| | | | | | The late cost centre flag was renamed from -fprof-late-ccs to -fprof-late in 7fe07143, but this change hadn't been propagated to Hadrian.
* Hadrian: use IntSet Binary instance for Way (#19209)Sylvain Henry2022-03-121-2/+2
|
* Hadrian: avoid allocations in WayUnit's Read instance (#19209)Sylvain Henry2022-03-121-1/+8
|
* Hadrian: remove useless importsSylvain Henry2022-03-122-5/+0
| | | | Added for no reason in 7ce1b694f7be7fbf6e2d7b7eb0639e61fbe358c6
* Hadrian: avoid allocating in stageString (#19209)Sylvain Henry2022-03-121-1/+6
|
* Hadrian: avoid useless allocations in trackArgumentSylvain Henry2022-03-121-4/+12
| | | | | | | | Cf ticky report before the change: Entries Alloc Alloc'd Non-void Arguments STG Name -------------------------------------------------------------------------------- 696987 29044128 0 1 L main:Target.trackArgument_go5{v r24kY} (fun)
* users guide: Eliminate spurious \spxentry mentionsBen Gamari2022-03-111-2/+8
| | | | | | | We were failing to pass the style file to `makeindex`, as is done by the mklatex configuration generated by Sphinx. Fixes #20913.
* gitlab-ci: Use the linters image in hlint jobBen Gamari2022-03-111-1/+1
| | | | | | As the `hlint` executable is only available in the linters image. Fixes #21146.