LinuxCommandLibrary

llvm-gcc

GCC frontend for the LLVM compiler infrastructure

TLDR

Compile C program

$ llvm-gcc -o [program] [source.c]
copy
Compile with optimization
$ llvm-gcc -O2 -o [program] [source.c]
copy
Generate LLVM bitcode
$ llvm-gcc -emit-llvm -c [source.c]
copy

SYNOPSIS

llvm-gcc [options] sourcefiles_...

DESCRIPTION

llvm-gcc is a GCC frontend for the LLVM compiler infrastructure. Provides GCC-compatible interface that generates LLVM intermediate representation. Deprecated in favor of clang.

PARAMETERS

-o file

Output file name.
-O level
Optimization level (0-3).
-emit-llvm
Generate LLVM bitcode.
-c
Compile only, no linking.
-S
Generate assembly output.
-g
Include debug information.

CAVEATS

This tool is deprecated. Use clang instead for LLVM-based compilation.

SEE ALSO

clang(1), gcc(1), llvm-g++(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community