1,I used the following instructions to generate the LLVM IR
rustc --emit=llvm-ir main.rs
2,then convert to assembly code using LLC
llc-10 main.ll -o main.s
3,want to compile main.s into an executable
Using assembler -- as
as -o main.o main.s
Using linker -- ld
ld -s -o main main.o
while one error appeared, which is “undefined reference to rust_eh_personality”.
enter image description here
i want to ask why and how can i do?