[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aYx0w8AnkK2-c11z@x1>
Date: Wed, 11 Feb 2026 09:23:31 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Dmitrii Dolgov <9erthalion6@...il.com>
Cc: linux-perf-users@...r.kernel.org, Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>, Miguel Ojeda <ojeda@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1] tools build: Fix feature test for rust compiler
On Wed, Feb 11, 2026 at 10:58:01AM +0100, Dmitrii Dolgov wrote:
> Currently a dummy rust code is compiled to detect if the rust feature
> could be enabled. It turns out that in this case rust emits a dependency
> file without any external references:
>
> /perf/feature/test-rust.d: test-rust.rs
>
> /perf/feature/test-rust.bin: test-rust.rs
>
> test-rust.rs:
>
> This can lead to a situation, when rustc was removed after a successful build,
> but the build process still thinks it's there and the feature is enabled on
> subsequent runs.
>
> Instead simply check the compiler presence to detect the feature, as
> suggested by Arnaldo Carvalho de Melo. This way no actual test-rust.bin
> will be created, meaning the feature check will not be cached and always
> performed. That's exactly what we want, and the overhead of doing this
> every time is minimal.
>
> Tested with multiple rounds of install/remove of the rust package.
Yeah, seems to work, applied.
- Arnaldo
Powered by blists - more mailing lists