[codegen] How to generate LLVM IR without debug information?

I am using LLVM as a backend for TVM to run on a new CPU architecture called Loongarch. However, the JIT functionality of LLVM is supported on this architecture with some problems. It doesn’t work with debug information.

For example:

clang -emit-llvm -S hello.c -o hello.ll

lli hello.ll

It works fine. But if you add debug options -g :

clang -g -emit-llvm -S hello.c -o hello.ll

lli hello.ll

It doesn’t work (Segmentation fault) !

Modifying LLVM for the architecture is beyond my power. So I want TVM to directly generate LLVM IR without debug information, so that I can circumvent this error. How to generate LLVM IR without debug information?