Page MenuHomePhabricator

[RISCV] Add riscv{32,64} to ALL_CRT_SUPPORTED_ARCH list

Authored by edward-jones on Oct 3 2019, 7:13 AM.



This allows crtbegin and crtend to be built, allowing RISC-V to no longer rely on implementations from libgcc.

Diff Detail

Event Timeline

edward-jones created this revision.Oct 3 2019, 7:13 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 3 2019, 7:13 AM
Herald added subscribers: llvm-commits, Restricted Project, simoncook and 10 others. · View Herald Transcript

@edward-jones: what LLVM cmake options are you using to test this?

@edward-jones: what LLVM cmake options are you using to test this?

Here's the flags I'm using for my build.

cmake llvm-project/compiler-rt
  -G "Ninja"
  -DCMAKE_C_FLAGS="-march=rv32gc -mabi=ilp32d"
  -DCMAKE_ASM_FLAGS="-march=rv32gc -mabi=ilp32d"
  -DCMAKE_EXE_LINKER_FLAGS="-nostartfiles -nostdlib"
lenary accepted this revision.Thu, Oct 17, 5:58 AM

I have finally got the runtimes building. There's basically no documentation for the compiler-rt build system, which is very infuriating. Instead I needed to do a close reading of the cmake sources. I believe I have the correct configuration now, which I need to save somewhere (potentially so it becomes available for others).

Yes, this patch is required to ensure that you can build the compiler-rt builtins and the compiler-rt crtbegin and crtend. I am happy for it to land.

This revision is now accepted and ready to land.Thu, Oct 17, 5:58 AM
This revision was automatically updated to reflect the committed changes.