Re: [PATCH v2] Kbuild: fix issues with rustc-option
From: Miguel Ojeda
Date: Tue Oct 08 2024 - 16:22:03 EST
On Tue, Oct 8, 2024 at 7:32 PM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
>
> diff --git a/rust/probe.rs b/rust/probe.rs
> new file mode 100644
> index 000000000000..bf024e394408
> --- /dev/null
> +++ b/rust/probe.rs
> @@ -0,0 +1,7 @@
> +//! Nearly empty file passed to rustc-option by Make.
> +//!
> +//! The no_core attribute is needed because rustc-option otherwise fails due to
> +//! not being able to find the core part of the standard library.
> +
> +#![feature(no_core)]
> +#![no_core]
What I did in the GitHub issue was:
echo '#![feature(no_core)]#![no_core]' | rustc ... -
to avoid a file just for this and so that things were closer (i.e. the
comment would be then in the `Makefile`).
Not sure what Masahiro prefers.
Cheers,
Miguel