Skip to content

cmd/compile,runtime: race support for riscv64 #64345

Open
@mauri870

Description

@mauri870

There was a previous issue requesting support for riscv64 (#58739), but it was closed because upstream support in LLVM was lacking.

On Oct 6 support for riscv64 was finally merged into the LLVM tree.

I propose we reconsider adding race detector support to Risc-V. From the top of my head this would require:

  • Update the compiler to recognize -race on linux/riscv64
  • clone llvm and compile a race_linux_riscv64.syso file, push the necessary changes upstream
  • linux-riscv64-race builder?
  • Add a new platform to x/build/cmd/racebuild to build syso files for riscv64
  • Add race instrumentation (race_riscv64.s) to runtime
  • Document support on https://go.dev/doc/articles/race_detector
  • freebsd/riscv64 support is possible in the future?

Happy to work on this for the early stage of Go 1.23.

cc @golang/runtime @golang/riscv64

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.RaceDetectorarch-riscvIssues solely affecting the riscv64 architecture.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions