mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
rust: Upgrade 1.76.0->1.77.0
* Drop backported patch 0001-Handle-vendored-sources-when-remapping-paths.patch
as it's merged with rust v1.77.0.
https://blog.rust-lang.org/2024/03/21/Rust-1.77.0.html
(From OE-Core rev: 8b6b224fc116150c0af658473eecd05b742de7b1)
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4c9d7632f6
commit
41094aece8
@@ -10,13 +10,20 @@ diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen
|
||||
index b4b2ab1e1f8a..8bb3e3f0557c 100644
|
||||
--- a/compiler/rustc_codegen_llvm/src/context.rs
|
||||
+++ b/compiler/rustc_codegen_llvm/src/context.rs
|
||||
@@ -158,46 +158,6 @@ pub unsafe fn create_module<'ll>(
|
||||
@@ -34,7 +34,6 @@
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use libc::c_uint;
|
||||
-use std::borrow::Borrow;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::ffi::CStr;
|
||||
use std::str;
|
||||
@@ -155,25 +154,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- // Ensure the data-layout values hardcoded remain the defaults.
|
||||
- if sess.target.is_builtin {
|
||||
- // tm is disposed by its drop impl
|
||||
- {
|
||||
- let tm = crate::back::write::create_informational_target_machine(tcx.sess);
|
||||
- llvm::LLVMRustSetDataLayoutFromTargetMachine(llmod, &tm);
|
||||
-
|
||||
@@ -24,36 +31,16 @@ index b4b2ab1e1f8a..8bb3e3f0557c 100644
|
||||
- let llvm_data_layout = str::from_utf8(CStr::from_ptr(llvm_data_layout).to_bytes())
|
||||
- .expect("got a non-UTF8 data-layout from LLVM");
|
||||
-
|
||||
- // Unfortunately LLVM target specs change over time, and right now we
|
||||
- // don't have proper support to work with any more than one
|
||||
- // `data_layout` than the one that is in the rust-lang/rust repo. If
|
||||
- // this compiler is configured against a custom LLVM, we may have a
|
||||
- // differing data layout, even though we should update our own to use
|
||||
- // that one.
|
||||
- //
|
||||
- // As an interim hack, if CFG_LLVM_ROOT is not an empty string then we
|
||||
- // disable this check entirely as we may be configured with something
|
||||
- // that has a different target layout.
|
||||
- //
|
||||
- // Unsure if this will actually cause breakage when rustc is configured
|
||||
- // as such.
|
||||
- //
|
||||
- // FIXME(#34960)
|
||||
- let cfg_llvm_root = option_env!("CFG_LLVM_ROOT").unwrap_or("");
|
||||
- let custom_llvm_used = !cfg_llvm_root.trim().is_empty();
|
||||
-
|
||||
- if !custom_llvm_used && target_data_layout != llvm_data_layout {
|
||||
- bug!(
|
||||
- "data-layout for target `{rustc_target}`, `{rustc_layout}`, \
|
||||
- differs from LLVM target's `{llvm_target}` default layout, `{llvm_layout}`",
|
||||
- rustc_target = sess.opts.target_triple,
|
||||
- rustc_layout = target_data_layout,
|
||||
- llvm_target = sess.target.llvm_target,
|
||||
- llvm_layout = llvm_data_layout
|
||||
- );
|
||||
- if target_data_layout != llvm_data_layout {
|
||||
- tcx.dcx().emit_err(crate::errors::MismatchedDataLayout {
|
||||
- rustc_target: sess.opts.target_triple.to_string().as_str(),
|
||||
- rustc_layout: target_data_layout.as_str(),
|
||||
- llvm_target: sess.target.llvm_target.borrow(),
|
||||
- llvm_layout: llvm_data_layout,
|
||||
- });
|
||||
- }
|
||||
- }
|
||||
-
|
||||
let data_layout = SmallCStr::new(&target_data_layout);
|
||||
llvm::LLVMSetDataLayout(llmod, data_layout.as_ptr());
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user