diff options
author | Yash Shinde <Yash.Shinde@windriver.com> | 2024-08-08 03:00:37 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-08-09 22:33:38 +0100 |
commit | 41094aece8c57062f200290a6f93aec3184b93b5 (patch) | |
tree | 28d068a7e1a4c1efc07fe29529d95d9ebcbd486d /meta/recipes-devtools/rust/files/hardcodepaths.patch | |
parent | 4c9d7632f6fe7a44b4f3aa8300f0e439f1c43012 (diff) | |
download | poky-41094aece8c57062f200290a6f93aec3184b93b5.tar.gz |
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>
Diffstat (limited to 'meta/recipes-devtools/rust/files/hardcodepaths.patch')
-rw-r--r-- | meta/recipes-devtools/rust/files/hardcodepaths.patch | 49 |
1 files changed, 18 insertions, 31 deletions
diff --git a/meta/recipes-devtools/rust/files/hardcodepaths.patch b/meta/recipes-devtools/rust/files/hardcodepaths.patch index a043095f62..696654227e 100644 --- a/meta/recipes-devtools/rust/files/hardcodepaths.patch +++ b/meta/recipes-devtools/rust/files/hardcodepaths.patch | |||
@@ -10,13 +10,20 @@ diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen | |||
10 | index b4b2ab1e1f8a..8bb3e3f0557c 100644 | 10 | index b4b2ab1e1f8a..8bb3e3f0557c 100644 |
11 | --- a/compiler/rustc_codegen_llvm/src/context.rs | 11 | --- a/compiler/rustc_codegen_llvm/src/context.rs |
12 | +++ b/compiler/rustc_codegen_llvm/src/context.rs | 12 | +++ b/compiler/rustc_codegen_llvm/src/context.rs |
13 | @@ -158,46 +158,6 @@ pub unsafe fn create_module<'ll>( | 13 | @@ -34,7 +34,6 @@ |
14 | use smallvec::SmallVec; | ||
15 | |||
16 | use libc::c_uint; | ||
17 | -use std::borrow::Borrow; | ||
18 | use std::cell::{Cell, RefCell}; | ||
19 | use std::ffi::CStr; | ||
20 | use std::str; | ||
21 | @@ -155,25 +154,6 @@ | ||
14 | } | 22 | } |
15 | } | 23 | } |
16 | 24 | ||
17 | - // Ensure the data-layout values hardcoded remain the defaults. | 25 | - // Ensure the data-layout values hardcoded remain the defaults. |
18 | - if sess.target.is_builtin { | 26 | - { |
19 | - // tm is disposed by its drop impl | ||
20 | - let tm = crate::back::write::create_informational_target_machine(tcx.sess); | 27 | - let tm = crate::back::write::create_informational_target_machine(tcx.sess); |
21 | - llvm::LLVMRustSetDataLayoutFromTargetMachine(llmod, &tm); | 28 | - llvm::LLVMRustSetDataLayoutFromTargetMachine(llmod, &tm); |
22 | - | 29 | - |
@@ -24,36 +31,16 @@ index b4b2ab1e1f8a..8bb3e3f0557c 100644 | |||
24 | - let llvm_data_layout = str::from_utf8(CStr::from_ptr(llvm_data_layout).to_bytes()) | 31 | - let llvm_data_layout = str::from_utf8(CStr::from_ptr(llvm_data_layout).to_bytes()) |
25 | - .expect("got a non-UTF8 data-layout from LLVM"); | 32 | - .expect("got a non-UTF8 data-layout from LLVM"); |
26 | - | 33 | - |
27 | - // Unfortunately LLVM target specs change over time, and right now we | 34 | - if target_data_layout != llvm_data_layout { |
28 | - // don't have proper support to work with any more than one | 35 | - tcx.dcx().emit_err(crate::errors::MismatchedDataLayout { |
29 | - // `data_layout` than the one that is in the rust-lang/rust repo. If | 36 | - rustc_target: sess.opts.target_triple.to_string().as_str(), |
30 | - // this compiler is configured against a custom LLVM, we may have a | 37 | - rustc_layout: target_data_layout.as_str(), |
31 | - // differing data layout, even though we should update our own to use | 38 | - llvm_target: sess.target.llvm_target.borrow(), |
32 | - // that one. | 39 | - llvm_layout: llvm_data_layout, |
33 | - // | 40 | - }); |
34 | - // As an interim hack, if CFG_LLVM_ROOT is not an empty string then we | ||
35 | - // disable this check entirely as we may be configured with something | ||
36 | - // that has a different target layout. | ||
37 | - // | ||
38 | - // Unsure if this will actually cause breakage when rustc is configured | ||
39 | - // as such. | ||
40 | - // | ||
41 | - // FIXME(#34960) | ||
42 | - let cfg_llvm_root = option_env!("CFG_LLVM_ROOT").unwrap_or(""); | ||
43 | - let custom_llvm_used = !cfg_llvm_root.trim().is_empty(); | ||
44 | - | ||
45 | - if !custom_llvm_used && target_data_layout != llvm_data_layout { | ||
46 | - bug!( | ||
47 | - "data-layout for target `{rustc_target}`, `{rustc_layout}`, \ | ||
48 | - differs from LLVM target's `{llvm_target}` default layout, `{llvm_layout}`", | ||
49 | - rustc_target = sess.opts.target_triple, | ||
50 | - rustc_layout = target_data_layout, | ||
51 | - llvm_target = sess.target.llvm_target, | ||
52 | - llvm_layout = llvm_data_layout | ||
53 | - ); | ||
54 | - } | 41 | - } |
55 | - } | 42 | - } |
56 | - | 43 | - |
57 | let data_layout = SmallCStr::new(&target_data_layout); | 44 | let data_layout = SmallCStr::new(&target_data_layout); |
58 | llvm::LLVMSetDataLayout(llmod, data_layout.as_ptr()); | 45 | llvm::LLVMSetDataLayout(llmod, data_layout.as_ptr()); |
59 | 46 | ||