[Git][ghc/ghc][wip/toolchain-selection] 26 commits: Add a hint to enable ExplicitNamespaces for type operator imports (Fixes/Enhances #20007)

Rodrigo Mesquita (@alt-romes) gitlab at gitlab.haskell.org
Tue Jul 11 16:30:59 UTC 2023



Rodrigo Mesquita pushed to branch wip/toolchain-selection at Glasgow Haskell Compiler / GHC


Commits:
8e11630e by jade at 2023-07-10T16:58:40-04:00
Add a hint to enable ExplicitNamespaces for type operator imports (Fixes/Enhances #20007)

As suggested in #20007 and implemented in !8895, trying to import type operators
will suggest a fix to use the 'type' keyword, without considering whether
ExplicitNamespaces is enabled. This patch will query whether ExplicitNamespaces
is enabled and add a hint to suggest enabling ExplicitNamespaces if it isn't enabled,
alongside the suggestion of adding the 'type' keyword.

- - - - -
61b1932e by sheaf at 2023-07-10T16:59:26-04:00
tyThingLocalGREs: include all DataCons for RecFlds

The GREInfo for a record field should include the collection of all
the data constructors of the parent TyCon that have this record field.
This information was being incorrectly computed in the tyThingLocalGREs
function for a DataCon, as we were not taking into account other
DataCons with the same parent TyCon.

Fixes #23546

- - - - -
e6627cbd by Alan Zimmerman at 2023-07-10T17:00:05-04:00
EPA: Simplify GHC/Parser.y comb3

A follow up to !10743

- - - - -
ee20da34 by Bodigrim at 2023-07-10T17:01:01-04:00
Document that compareByteArrays# is available since ghc-prim-0.5.2.0

- - - - -
4926af7b by Matthew Pickering at 2023-07-10T17:01:38-04:00
Revert "Bump text submodule"

This reverts commit d284470a77042e6bc17bdb0ab0d740011196958a.

This commit requires that we bootstrap with ghc-9.4, which we do not
require until #23195 has been completed.

Subsequently this has broken nighty jobs such as the rocky8 job which in
turn has broken nightly releases.

- - - - -
d1c92bf3 by Ben Gamari at 2023-07-11T08:07:02-04:00
compiler: Fingerprint more code generation flags

Previously our recompilation check was quite inconsistent in its
coverage of non-optimisation code generation flags. Specifically, we
failed to account for most flags that would affect the behavior of
generated code in ways that might affect the result of a program's
execution (e.g. `-feager-blackholing`, `-fstrict-dicts`)

Closes #23369.

- - - - -
eb623149 by Ben Gamari at 2023-07-11T08:07:02-04:00
compiler: Record original thunk info tables on stack

Here we introduce a new code generation option, `-forig-thunk-info`,
which ensures that an `stg_orig_thunk_info` frame is pushed before every
update frame. This can be invaluable when debugging thunk cycles and
similar.

See Note [Original thunk info table frames] for details.

Closes #23255.

- - - - -
4731f44e by Jaro Reinders at 2023-07-11T08:07:40-04:00
Fix wrong MIN_VERSION_GLASGOW_HASKELL macros

I forgot to change these after rebasing.

- - - - -
74a92224 by Rodrigo Mesquita at 2023-07-11T17:17:30+01:00
configure: Drop DllWrap command

We used to configure into settings a DllWrap command for windows
builds and distributions, however, we no longer do, and dllwrap is
effectively unused.

This simplification is motivated in part by the larger
toolchain-selection project (#19877, !9263)

- - - - -
db4454a3 by Ben Gamari at 2023-07-11T17:22:24+01:00
ghc-toolchain: Initial commit

- - - - -
de6a0116 by Rodrigo Mesquita at 2023-07-11T17:22:24+01:00
Create ghc_toolchain.m4

Don't pass options to ghc-toolchain, it should arrive at the same conclusion as configure for now

Don't crash on ghc-toolchain failure

Mingw bundled toolchain

- - - - -
87c8aea7 by Rodrigo Mesquita at 2023-07-11T17:23:46+01:00
ghc-toolchain: Toolchain Selection

ghc-toolchain: Rename readProcess to readProcessStdout

Fixes bugs regarding a translation from the original autconf program
that failed to account for the exit code.

The longer name reenforces that we really only care about the stdout,
and the exit code and stderr of the program are irrelevant for the case.

Fixes

Re-introduce ld-override option

ghc-toolchain library and usage in hadrian flags

Re-introduce flags in hadrian config

ghc-toolchain: UseLibFFI, LdCompactUnwind, LdFileList

A more complete ghc-toolchain.
Added configuration of:

* Use libffi for adjustors
* Supports compact unwind
* Supports filelist

Handle passing CPP cmd and flags from configure to ghc-toolchain

Rip more of configure that is no longer being used

Remove configure checks of GNUnoexecStack and ident directive

And fix bug in ghc-toolchain respective code

Rip out more from hadrians system.config.in

Configure CLink supports response files

Read deleted keys from host and target's target

Delete CMD_OPTS_STAGEX

Instead of having configure configure different options for different
programs depend on the stage, we delete this completely and have hadrian
select the correct target toolchain configuration file depending on the
stage, from which it can read those options.

Fix [host|target]-[os|arch] vs [host|target]-haskell-[os|arch]

Handle unspecified vs specified flags and commands better

Configure Cpp and HsCpp separately

Fixes for compilation

Link is GNU linkerg

Revert "Rip more of configure that is no longer being used"

I realized we still need this function in rts/configure.ac

This reverts commit 01f5d4b4.

Revert get_arm_isa deletion from 74f03f24

As in the previous commit, we still need this info from the rts
configure script.

I suppose it could be useful for the rts to also read somehow the
toolchain information...

helper AC function for enable/disable

Delete unused imports of SysTools.Info

Drop PROG_CPP in distrib/autoconf too

Get rid of MonadCatch instances and dependencies

ghc-toolchain: Check Cc supports extra-via-c-flags

Consider empty programs as non-specified programs

Cpp and HsCpp cleanup

Add comment from check for gold t22266

Remove more settings bits from hadrian/cfg

Use llvm target from ghc-toolchain

Print default.target

Fix bugs in MergeTool and Ar

Add check and log errors on error

X

Revert LLVMTarget deletion in mkprojectmkin

Fix stack job

Fixes for ghc-toolchain to match configure output

ghc-toolchain: Fix ar supports at file

Fixes

ghc-toolchain: Fix check for gold bug

ghc-toolchain: configure linker options correctly

Support more targets and dont use llvmtarget

allow duplos in place of triples

A TODO comment

ghc-toolchain: set CC LD plat. dependent flags

A lot to be said about the approach of configuring linker flags (what
used to be SET CC LD platform dependent flags in configure), we might
want to re-do this all eventually...
Perhaps I ought to add a TODO at the top level of these functions?

We might also not do it altogether, some of these might be outdated?

Move osElfTarget from GHC.Platform to GHC.Platform.ArchOS, to use it in
Toolchain.Tools.Link to correctly determine if -Wl,--no-as-needed is required

Windows bundled toolchain, output path, etc

Add windows bundled toolchain specific flags

- - - - -
1a278f13 by Rodrigo Mesquita at 2023-07-11T17:24:48+01:00
refactor on hadrian handling of toolchains

Fixes to hadrian and ghc-toolchain

- - - - -
25ba707c by Rodrigo Mesquita at 2023-07-11T17:24:49+01:00
configure: Create and validate toolchain target file

Interpolate LeadingUnderscore in distrib/configure.ac.in

- - - - -
c660ea0c by Rodrigo Mesquita at 2023-07-11T17:24:49+01:00
Split GHC.Platform.ArchOS from ghc-boot into ghc-platform

- - - - -
3e29f45f by Rodrigo Mesquita at 2023-07-11T17:24:49+01:00
Use ghc-platform instead of ghc-boot

- - - - -
9ae06670 by Rodrigo Mesquita at 2023-07-11T17:24:49+01:00
Revert "Mingw bundled toolchain"

This reverts commit 7d04d6bcb4a65d6dc97f1d59497c3c0a208b8be6.

Revert "Windows bundled toolchain, output path, etc"

This reverts commit 50089ea4b39885c38f1e6b02c9babebf47170d1c.

Revert "Add windows bundled toolchain specific flags"

This reverts commit a5734d7450890f739196d46610ba8d5558755782.

Adjust

- - - - -
aff8843a by Rodrigo Mesquita at 2023-07-11T17:24:49+01:00
FixeWs

Fixes2

- - - - -
bfbc9fdf by Rodrigo Mesquita at 2023-07-11T17:24:49+01:00
Try to add locally-executable arg

- - - - -
bf593b9a by Rodrigo Mesquita at 2023-07-11T17:24:49+01:00
New host.target

- - - - -
5cb99b17 by Rodrigo Mesquita at 2023-07-11T17:24:49+01:00
Try to parse the undefined fields

- - - - -
d2e361a9 by Rodrigo Mesquita at 2023-07-11T17:24:49+01:00
Configure Host toolchain with dummy options, hope they aren't used

- - - - -
fbbfe3a2 by Rodrigo Mesquita at 2023-07-11T17:24:49+01:00
prettier comment

- - - - -
72e96c8a by Rodrigo Mesquita at 2023-07-11T17:24:49+01:00
Fixes

- - - - -
9d2e941f by Rodrigo Mesquita at 2023-07-11T17:30:51+01:00
Windows builtin toolchain

- - - - -
d6fc7cde by Rodrigo Mesquita at 2023-07-11T17:30:51+01:00
dont validate ghc-toolchain host

- - - - -


30 changed files:

- + TODO
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Driver/Config/StgToCmm.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Iface/Recomp/Flags.hs
- compiler/GHC/Linker/Static.hs
- compiler/GHC/Parser.y
- compiler/GHC/Platform.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Settings.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/StgToCmm/Bind.hs
- compiler/GHC/StgToCmm/Config.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Types/Hint/Ppr.hs
- compiler/GHC/Types/TyThing.hs
- compiler/cbits/genSym.c
- configure.ac
- + default.host.target.in
- + default.target.in
- distrib/configure.ac.in
- docs/users_guide/debugging.rst
- hadrian/bindist/Makefile
- hadrian/bindist/config.mk.in
- hadrian/cabal.project
- hadrian/cfg/system.config.in
- hadrian/hadrian.cabal


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/961b4526e7f17ccb2bfe0c87bc6b822d3ff74fe9...d6fc7cde983844f8378d310080f7d83d1ee3c0db

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/961b4526e7f17ccb2bfe0c87bc6b822d3ff74fe9...d6fc7cde983844f8378d310080f7d83d1ee3c0db
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230711/582ff287/attachment-0001.html>


More information about the ghc-commits mailing list