Re: [PATCH v2] rust: Respect HOSTCC when linking for host

From: Alice Ryhl
Date: Tue Sep 26 2023 - 06:45:44 EST


Matthew Maurer <mmaurer@xxxxxxxxxx> writes:
> Currently, rustc defaults to invoking `cc`, even if `HOSTCC` is defined,
> resulting in build failures in hermetic environments where `cc` does not
> exist. This includes both hostprogs and proc-macros.
>
> Since we are setting the linker to `HOSTCC`, we set the linker flavor to
> `gcc` explicitly.
>
> Signed-off-by: Matthew Maurer <mmaurer@xxxxxxxxxx>

Tested-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>