From c746ab6891d90e7501c1a48d9b8c8b963efdac19 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Fri, 29 Jan 2021 13:24:26 +0100 Subject: [PATCH] Work around a Rust 1.49.0 regression. --- recipes-devtools/rust/rust.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes-devtools/rust/rust.inc b/recipes-devtools/rust/rust.inc index f5e109de..cb6a2367 100644 --- a/recipes-devtools/rust/rust.inc +++ b/recipes-devtools/rust/rust.inc @@ -361,6 +361,13 @@ def rust_gen_target(d, thing, wd, features, cpu): tspec['position-independent-executables'] = True tspec['panic-strategy'] = d.getVar("RUST_PANIC_STRATEGY") + # Target options have accidentally been renamed in 1.49.0 (https://github.com/rust-lang/rust/commit/dc004d4809f7e5fb5ea73ac630a0b1bdb58eabe4). + # This is fixed in all future versions (https://github.com/rust-lang/rust/commit/dd682cb48c8b667859dded98a4bbfbd891a1eca4) + # and can be removed once meta-rust removes support for 1.49.0. + tspec['target_c_int_width'] = tspec['target-c-int-width'] + tspec['target_endian'] = tspec['target-endian'] + tspec['target_family'] = tspec['target-family'] + # Don't use jemalloc as it doesn't work for many targets. # https://github.com/rust-lang/rust/pull/37392 # From 1.20.0 and forward, system allocator is the default.