[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 31 commits: hadrian: Add ghcToolchain to tool args list
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Oct 11 14:42:05 UTC 2023
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
3ed58cef by Matthew Pickering at 2023-10-10T19:01:22-04:00
hadrian: Add ghcToolchain to tool args list
This allows you to load ghc-toolchain and ghc-toolchain-bin into HLS.
- - - - -
476c02d4 by Matthew Pickering at 2023-10-10T19:01:22-04:00
ghc-toolchain: Normalise triple via config.sub
We were not normalising the target triple anymore like we did with the
old make build system.
Fixes #23856
- - - - -
303dd237 by Matthew Pickering at 2023-10-10T19:01:22-04:00
ghc-toolchain: Add missing vendor normalisation
This is copied from m4/ghc_convert_vendor.m4
Towards #23868
- - - - -
838026c9 by Matthew Pickering at 2023-10-10T19:01:22-04:00
ghc-toolchain: Add loongarch64 to parseArch
Towards #23868
- - - - -
1a5bc0b5 by Matthew Pickering at 2023-10-10T19:01:22-04:00
Add same LD hack to ghc-toolchain
In the ./configure script, if you pass the `LD` variable then this has
the effect of stopping use searching for a linker and hence passing
`-fuse-ld=...`.
We want to emulate this logic in ghc-toolchain, if a use explicilty
specifies `LD` variable then don't add `-fuse-ld=..` with the goal of
making ./configure and ghc-toolchain agree on which flags to use when
using the C compiler as a linker.
This is quite unsavoury as we don't bake the choice of LD into the
configuration anywhere but what's important for now is making
ghc-toolchain and ./configure agree as much as possible.
See #23857 for more discussion
- - - - -
42d50b5a by Ben Gamari at 2023-10-10T19:01:22-04:00
ghc-toolchain: Check for C99 support with -std=c99
Previously we failed to try enabling C99 support with `-std=c99`, as
`autoconf` attempts. This broke on older compilers (e.g. CentOS 7) which
don't enable C99 by default.
Fixes #23879.
- - - - -
da2961af by Matthew Pickering at 2023-10-10T19:01:22-04:00
ghc-toolchain: Add endianess check using __BYTE_ORDER__ macro
In very old toolchains the BYTE_ORDER macro is not set but thankfully
the __BYTE_ORDER__ macro can be used instead.
- - - - -
d8da73cd by Matthew Pickering at 2023-10-10T19:01:22-04:00
configure: AC_PATH_TARGET_TOOL for LD
We want to make sure that LD is set to an absolute path in order to be
consistent with the `LD=$(command -v ld)` call. The AC_PATH_TARGET_TOOL
macro uses the absolute path rather than AC_CHECK_TARGET_TOOL which
might use a relative path.
- - - - -
171f93cc by Matthew Pickering at 2023-10-10T19:01:22-04:00
ghc-toolchain: Check whether we need -std=gnu99 for CPP as well
In ./configure the C99 flag is passed to the C compiler when used as a C
preprocessor. So we also check the same thing in ghc-toolchain.
- - - - -
89a0918d by Matthew Pickering at 2023-10-10T19:01:22-04:00
Check for --target linker flag separately to C compiler
There are situations where the C compiler doesn't accept `--target` but
when used as a linker it does (but doesn't do anything most likely)
In particular with old gcc toolchains, the C compiler doesn't support
--target but when used as a linker it does.
- - - - -
37218329 by Matthew Pickering at 2023-10-10T19:01:22-04:00
Use Cc to compile test file in nopie check
We were attempting to use the C compiler, as a linker, to compile a file
in the nopie check, but that won't work in general as the flags we pass
to the linker might not be compatible with the ones we pass when using
the C compiler.
- - - - -
9b2dfd21 by Matthew Pickering at 2023-10-10T19:01:22-04:00
configure: Error when ghc-toolchain fails to compile
This is a small QOL change as if you are working on ghc-toolchain and it
fails to compile then configure will continue and can give you outdated
results.
- - - - -
1f0de49a by Matthew Pickering at 2023-10-10T19:01:22-04:00
configure: Check whether -no-pie works when the C compiler is used as a linker
`-no-pie` is a flag we pass when using the C compiler as a linker (see
pieCCLDOpts in GHC.Driver.Session) so we should test whether the C
compiler used as a linker supports the flag, rather than just the C
compiler.
- - - - -
62cd2579 by Matthew Pickering at 2023-10-10T19:01:22-04:00
ghc-toolchain: Remove javascript special case for --target detection
emcc when used as a linker seems to ignore the --target flag, and for
consistency with configure which now tests for --target, we remove this
special case.
- - - - -
0720fde7 by Ben Gamari at 2023-10-10T19:01:22-04:00
toolchain: Don't pass --target to emscripten toolchain
As noted in `Note [Don't pass --target to emscripten toolchain]`,
emscripten's `emcc` is rather inconsistent with respect to its treatment
of the `--target` flag. Avoid this by special-casing this toolchain
in the `configure` script and `ghc-toolchain`.
Fixes on aspect of #23744.
- - - - -
6354e1da by Matthew Pickering at 2023-10-10T19:01:22-04:00
hadrian: Don't pass `--gcc-options` as a --configure-arg to cabal configure
Stop passing -gcc-options which mixed together linker flags and
non-linker flags. There's no guarantee the C compiler will accept both
of these in each mode.
- - - - -
c00a4bd6 by Ben Gamari at 2023-10-10T19:01:22-04:00
configure: Probe stage0 link flags
For consistency with later stages and CC.
- - - - -
1f11e7c4 by Sebastian Graf at 2023-10-10T19:01:58-04:00
Stricter Binary.get in GHC.Types.Unit (#23964)
I noticed some thunking while looking at Core.
This change has very modest, but throughout positive ghc/alloc effect:
```
hard_hole_fits(normal) ghc/alloc 283,057,664 281,620,872 -0.5%
geo. mean -0.1%
minimum -0.5%
maximum +0.0%
```
Fixes #23964.
- - - - -
a4f1a181 by Bryan Richter at 2023-10-10T19:02:37-04:00
rel_eng/upload.sh cleanups
- - - - -
80705335 by doyougnu at 2023-10-10T19:03:18-04:00
ci: add javascript label rule
This adds a rule which triggers the javascript job when the "javascript"
label is assigned to an MR.
- - - - -
a2c0fff6 by Matthew Craven at 2023-10-10T19:03:54-04:00
Make 'wWarningFlagsDeps' include every WarningFlag
Fixes #24071.
- - - - -
d055f099 by Jan HrĨek at 2023-10-10T19:04:33-04:00
Fix pretty printing of overlap pragmas in TH splices (fixes #24074)
- - - - -
0746b868 by Andreas Klebinger at 2023-10-10T19:05:09-04:00
Aarch64 NCG: Use encoded immediates for literals.
Try to generate
instr x2, <imm>
instead of
mov x1, lit
instr x2, x1
When possible. This get's rid if quite a few redundant
mov instructions.
I believe this causes a metric decrease for LargeRecords as
we reduce register pressure.
-------------------------
Metric Decrease:
LargeRecord
-------------------------
- - - - -
739f4e6f by Andreas Klebinger at 2023-10-10T19:05:09-04:00
AArch NCG: Refactor getRegister'
Remove some special cases which can be handled just as well by the
generic case.
This increases code re-use while also fixing #23749. Since some of the
special case wasn't upholding Note [Signed arithmetic on AArch64].
- - - - -
1b213d33 by Andreas Klebinger at 2023-10-10T19:05:09-04:00
Aarch ncg: Optimize immediate use for address calculations
When the offset doesn't fit into the immediate we now just reuse the
general getRegister' code path which is well optimized to compute the
offset into a register instead of a special case for CmmRegOff.
This means we generate a lot less code under certain conditions which is
why performance metrics for these improve.
-------------------------
Metric Decrease:
T4801
T5321FD
T5321Fun
-------------------------
- - - - -
26b7e1eb by John Ericson at 2023-10-11T10:41:26-04:00
RTS configure: Move over mem management checks
These are for heap allocation, a strictly RTS concern.
All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.
The RTS configure one has a new
```
AC_CHECK_SIZEOF([void *])
```
that the top-level configure version didn't have, so that
`ac_cv_sizeof_void_p` is defined. Once more code is moved over in latter
commits, that can go away.
Progress towards #17191
- - - - -
8d717a5d by John Ericson at 2023-10-11T10:41:26-04:00
RTS configure: Move over `__thread` check
This used by (@bgamari thinks) the `GCThread` abstraction in the RTS.
All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.
Progress towards #17191
- - - - -
46dc5aae by John Ericson at 2023-10-11T10:41:26-04:00
RTS configure: Move over misc function checks
These are for general use in the RTS.
All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.
Progress towards #17191
- - - - -
f151ac96 by John Ericson at 2023-10-11T10:41:26-04:00
RTS configure: Move over `eventfd` check
This check is for the RTS part of the event manager and has a
corresponding part in `base`.
All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.
Progress towards #17191
- - - - -
1974f6af by John Ericson at 2023-10-11T10:41:27-04:00
Split `FP_CHECK_PTHREADS` and move part to RTS configure
`NEED_PTHREAD_LIB` is unused since
3609340743c1b25fdfd0e18b1670dac54c8d8623 (part of the make build
system), and so is no longer defined.
Progress towards #17191
- - - - -
96f85149 by Sylvain Henry at 2023-10-11T10:41:38-04:00
Modularity: pass TempDir instead of DynFlags (#17957)
- - - - -
30 changed files:
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/upload.sh
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/AArch64/Regs.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/SysTools/Process.hs
- compiler/GHC/SysTools/Tasks.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Unit/Types.hs
- configure.ac
- hadrian/doc/testsuite.md
- hadrian/src/Rules/ToolArgs.hs
- hadrian/src/Settings/Builders/Cabal.hs
- m4/find_merge_objects.m4
- m4/fp_cc_supports_target.m4
- m4/fp_check_pthreads.m4
- m4/fp_gcc_supports_no_pie.m4
- + m4/fp_prog_cc_linker_target.m4
- m4/ghc_toolchain.m4
- rts/configure.ac
- + testsuite/tests/th/T24074.hs
- + testsuite/tests/th/T24074.stderr
- testsuite/tests/th/all.T
- utils/ghc-toolchain/exe/Main.hs
- utils/ghc-toolchain/ghc-toolchain.cabal
- + utils/ghc-toolchain/src/GHC/Toolchain/NormaliseTriple.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/36a260492ffea091ee3ace7c78b0c824ab54e9ec...96f85149d5e596dee9d188a2c0e34f825b1ce60d
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/36a260492ffea091ee3ace7c78b0c824ab54e9ec...96f85149d5e596dee9d188a2c0e34f825b1ce60d
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/20231011/fc40f209/attachment-0001.html>
More information about the ghc-commits
mailing list