From: Yash.Shinde@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: Randy.MacLeod@windriver.com, Umesh.Kallapa@windriver.com,
Naveen.Gowda@windriver.com, Sundeep.Kokkonda@windriver.com,
Shivaprasad.Moodalappa@windriver.com, Yash.Shinde@windriver.com
Subject: [PATCH v2 3/5] rust: Enable RUSTC_BOOTSTRAP to use nightly features during rust oe-selftest.
Date: Fri, 19 Jan 2024 07:09:05 -0800 [thread overview]
Message-ID: <20240119150907.3840110-3-Yash.Shinde@windriver.com> (raw)
In-Reply-To: <20240119150907.3840110-1-Yash.Shinde@windriver.com>
From: Yash Shinde <Yash.Shinde@windriver.com>
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.
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
---
.../rust/files/rustc-bootstrap.patch | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 meta/recipes-devtools/rust/files/rustc-bootstrap.patch
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 @@
+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.
+
+Upstream-Status: Backport [https://github.com/rust-lang/rust/pull/119619/commits/8aa7dd06f6e50621dc10f9f9490681be8a45876f]
+
+Signed-off-by: onur-ozkan <work@onurozkan.dev>
+Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
+---
+diff --git a/src/bootstrap/synthetic_targets.rs b/ src/bootstrap/synthetic_targets.rs
+index d2c65b740da..45baf56f46b 100644
+--- a/src/bootstrap/synthetic_targets.rs
++++ b/src/bootstrap/synthetic_targets.rs
+@@ -59,6 +59,7 @@ fn create_synthetic_target(
+ let mut cmd = Command::new(builder.rustc(compiler));
+ cmd.arg("--target").arg(base.rustc_target_arg());
+ cmd.args(["-Zunstable-options", "--print", "target-spec-json"]);
++ cmd.env("RUSTC_BOOTSTRAP", "1");
+ cmd.stdout(Stdio::piped());
+
+ let output = cmd.spawn().unwrap().wait_with_output().unwrap();
--
2.43.0
next prev parent reply other threads:[~2024-01-19 15:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 15:09 [PATCH v2 1/5] rust: Fetch cargo from rust-snapshot dir Yash.Shinde
2024-01-19 15:09 ` [PATCH v2 2/5] rust: detect user-specified custom targets in compiletest Yash.Shinde
2024-01-19 15:09 ` Yash.Shinde [this message]
2024-01-19 15:09 ` [PATCH v2 4/5] rust: Fix assertion failure error on oe-selftest Yash.Shinde
2024-01-19 15:09 ` [PATCH v2 5/5] rust: Enable rust oe-selftest Yash.Shinde
2024-01-20 17:01 ` Randy MacLeod
2024-01-22 10:59 ` Yash Shinde
2024-01-22 11:01 ` Shinde, Yash
2024-01-20 8:42 ` [OE-core] [PATCH v2 1/5] rust: Fetch cargo from rust-snapshot dir Richard Purdie
[not found] ` <17AC01A476481111.16230@lists.openembedded.org>
2024-01-20 8:49 ` Richard Purdie
2024-01-20 10:46 ` Yash Shinde
2024-01-20 17:03 ` Randy MacLeod
2024-01-22 10:58 ` Yash Shinde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240119150907.3840110-3-Yash.Shinde@windriver.com \
--to=yash.shinde@windriver.com \
--cc=Naveen.Gowda@windriver.com \
--cc=Randy.MacLeod@windriver.com \
--cc=Shivaprasad.Moodalappa@windriver.com \
--cc=Sundeep.Kokkonda@windriver.com \
--cc=Umesh.Kallapa@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox