Re: [PATCH 1/3] arm64: rust: Enable Rust support for AArch64

Miguel Ojeda
2023-01-26T17:57:16Z

On Thu, Jan 26, 2023 at 5:35 PM Will Deacon <will@kernel.org> wrote:
>
> Why do we need to specify this stuff here? LLVM already knows about AArch64
> and can compute the data-layout string in computeDataLayout(). Can we have
> the tools figure this out for us instead, please?

I agree -- the reason we have this for the moment is to provide full
control of the target spec, in particular for cases where `rustc` may
not provide enough flags to customize exiting builtin target specs
and/or may emit warnings for unknown target features etc.

If it is already enough for arm64 to use e.g. the
`aarch64-unknown-none` target spec plus flags on top, then we should
go for that, because that is the end goal: these target spec files are
unstable in the Rust compiler (and not intended to become stable).

For context, upstream Rust so far has been willing to merge support
for flags and target features that we needed, which is great.

Cheers,
Miguel