Re: [PATCH v1 0/2] Rust enablement for LoongArch

From: WANG Rui
Date: Tue Jan 09 2024 - 21:50:23 EST


On Wed, Jan 10, 2024 at 10:09 AM Boqun Feng <boqun.feng@xxxxxxxxx> wrote:
>
> On Wed, Jan 10, 2024 at 09:41:38AM +0800, WANG Rui wrote:
> > Hi Boqun,
> >
> > On Wed, Jan 10, 2024 at 3:35 AM Boqun Feng <boqun.feng@xxxxxxxxx> wrote:
> > >
> > > Hi,
> > >
> > > Thanks for the patch.
> > >
> > > On Mon, Jan 08, 2024 at 11:21:15AM +0800, WANG Rui wrote:
> > > > Enable Rust support for the LoongArch architecture.
> > > >
> > >
> > > Could you share how you build and test? For example, I wonder the clang
> > > or gcc version you used and bindgen version you used. Thanks.
> >
> > You are welcome! The versions I'm using are listed in
> > scripts/min-tool-version.sh, and I have tested Rust samples and the
> > rnull block driver.
> >
> > llvm: main branch (ea3c7b3397f8de8e885ea7cd1ed5138ec4a72d50)
>
> This means the LLVM support is yet to release? Or does LLVM 17 also
> work?

LLVM 17 doesn't work. The minimum LLVM version required for LoongArch
is 18.0.0. This is the reason why we have updated the
scripts/min-tool-version.sh. [1]

[1] https://lore.kernel.org/loongarch/20240108033138.217032-1-wangrui@xxxxxxxxxxx/

Regards,
Rui

>
> Regards,
> Boqun
>
> > rustc: 1.74.1
> > bindgen: 0.65.1
> >
> > Here are the build steps:
> >
> > 1. Build llvm
> > 2. Install rust, rust-src (using rustup) and bindgen
> > 3. Build kernel
> >
> > For more details, refer to Documentation/rust/quick-start.rst; there
> > is nothing special about it.
> >
> > Regards,
> > Rui
> >
> > >
> > > Regards,
> > > Boqun
> > >
> > > > Previous versions:
> > > > v0: https://lore.kernel.org/loongarch/20240106065941.180796-1-wangrui@xxxxxxxxxxx/
> > > >
> > > > Changes in v1:
> > > > - Address htmldocs warning.
> > > >
> > > > WANG Rui (2):
> > > > Documentation: rust: Add a character to the first column
> > > > LoongArch: Enable initial Rust support
> > > >
> > > > Documentation/rust/arch-support.rst | 13 +++++++------
> > > > arch/loongarch/Kconfig | 1 +
> > > > arch/loongarch/Makefile | 3 +++
> > > > scripts/generate_rust_target.rs | 10 ++++++++++
> > > > 4 files changed, 21 insertions(+), 6 deletions(-)
> > > >
> > > > --
> > > > 2.43.0
> > > >
> > >
> >
>


--
WANG Rui