summaryrefslogtreecommitdiff
path: root/hadrian
Commit message (Collapse)AuthorAgeFilesLines
* hadrian: disable alloca for in-tree GMP on wasm32Cheng Shao2023-01-231-1/+9
| | | | | When building in-tree GMP for wasm32, disable its alloca usage, since it may potentially cause stack overflow (e.g. #22602).
* hadrian: add missing docs for recently added flavour transformersCheng Shao2023-01-231-0/+16
|
* hadrian: add hi_core flavour transformerCheng Shao2023-01-231-0/+9
| | | | | | | | The hi_core flavour transformer enables -fwrite-if-simplified-core for stage1 libraries, which emit core into interface files to make it possible to restart code generation. Building boot libs with it makes it easier to use GHC API to prototype experimental backends that needs core/stg at link time.
* ghc package does not have to depend on terminfoBodigrim2023-01-182-2/+1
|
* Give the RTS it's own configure scriptJohn Ericson2023-01-185-37/+12
| | | | | | | | | | | | | Currently it doesn't do much anything, we are just trying to introduce it without breaking the build. Later, we will move functionality from the top-level configure script over to it. We need to bump Cabal for https://github.com/haskell/cabal/pull/8649; to facilitate and existing hack of skipping some configure checks for the RTS we now need to skip just *part* not *all* of the "post configure" hook, as running the configure script (which we definitely want to do) is also implemented as part of the "post configure" hook. But doing this requires exposing functionality that wasn't exposed before.
* Use -Wdefault when running Python testdriver (#22727)Krzysztof Gogolewski2023-01-181-2/+3
|
* testsuite: req_smp --> req_target_smp, req_ghc_smpSylvain Henry2023-01-181-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See #22630 and !9552 This commit: - splits req_smp into req_target_smp and req_ghc_smp - changes the testsuite driver to calculate req_ghc_smp - changes a handful of tests to use req_target_smp instead of req_smp - changes a handful of tests to use req_host_smp when needed The problem: - the problem this solves is the ambiguity surrounding req_smp - on master req_smp was used to express the constraint that the program being compiled supports smp _and_ that the host RTS (i.e., the RTS used to compile the program) supported smp. Normally that is fine, but in cross compilation this is not always the case as was discovered in #22630. The solution: - Differentiate the two constraints: - use req_target_smp to say the RTS the compiled program is linked with (and the platform) supports smp - use req_host_smp to say the RTS the host is linked with supports smp WIP: fix req_smp (target vs ghc) add flag to separate bootstrapper split req_smp -> req_target_smp and req_ghc_smp update tests smp flags cleanup and add some docstrings only set ghc_with_smp to bootstrapper on S1 or CC Only set ghc_with_smp to bootstrapperWithSMP of when testing stage 1 and cross compiling test the RTS in config/ghc not hadrian re-add ghc_with_smp fix and align req names fix T11760 to use req_host_smp test the rts directly, avoid python 3.5 limitation test the compiler in a try block align out of tree and in tree withSMP flags mark failing tests as host req smp testsuite: req_host_smp --> req_ghc_smp Fix ghc vs host, fix ghc_with_smp leftover
* Hadrian: fix warnings (#22783)Vladislav Zavialov2023-01-173-5/+3
| | | | | | | | | This change fixes the following warnings when building Hadrian: src/Hadrian/Expression.hs:38:10: warning: [-Wredundant-constraints] src/Hadrian/Expression.hs:84:13: warning: [-Wtype-equality-requires-operators] src/Hadrian/Expression.hs:84:21: warning: [-Wtype-equality-requires-operators] src/Hadrian/Haskell/Cabal/Parse.hs:67:1: warning: [-Wunused-imports]
* Hadrian: generalise &%> to avoid warningssheaf2023-01-167-21/+91
| | | | | | | | | | This patch introduces a more general version of &%> that works with general traversable shapes, instead of lists. This allows us to pass along the information that the length of the list of filepaths passed to the function exactly matches the length of the input list of filepath patterns, avoiding pattern match warnings. Fixes #22430
* Remove RTS hack for configuringJohn Ericson2023-01-092-6/+10
| | | | | See the brand new Note [Undefined symbols in the RTS] for additional details.
* packaging: Build perf builds with -split-sectionswip/various-hadrian-fixesMatthew Pickering2023-01-042-1/+14
| | | | | | | | | | | 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. This is disbled on deb9 and windows due to #21670 Closes #21135
* hadrian: Document using GHC environment variable to select boot compilerMatthew Pickering2023-01-041-0/+12
| | | | Fixes #22340
* hadrian: Add no_split_sections tranformerMatthew Pickering2023-01-046-25/+53
| | | | | | | | | | | This transformer reverts the effect of `split_sections`, which we intend to use for platforms which don't support split sections. In order to achieve this we have to modify the implemntation of the split_sections transformer to store whether we are enabling split_sections directly in the `Flavour` definition. This is because otherwise there's no convenient way to turn off split_sections due to having to pass additional linker scripts when merging objects.
* hadrian: Add test:all_deps to build just testsuite dependenciesMatthew Pickering2023-01-042-0/+16
| | | | Fixes #22534
* hadrian: Fix computation of tables_next_to_code for outOfTreeCompilerMatthew Pickering2023-01-042-1/+3
| | | | This copy-pasto was introduced in de5fb3489f2a9bd6dc75d0cb8925a27fe9b9084b
* hadrian: Ensure that linker scripts are used when merging objectsBen Gamari2022-12-241-2/+6
| | | | | | In #22527 @rui314 inadvertantly pointed out a glaring bug in Hadrian's implementation of the object merging rules: unlike the old `make` build system we utterly failed to pass the needed linker scripts. Fix this.
* hadrian bindist: Install manpages to share/man/man1/ghc.1Matthew Pickering2022-12-221-3/+14
| | | | | | | | When the installation makefile was copied over the manpages were no longer installed in the correct place. Now we install it into share/man/man1/ghc.1 as the make build system did. Fixes #22371
* Allow transformers-0.6 in ghc, ghci, ghc-bin and hadrianBodigrim2022-12-211-1/+1
|
* hadrian: Enable Cmm instrumentation in TSAN flavourBen Gamari2022-12-151-1/+1
|
* Hadrian: Drop TSAN_ENABLED define from flavourBen Gamari2022-12-151-3/+5
| | | | This is redundant since the TSANUtils.h already defines it.
* hadrian: Don't enable TSAN in stage0 buildBen Gamari2022-12-151-1/+1
|
* hadrian: Update bootstrap plans to 9.2.* series and 9.4.* series.Matthew Pickering2022-12-0935-31/+31
| | | | | | This updates the build plans for the most recent compiler versions, as well as fixing the hadrian-bootstrap-gen script to a specific GHC version.
* ci: Add job to test hadrian-multi commandMatthew Pickering2022-12-091-3/+3
| | | | | I am not sure this job is good because it requires booting HEAD with HEAD, but it should be fine.
* hadrian-toolargs: Add filepath to allowed repl targetsMatthew Pickering2022-12-091-0/+1
|
* hadrian-multi: Put interface files in separate directoriesMatthew Pickering2022-12-092-2/+4
| | | | | Before we were putting all the interface files in the same directory which was leading to collisions if the files were called the same thing.
* Allow mtl-2.3 in hadrianBodigrim2022-12-082-2/+2
|
* Add initial support for LoongArch Architecture.lrzlin2022-12-081-1/+2
|
* hadrian: don't add debug info to non-debug ways of rtsCheng Shao2022-12-081-1/+0
| | | | | | | | | Hadrian used to pass -g when building all ways of rts. It makes output binaries larger (especially so for wasm backend), and isn't needed by most users out there, so this patch removes that flag. In case the debug info is desired, we still pass -g3 when building the debug way, and there's also the debug_info flavour transformer which ensures -g3 is passed for all rts ways.
* Hadrian: fix ghcDebugAssertions off-by-one errorsheaf2022-12-065-21/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6b2f7ffe changed the logic that decided whether to enable debug assertions. However, it had an off-by-one error, as the stage parameter to the function inconsistently referred to the stage of the compiler being used to build or the stage of the compiler we are building. This patch makes it consistent. Now the parameter always refers to the the compiler which is being built. In particular, this patch re-enables assertions in the stage 2 compiler when building with devel2 flavour, and disables assertions in the stage 2 compiler when building with validate flavour. Some extra performance tests are now run in the "validate" jobs because the stage2 compiler no longer contains assertions. ------------------------- Metric Decrease: CoOpt_Singletons MultiComponentModules MultiComponentModulesRecomp MultiLayerModulesTH_OneShot T11374 T12227 T12234 T13253-spj T13701 T14683 T14697 T15703 T17096 T17516 T18304 T18478 T18923 T5030 T9872b TcPlugin_RewritePerf Metric Increase: MultiComponentModules MultiComponentModulesRecomp MultiLayerModules MultiLayerModulesRecomp MultiLayerModulesTH_Make T13386 T13719 T3294 T9233 T9675 parsing001 -------------------------
* Add Javascript backendSylvain Henry2022-11-2918-57/+185
| | | | | | | | | | | | | | | Add JS backend adapted from the GHCJS project by Luite Stegeman. Some features haven't been ported or implemented yet. Tests for these features have been disabled with an associated gitlab ticket. Bump array submodule Work funded by IOG. Co-authored-by: Jeffrey Young <jeffrey.young@iohk.io> Co-authored-by: Luite Stegeman <stegeman@gmail.com> Co-authored-by: Josh Meredith <joshmeredith2008@gmail.com>
* Don't let configure perform trivial substitutions (#21846)Sylvain Henry2022-11-236-20/+109
| | | | | | | | | | | | | | Hadrian now performs substitutions, especially to generate .cabal files from .cabal.in files. Two benefits: 1. We won't have to re-configure when we modify thing.cabal.in. Hadrian will take care of this for us. 2. It paves the way to allow the same package to be configured differently by Hadrian in the same session. This will be useful to fix #19174: we want to build a stage2 cross-compiler for the host platform and a stage1 compiler for the cross target platform in the same Hadrian session.
* hadrian:Set TNTC when running testsuite.Andreas Klebinger2022-11-221-1/+4
|
* Misc cleanupKrzysztof Gogolewski2022-11-161-1/+1
| | | | | | | * Replace catMaybes . map f with mapMaybe f * Use concatFS to concatenate multiple FastStrings * Fix documentation of -exclude-module * Cleanup getIgnoreCount in GHCi.UI
* Add support for the wasm32-wasi target tupleCheng Shao2022-11-111-1/+2
| | | | | | This patch adds the wasm32-wasi tuple support to various places in the tree: autoconf, hadrian, ghc-boot and also the compiler. The codegen logic will come in subsequent commits.
* hadrian: add targetSupportsThreadedRts flagCheng Shao2022-11-119-18/+39
| | | | | | | | | | | | | | This patch adds a targetSupportsThreadedRts flag to indicate whether the target supports the threaded rts at all, different from existing targetSupportsSMP that checks whether -N is supported by the RTS. All existing flavours have also been updated accordingly to respect this flags. Some targets (e.g. wasm32-wasi) does not support the threaded rts, therefore this flag is needed for the default flavours to work. It makes more sense to have proper autoconf logic to check for threading support, but for the time being, we just set the flag to False iff the target is wasm32.
* hadrian: add -Wwarn only for cross-compiling unixCheng Shao2022-11-111-1/+11
|
* Bump unix submodule to 2.8.0.0Matthew Pickering2022-11-051-1/+7
| | | | | | | | | | Also bumps process and ghc-boot bounds on unix. For hadrian, when cross-compiling, we add -Wwarn=unused-imports -Wwarn=unused-top-binds to validation flavour. Further fixes in unix and/or hsc2hs is needed to make it completely free of warnings; for the time being, this change is needed to unblock other cross-compilation related work.
* Export pprTrace and friends from GHC.Prelude.Andreas Klebinger2022-11-031-1/+1
| | | | | Introduces GHC.Prelude.Basic which can be used in modules which are a dependency of the ppr code.
* Pass correct package db when testing stage1.Zubin Duggal2022-10-282-2/+2
| | | | It used to pick the db for stage-2 which obviously didn't work.
* hadrian: Improve error for wrong key/value errors.Andreas Klebinger2022-10-221-1/+2
|
* Avoid Data.List.group; prefer Data.List.NonEmpty.groupBodigrim2022-09-281-3/+3
| | | | | This allows to avoid further partiality, e. g., map head . group is replaced by map NE.head . NE.group, and there are less panic calls.
* Update filepath to filepath-1.4.100.0Matthew Pickering2022-09-222-6/+1
| | | | | | | | | | Updates submodule * Always rely on vendored filepath * filepath must be built as stage0 dependency because it uses template-haskell. Towards #22098
* hadrian: Add extra_dependencies edges for all different waysMatthew Pickering2022-09-201-4/+8
| | | | | | | | | | | | | | | | | | | | The hack to add extra dependencies needed by DeriveLift extension missed the cases for profiles and dynamic ways. For the profiled way this leads to errors like: ``` GHC error in desugarer lookup in Data.IntSet.Internal: Failed to load interface for ‘Language.Haskell.TH.Lib.Internal’ Perhaps you haven't installed the profiling libraries for package ‘template-haskell’? Use -v (or `:set -v` in ghci) to see a list of the files searched for. ghc: panic! (the 'impossible' happened) GHC version 9.5.20220916: initDs ``` Therefore the fix is to add these extra edges in. Fixes #22197
* Hadrian: merge archives even in stage 0sheaf2022-09-203-7/+17
| | | | | | | | | | | | | | | | We now always merge .a archives when ar supports -L. This change is necessary in order to bootstrap GHC using GHC 9.4 on Windows, as nested archives aren't supported. Not doing so triggered bug #21990 when trying to use the Win32 package, with errors such as: Not a x86_64 PE+ file. Unknown COFF 4 type in getHeaderInfo. ld.lld: error: undefined symbol: Win32zm2zi12zi0zi0_SystemziWin32ziConsoleziCtrlHandler_withConsoleCtrlHandler1_info We have to be careful about which ar is meant: in stage 0, the check should be done on the system ar (system-ar in system.config).
* rts: make threaded ways optionalCheng Shao2022-09-171-0/+1
| | | | | | | For certain targets (e.g. wasm32-wasi), the threaded rts is known not to work. This patch adds a "threaded" cabal flag to rts to make threaded rts ways optional. Hadrian enables this flag iff the flavour rtsWays contains threaded ways.
* Hadrian: Don't try to build terminfo on Windowssheaf2022-09-161-2/+1
| | | | | Commit b42cedbe introduced a dependency on terminfo on Windows, but that package isn't available on Windows.
* hadrian: relax Cabal upper bound to allow building with Cabal-3.8Cheng Shao2022-09-161-1/+1
| | | | A follow up of !8910.
* hadrian: add late_ccs flavour transformerCheng Shao2022-09-161-0/+1
|
* hadrian: enable -fprof-late only for profiling waysCheng Shao2022-09-161-1/+1
|
* Unbreak Hadrian with Cabal 3.8.M Farkas-Dyck2022-09-141-0/+4
|