[PATCH] D70401: [RISCV] Complete RV32E/ilp32e implementation

Wang Pengcheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 19 20:33:05 PDT 2023


pcwang-thead added a comment.

In D70401#4204511 <https://reviews.llvm.org/D70401#4204511>, @recallmenot wrote:

> Hi, I'm working on CH32V003 for rust and it uses RV32EC core.
> I tried replacing my distros llvm and clang with a patched version of this like this:
>
>   git clone https://aur.archlinux.org/llvm-git.git
>   cd llvm-git
>   mkdir src
>   cd src
>   git clone https://github.com/llvm/llvm-project.git
>   cd llvm-project
>   arc patch D70401
>   cd ../..
>   mv llvm-config.h src/
>   makepkg -es
>   sudo pacman -Rd --nodeps clang llvm
>   makepkg -eid
>
> but that bricked my xfce-wayland-manjaro DE (one screen black)
> And in config.toml if I put
>
>   [build]
>   target = "riscv32i-unknown-none-elf"
>   rustflags = [
>   	"-C", "target-feature=+e,+c"
>   ]
>
> then build with cargo build
> LLVM still complains it doesn't implement CodeGen for RV32E yet
> What am I doing wrong?
> Ended up reverting to repository llvm and clang, desktop now works again but CodeGen is obviously missing.

I don't see any obvious problem here.
I am not familiar with rust. Is `riscv32i-unknown-none-elf` a valid target for `rustc`, it should be something like `riscv32-unknown-elf` in LLVM I think. And is `target-feature=+e,+c` the right way to specify features?
Can you please provide the whole command/arguments passed to LLVM?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70401/new/

https://reviews.llvm.org/D70401



More information about the cfe-commits mailing list