summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/files/hardcodepaths.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rust/files/hardcodepaths.patch')
-rw-r--r--meta/recipes-devtools/rust/files/hardcodepaths.patch46
1 files changed, 0 insertions, 46 deletions
diff --git a/meta/recipes-devtools/rust/files/hardcodepaths.patch b/meta/recipes-devtools/rust/files/hardcodepaths.patch
deleted file mode 100644
index 696654227e..0000000000
--- a/meta/recipes-devtools/rust/files/hardcodepaths.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1When building for the target, some build paths end up embedded in the binaries.
2These changes remove that. Further investigation is needed to work out the way
3to resolve these issues properly upstream.
4
5Upstream-Status: Inappropriate [patches need rework]
6Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
8
9diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs
10index b4b2ab1e1f8a..8bb3e3f0557c 100644
11--- a/compiler/rustc_codegen_llvm/src/context.rs
12+++ b/compiler/rustc_codegen_llvm/src/context.rs
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 @@
22 }
23 }
24
25- // Ensure the data-layout values hardcoded remain the defaults.
26- {
27- let tm = crate::back::write::create_informational_target_machine(tcx.sess);
28- llvm::LLVMRustSetDataLayoutFromTargetMachine(llmod, &tm);
29-
30- let llvm_data_layout = llvm::LLVMGetDataLayoutStr(llmod);
31- let llvm_data_layout = str::from_utf8(CStr::from_ptr(llvm_data_layout).to_bytes())
32- .expect("got a non-UTF8 data-layout from LLVM");
33-
34- if target_data_layout != llvm_data_layout {
35- tcx.dcx().emit_err(crate::errors::MismatchedDataLayout {
36- rustc_target: sess.opts.target_triple.to_string().as_str(),
37- rustc_layout: target_data_layout.as_str(),
38- llvm_target: sess.target.llvm_target.borrow(),
39- llvm_layout: llvm_data_layout,
40- });
41- }
42- }
43-
44 let data_layout = SmallCStr::new(&target_data_layout);
45 llvm::LLVMSetDataLayout(llmod, data_layout.as_ptr());
46