[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72nr_X4JY=LUcj14jZfcPV5=Cn3QTucYGmBTz2QdA5=RdA@mail.gmail.com>
Date: Wed, 9 Oct 2024 14:53:17 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Masahiro Yamada <masahiroy@...nel.org>, Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>, Miguel Ojeda <ojeda@...nel.org>,
Matthew Maurer <mmaurer@...gle.com>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>,
Trevor Gross <tmgross@...ch.edu>, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v3] Kbuild: fix issues with rustc-option
On Wed, Oct 9, 2024 at 1:42 PM Alice Ryhl <aliceryhl@...gle.com> wrote:
>
> Note that RUSTC_BOOTSTRAP is also defined in the top-level Makefile, but
> its value is unfortunately *not* inherited from the environment. That
I would perhaps say ", but Make-exported variables are not inherited"
or similar to be a bit more precise (because the external environment,
as in the `make` environment, is exported unlike those variables).
> not look for the standard library. It's not possible to instead supply a
> standard library to rustc, as we need `rustc-option` before the Rust
> standard library is compiled.
The error message mentions `std`, so to clarify I would perhaps add
".... standard library (i.e. `core`)" or similar, i.e. one could think
`no_std` is enough otherwise (which would be better if we could, since
it is stable unlike `no_core`, but we don't want it here either).
> The -o and --out-dir parameters are altered to fix this warning:
>
> warning: ignoring --out-dir flag due to -o flag
>
> The --sysroot flag is provided as we would otherwise require it to be
> present in KBUILD_RUSTFLAGS. The --emit=obj flag is used to write the
> resulting rlib to /dev/null instead of writing it to a file in
> $(TMPOUT).
"the resulting object file" (i.e. the rlib is not written even if we
wrote to a file).
> I verified that the Kconfig version of rustc-option doesn't have the
> same issues.
Thanks for checking this. We may want to make it closer to what we do
her, but that can be done later.
Cheers,
Miguel
Powered by blists - more mailing lists