LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

llvm-g++

g++ frontend for the LLVM compiler infrastructure

TLDR

Compile C++ program
$ llvm-g++ -o [program] [source.cpp]
copy
Compile with optimization
$ llvm-g++ -O2 -o [program] [source.cpp]
copy
Generate LLVM bitcode
$ llvm-g++ -emit-llvm -c [source.cpp]
copy

SYNOPSIS

llvm-g++ [options] sourcefiles_...

DESCRIPTION

llvm-g++ is a G++ frontend for the LLVM compiler infrastructure. Provides GCC-compatible C++ 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.
-std= standard
C++ standard version.
-g
Include debug information.

CAVEATS

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

SEE ALSO

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

Copied to clipboard
Kai