Using cross module optimization

I am currently playing with clang -O4. I am compiling a file with a main() that returns 0, nothing else.

The commands executed are as follows:

clang++ -o main.o -c -std=c++11 -Werror -Weverything -O4 main.cpp
llvm-ld -o main main.o

This generates a .bc file and a bash script to jit it. If I add -native to the linker I get the following errors:

main.s:5:Unknown pseudo-op: .cfi_startproc
main.s:9:Unknown pseudo-op: .cfi_endproc

Is there any way to generate a native image while using -O4? I can’t seem to figure this out.

Thanks!