-
Notifications
You must be signed in to change notification settings - Fork 13.6k
GCC backend subtree update #143161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bors
merged 42 commits into
rust-lang:master
from
GuillaumeGomez:subtree-update_cg_gcc_2025-06-28
Jun 29, 2025
Merged
GCC backend subtree update #143161
Changes from 41 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
8ad6957
Cleanup CodegenFnAttrFlags
Noratrieb 0348509
Pass PlaceRef rather than Bx::Value to codegen_intrinsic_call
bjorn3 f994713
Remove usage of FnAbi in codegen_intrinsic_call
bjorn3 f6489c3
Remove codegen_unit from MiscCodegenMethods
bjorn3 4d47f6d
Remove a couple of uses of interior mutability around statics
bjorn3 f297400
Make predefine methods take &mut self
bjorn3 96be6ef
Remove methods from StaticCodegenMethods that are not called in cg_ss…
bjorn3 244ea12
Mark all optimize methods and the codegen method as safe
bjorn3 0c6f946
Remove unused arg_memory_ty method
bjorn3 dbbfb6e
get rid of rustc_codegen_ssa::common::AtomicOrdering
RalfJung acb2fcd
Rollup merge of #141507 - RalfJung:atomic-intrinsics, r=bjorn3
matthiaskrgr 5c4b797
Use layout field of OperandRef and PlaceRef in codegen_intrinsic_call
bjorn3 926c8c8
Use layout field of OperandRef in generic_simd_intrinsic
bjorn3 6c6c31d
Avoid computing function type for intrinsic instances
bjorn3 f383b17
Directly use from_immediate for handling bool
bjorn3 f69d8fc
Merge branch 'master' into sync_from_rust_2025_06_02
antoyo 2d7d0ee
Update to nightly-2025-06-02
antoyo 38f134c
Remove unneeded patch
antoyo 2e89179
Make comment more specific
antoyo ed441b6
Added support for testing the backend with abi-cafe
FractalFir 395bca1
Merge pull request #710 from FractalFir/abi-cafe
antoyo b2b117e
Fixed some clippy warnings.
FractalFir 962a08f
Merge pull request #716 from FractalFir/abi-cafe
antoyo 8571aee
Skip needless calls to get_align in some cases.
FractalFir 54b1ff5
Merge pull request #718 from FractalFir/needless_align
antoyo b03f7f8
Refactored the codebase to use Function instead of RValue where possi…
FractalFir 79564c8
Merge pull request #720 from FractalFir/func_refactor
antoyo 413821f
Remove unnecesary uses of the 'current_func' field, replacing it with…
FractalFir 98d65f2
Merge pull request #722 from FractalFir/func_refactor
antoyo 7c71c83
Fix type_name intrinsic
antoyo 5735bb3
Merge branch 'master' into sync_from_rust_2025_06_02
antoyo 1449894
Fix to use Function instead of RValue
antoyo eb4d429
Fix for libgccjit 12
antoyo c7c1622
Ignore failing test
antoyo 49e65a0
Remove commented code
antoyo f876b18
Add TODOs
antoyo 8385f3c
Stop skipping libcore's f16::test_total_cmp
antoyo b7091ec
Merge pull request #694 from rust-lang/sync_from_rust_2025_06_02
antoyo f8491b1
Merge commit 'b7091eca6d8eb0fe88b58cc9a7aec405d8de5b85' into subtree-…
GuillaumeGomez 13d0ef3
Remove unwanted semi-colon in `rustc_codegen_gcc`
GuillaumeGomez a420d39
Fix signature of `filter_landing_pad`
GuillaumeGomez 3dcbc1e
Remove `()` returned value
GuillaumeGomez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
use std::ffi::OsStr; | ||
use std::path::Path; | ||
|
||
use crate::utils::run_command_with_output; | ||
|
||
fn show_usage() { | ||
println!( | ||
r#" | ||
`abi-test` command help: | ||
--help : Show this help"# | ||
); | ||
} | ||
|
||
pub fn run() -> Result<(), String> { | ||
let mut args = std::env::args().skip(2); | ||
// FractalFir: In the future, I'd like to add some more subcommands / options. | ||
// So, this loop ought to stay for that purpose. It should also stay as a while loop(to parse args) | ||
#[allow(clippy::never_loop, clippy::while_let_on_iterator)] | ||
while let Some(arg) = args.next() { | ||
match arg.as_str() { | ||
"--help" => { | ||
show_usage(); | ||
return Ok(()); | ||
} | ||
_ => return Err(format!("Unknown option {arg:?}")), | ||
} | ||
} | ||
// Ensure that we have a cloned version of abi-cafe on hand. | ||
crate::utils::git_clone( | ||
"https://github.com/Gankra/abi-cafe.git", | ||
Some("clones/abi-cafe".as_ref()), | ||
true, | ||
) | ||
.map_err(|err| (format!("Git clone failed with message: {err:?}!")))?; | ||
// Configure abi-cafe to use the exact same rustc version we use - this is crucial. | ||
// Otherwise, the concept of ABI compatibility becomes meanignless. | ||
std::fs::copy("rust-toolchain", "clones/abi-cafe/rust-toolchain") | ||
.expect("Could not copy toolchain configs!"); | ||
// Get the backend path. | ||
// We will use the *debug* build of the backend - it has more checks enabled. | ||
let backend_path = std::path::absolute("target/debug/librustc_codegen_gcc.so").unwrap(); | ||
let backend_arg = format!("--add-rustc-codegen-backend=cg_gcc:{}", backend_path.display()); | ||
// Run ABI cafe using cargo. | ||
let cmd: &[&dyn AsRef<OsStr>] = &[ | ||
&"cargo", | ||
&"run", | ||
&"--release", | ||
&"--", | ||
&backend_arg, | ||
// Test rust-LLVM to Rust-GCC calls | ||
&"--pairs", | ||
&"rustc_calls_cg_gcc", | ||
&"--pairs", | ||
&"cg_gcc_calls_rustc", | ||
// Test Rust-GCC to C calls | ||
&"--pairs", | ||
&"cg_gcc_calls_c", | ||
&"--pairs", | ||
&"c_calls_cg_gcc", | ||
]; | ||
// Run ABI cafe. | ||
run_command_with_output(cmd, Some(Path::new("clones/abi-cafe")))?; | ||
|
||
Ok(()) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
compiler/rustc_codegen_gcc/patches/0001-Pin-compiler_builtins-to-0.1.160.patch
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[toolchain] | ||
channel = "nightly-2025-05-21" | ||
channel = "nightly-2025-06-02" | ||
components = ["rust-src", "rustc-dev", "llvm-tools-preview"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.