summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/files
diff options
context:
space:
mode:
authorYash Shinde <Yash.Shinde@windriver.com>2024-01-25 05:15:59 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-26 14:06:55 +0000
commit208b3bee789337f4ca90e693fbc2b53ba036662a (patch)
tree755101cefb2a0631833dc4fd822623c753b37bf8 /meta/recipes-devtools/rust/files
parent0a066f7526557b0b4e8b2db316c207306899ab98 (diff)
downloadpoky-208b3bee789337f4ca90e693fbc2b53ba036662a.tar.gz
rust: Enable RUSTC_BOOTSTRAP to use nightly features during rust oe-selftest.
Fixes: error: the option `Z` is only accepted on the nightly compiler When rust.channel is set to either beta or stable, we can't use nightly features on bootstrap without RUSTC_BOOTSTRAP. Set RUSTC_BOOTSTRAP=1 to use nightly features on stable or beta. (From OE-Core rev: 01a411223fb85fedf85472402f63f6cb2f32ed6b) 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')
-rw-r--r--meta/recipes-devtools/rust/files/rustc-bootstrap.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/files/rustc-bootstrap.patch b/meta/recipes-devtools/rust/files/rustc-bootstrap.patch
new file mode 100644
index 0000000000..406fc610bb
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/rustc-bootstrap.patch
@@ -0,0 +1,21 @@
1When rust.channel is set to either beta or stable, we can't use
2nightly features on bootstrap without RUSTC_BOOTSTRAP. Set RUSTC_BOOTSTRAP=1
3to use nightly features on stable or beta.
4
5Upstream-Status: Backport [https://github.com/rust-lang/rust/pull/119619/commits/8aa7dd06f6e50621dc10f9f9490681be8a45876f]
6
7Signed-off-by: onur-ozkan <work@onurozkan.dev>
8Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
9---
10diff --git a/src/bootstrap/synthetic_targets.rs b/ src/bootstrap/synthetic_targets.rs
11index d2c65b740da..45baf56f46b 100644
12--- a/src/bootstrap/synthetic_targets.rs
13+++ b/src/bootstrap/synthetic_targets.rs
14@@ -59,6 +59,7 @@ fn create_synthetic_target(
15 let mut cmd = Command::new(builder.rustc(compiler));
16 cmd.arg("--target").arg(base.rustc_target_arg());
17 cmd.args(["-Zunstable-options", "--print", "target-spec-json"]);
18+ cmd.env("RUSTC_BOOTSTRAP", "1");
19 cmd.stdout(Stdio::piped());
20
21 let output = cmd.spawn().unwrap().wait_with_output().unwrap();