LLD support for RiscV Baremetal backend

Hello Everyone
Does LLD support RiscV baremetal backend? If yes what configure options should we enable to build LLD?
This is in line with my work which involves developing some Link-time passes to compute Program Dependence Graph as part of my work.

Thanking you
Sai

Hello Everyone
I figured out that LLD works for RiscV baremetal backend. I enabled the -mno-relax flag.

If that was the problem, the error message should clearly have stated that (“relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax”)?

Hello @jrtc27
Thanks for pointing this out. I initially believed that lld did not support Risc-V Baremetal backend until I saw your comment in this post: ⚙ D74704 Support -fuse-ld=lld for riscv.
This is the final command I used:

clang -mcmodel=medany $(OBJS) -fuse-ld=lld -mno-relax --gcc-toolchain=$(RISCV) -march=rv64gc -o kernel_baseline -static -nostdlib -nostartfiles -Wl,-L$(LINKER_NORMAL_PATH) -Wl,-T$(LINKER_NORMAL_PATH)/linker.x  -lm -lgcc

And yes, I got the -mno-relax flag error when I tried using the lld linker.

Thanking you
Sai