Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 250 lines (200 sloc) 6.32 KB




llvm-native-gcc [OPTIONS...] FILE

native-build [OPTIONS...] FILE


llvm-native-gcc is a wrapper around the LLVM command-line tools which generates a native object (.o) file by compiling FILE with llvm-gcc, and then running an LLVM back-end (CBE by default) over the resulting bitcode, and then compiling the resulting code to a native object file.

If called as "native-build", it compiles bitcode to native code, and takes different options.


llvm-native-gcc takes the same options as llvm-gcc. All options except -mllvm-backend=... are passed on to llvm-gcc.


Use BACKEND for native code generation.


Print command lines that llvm-native-gcc runs.


llvm-native-gcc tries to guess the name of the llvm-gcc output file by looking for this option in the command line. If it can't find it, it finds the last C or C++ source file named on the command line, and turns its suffix into .o. See BUGS.


Save temporary files used by llvm-native-gcc (and llvm-gcc, and gcc).


llvm-native-gcc only handles the case where llvm-gcc compiles a single file per invocation. llvm-native-gcc has weak command-line argument parsing and is a poor substitute for making gcc/gcc.c do this stuff.

This manual page does not adequately document native-build mode.

llvm-native-gcc is pretty gross because it represents the blind merging of two other scripts that predated it. It could use some code clean-up.




Brian R. Gaeke