-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Update mips64 data layout to match LLVM 20 change #132741
Conversation
LLVM changed the data layout in llvm/llvm-project#112084
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
@rustbot label llvm-main |
These commits modify compiler targets. |
r? @nikic |
Is there some way to make this conditional on the LLVM version, or how are these kind of changes normally handled? |
You want to add an adjustment here in compiler/rustc_codegen_llvm/src/context.rs, see #132422 for an example of the same change for SPARC. |
This comment has been minimized.
This comment has been minimized.
Perfect, thanks! |
@bors r+ rollup |
Update mips64 data layout to match LLVM 20 change LLVM changed the data layout in llvm/llvm-project#112084
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion) - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates) - rust-lang#132639 (core: move intrinsics.rs into intrinsics folder) - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - rust-lang#132737 (bootstrap: Print better message if lock pid isn't available) - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting) - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax) - rust-lang#132741 (Update mips64 data layout to match LLVM 20 change) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132741 - zmodem:mips_data_layout, r=nikic Update mips64 data layout to match LLVM 20 change LLVM changed the data layout in llvm/llvm-project#112084
Update mips64 data layout to match LLVM 20 change LLVM changed the data layout in llvm/llvm-project#112084
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion) - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates) - rust-lang#132639 (core: move intrinsics.rs into intrinsics folder) - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - rust-lang#132737 (bootstrap: Print better message if lock pid isn't available) - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting) - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax) - rust-lang#132741 (Update mips64 data layout to match LLVM 20 change) r? `@ghost` `@rustbot` modify labels: rollup
Rust's 128-bit integers have historically been incompatible with C [1]. However, there have been a number of changes in Rust and LLVM that mean this is no longer the case: * Incorrect alignment of `i128` on x86 [1]: adjusting Rust's alignment proposed at rust-lang/compiler-team#683, implemented at rust-lang#116672. * LLVM version of the above: resolved in LLVM, including ABI fix. Present in LLVM18 (our minimum supported version). * Incorrect alignment of `i128` on 64-bit PowerPC, SPARC, and MIPS [2]: Rust's data layouts adjusted at rust-lang#132422, rust-lang#132741, rust-lang#134115. * LLVM version of the above: done in LLVM 20 llvm/llvm-project#102783. * Incorrect return convention of `i128` on Windows: adjusted to match GCC and Clang at rust-lang#134290. At [3], the lang team considered it acceptable to remove `i128` from `improper_ctypes_definitions` if the LLVM version is known to be compatible. Time has elapsed since then and we have dropped support for LLVM versions that do not have the x86 fixes, meaning a per-llvm-version lint should no longer be necessary. The PowerPC, SPARC, and MIPS changes only came in LLVM 20 but since Rust's datalayouts have also been updated to match, we will be using the correct alignment regardless of LLVM version. Closes: rust-lang#134288 Closes: rust-lang#128950 [1]: rust-lang#54341 [2]: rust-lang#128950 [3]: rust-lang/lang-team#255 (comment)
LLVM changed the data layout in llvm/llvm-project#112084