Commit graph

1659 commits

Author SHA1 Message Date
Guillaume Gomez
12e73aec91 Fix --use-system-gcc option handling 2025-01-24 22:42:42 +01:00
antoyo
549158123c
Merge pull request #608 from GuillaumeGomez/gcc-path
Add `--gcc-path` option
2025-01-24 12:36:21 -05:00
Guillaume Gomez
b8218f0d2b Add log to mention what GCC path the build script is using and where it comes from 2025-01-24 18:04:58 +01:00
Guillaume Gomez
4798615ad4 Add --gcc-path option 2025-01-24 18:04:58 +01:00
Antoni Boucher
f24b0d358a Add comment to explain why CG_RUSTFLAGS is needed 2025-01-24 10:49:00 -05:00
antoyo
bbc54734de
Merge pull request #607 from GuillaumeGomez/cleanup
Remove extra whitespace at the end of some line strings
2025-01-24 09:49:53 -05:00
Guillaume Gomez
8d0eb87d08 Remove extra whitespace at the end of some line strings 2025-01-24 15:29:10 +01:00
antoyo
8037b6139f
Merge pull request #602 from Anon258/master
Add grep check for LTO Test
2025-01-16 09:28:45 -05:00
Raj Aryan Agrawal
638611f5f5 Add grep check for LTO Test 2025-01-16 15:46:33 +09:00
antoyo
b5bc832bfe
Merge pull request #601 from rust-lang/update-gcc-2025-01-15
Update GCC version
2025-01-15 22:13:05 -05:00
Antoni Boucher
0ab1f8ddb0 Update the CI to Ubuntu 24.04 2025-01-15 13:59:45 -05:00
Antoni Boucher
50a9f41ce9 Update GCC version 2025-01-15 13:59:45 -05:00
Sudhanshu Singh
7bc67011d2 Remove codegen_gcc_lto_not_supported in messages.flt 2025-01-14 10:16:30 -05:00
antoyo
f703358a13
Merge pull request #597 from rust-lang/sync_from_rust_2025_01_14
Sync from rust 2025/01/14
2025-01-14 10:14:25 -05:00
Antoni Boucher
232d8a4fc0 Merge branch 'master' into sync_from_rust_2025_01_14 2025-01-14 09:54:48 -05:00
Antoni Boucher
f8b89a3d05 Fix formatting 2025-01-13 11:48:14 -05:00
Antoni Boucher
43b7e28601 Merge commit '59a81c2ca1' into subtree-update_cg_gcc_2025_01_12 2025-01-13 10:53:58 -05:00
antoyo
59a81c2ca1
Merge pull request #594 from rust-lang/sync_from_rust_2025_01_12
Sync from rust 2025/01/12
2025-01-13 10:25:25 -05:00
Antoni Boucher
17f5a4f4f0 Add support for fmaf16 2025-01-13 09:59:40 -05:00
Antoni Boucher
10d745c7f7 Do not run UI tests in the error-emitter directory 2025-01-13 08:53:59 -05:00
Antoni Boucher
500fce185c Add error pattern 2025-01-13 08:29:28 -05:00
Antoni Boucher
06fdf3df2c Use mini_core in the tests 2025-01-13 08:10:53 -05:00
Antoni Boucher
b4418b896c Fix clippy warnings 2025-01-12 19:47:47 -05:00
Antoni Boucher
59689c43f3 Update to nightly-2025-01-12 2025-01-12 19:37:10 -05:00
Antoni Boucher
b44f3718bf Merge branch 'master' into sync_from_rust_2025_01_12 2025-01-12 19:29:42 -05:00
antoyo
f03d3c4a56
Merge pull request #579 from klensy/typo
fix typo
2025-01-12 13:36:18 -05:00
antoyo
153fbfd5c4
Merge pull request #578 from rust-lang/sync_from_rust_2024_12_11
Sync from rust 2024/12/11
2025-01-12 13:34:01 -05:00
Antoni Boucher
93f7f2fdeb Add LTO test 2025-01-12 12:06:25 -05:00
Antoni Boucher
fe608c7639 Add ThinLTO test 2025-01-12 09:10:40 -05:00
Antoni Boucher
37a9e5069d Remove LTO warning 2025-01-12 09:06:40 -05:00
Antoni Boucher
0d47dc0cf0 Correctly handle the relocation model for LTO 2025-01-11 21:04:38 -05:00
Antoni Boucher
423701a3cf Add comment 2025-01-11 21:04:26 -05:00
Antoni Boucher
3e4df68991 Fix for m68k 2025-01-11 21:03:58 -05:00
Antoni Boucher
93693a52dc Disable the LTO warning for now 2025-01-11 21:03:57 -05:00
Antoni Boucher
34ed154343 Fix LTO 2025-01-11 21:02:43 -05:00
Antoni Boucher
3f23706c6c Cleanup 2025-01-11 10:41:31 -05:00
Antoni Boucher
59afbe0913 Fix for the relocation bug 2025-01-11 10:41:31 -05:00
Antoni Boucher
8bc4863951 Fix for ThinLTO 2025-01-11 10:41:31 -05:00
Antoni Boucher
747924ad86 Debug global variable not initialized bug 2025-01-11 10:41:27 -05:00
Rémy Rakic
c6f258d884 migrate rustc_codegen_gcc to the DenseBitSet name 2025-01-11 11:34:03 +00:00
David Wood
90ae2cf418 mir_transform: implement forced inlining
Adds `#[rustc_force_inline]` which is similar to always inlining but
reports an error if the inlining was not possible, and which always
attempts to inline annotated items, regardless of optimisation levels.
It can only be applied to free functions to guarantee that the MIR
inliner will be able to resolve calls.
2025-01-10 18:37:54 +00:00
Matthew Maurer
3323e5a9ad llvm: Ignore error value that is always false
See llvm/llvm-project#121851

For LLVM 20+, this function (`renameModuleForThinLTO`) has no return
value. For prior versions of LLVM, this never failed, but had a
signature which allowed an error value people were handling.
2025-01-07 01:02:22 +00:00
bors
7991f17b20 Auto merge of #134794 - RalfJung:abi-required-target-features, r=workingjubilee
Add a notion of "some ABIs require certain target features"

I think I finally found the right shape for the data and checks that I recently added in https://github.com/rust-lang/rust/pull/133099, https://github.com/rust-lang/rust/pull/133417, https://github.com/rust-lang/rust/pull/134337: we have a notion of "this ABI requires the following list of target features, and it is incompatible with the following list of target features". Both `-Ctarget-feature` and `#[target_feature]` are updated to ensure we follow the rules of the ABI.  This removes all the "toggleability" stuff introduced before, though we do keep the notion of a fully "forbidden" target feature -- this is needed to deal with target features that are actual ABI switches, and hence are needed to even compute the list of required target features.

We always explicitly (un)set all required and in-conflict features, just to avoid potential trouble caused by the default features of whatever the base CPU is. We do this *before* applying `-Ctarget-feature` to maintain backward compatibility; this poses a slight risk of missing some implicit feature dependencies in LLVM but has the advantage of not breaking users that deliberately toggle ABI-relevant target features. They get a warning but the feature does get toggled the way they requested.

For now, our logic supports x86, ARM, and RISC-V (just like the previous logic did). Unsurprisingly, RISC-V is the nicest. ;)

As a side-effect this also (unstably) allows *enabling* `x87` when that is harmless. I used the opportunity to mark SSE2 as required on x86-64, to better match the actual logic in LLVM and because all x86-64 chips do have SSE2. This infrastructure also prepares us for requiring SSE on x86-32 when we want to use that for our ABI (and for float semantics sanity), see https://github.com/rust-lang/rust/issues/133611, but no such change is happening in this PR.

r? `@workingjubilee`
2025-01-05 23:21:06 +00:00
Ralf Jung
3aba2d96d1 add dedicated type for ABI target feature constraints 2025-01-05 10:46:30 +01:00
Manuel Drehwald
d7685c4cf6 upstream rustc_codegen_llvm changes for enzyme/autodiff 2025-01-01 21:42:45 +01:00
Ralf Jung
940cbb8f28 add ABI target features *before* -Ctarget-features 2024-12-31 12:41:20 +01:00
Ralf Jung
f06f568411 x86-64 hardfloat actually requires sse2 2024-12-31 12:41:20 +01:00
Ralf Jung
e6e72ce158 adjust GCC backend 2024-12-31 12:41:20 +01:00
Antoni Boucher
02198d8458 Fix a stack overflow caused by GCC creating too many local variables 2024-12-22 12:28:56 -05:00
许杰友 Jieyou Xu (Joe)
b39498c727 Rollup merge of #133702 - RalfJung:single-variant, r=oli-obk
Variants::Single: do not use invalid VariantIdx for uninhabited enums

~~Stacked on top of https://github.com/rust-lang/rust/pull/133681, only the last commit is new.~~

Currently, `Variants::Single` for an empty enum contains a `VariantIdx` of 0; looking that up in the enum variant list will ICE. That's quite confusing. So let's fix that by adding a new `Variants::Empty` case for types that have 0 variants.

try-job: i686-msvc
2024-12-19 16:48:07 +08:00