clang++
LLVM C++ compiler frontend
TLDR
Compile a C++ source file
SYNOPSIS
clang++ [options] files...
DESCRIPTION
clang++ is the Clang C++ compiler frontend, part of the LLVM project. It compiles C++ source code to executable binaries or object files. Clang provides fast compilation, expressive diagnostics, and GCC compatibility.
It supports modern C++ standards and provides advanced static analysis and tooling integration.
PARAMETERS
-o file
Output file name.-c
Compile only, don't link.-std=standard
Set C++ standard (c++11, c++14, c++17, c++20, c++23).-Olevel
Optimization level (0, 1, 2, 3, s, z).-g
Generate debug information.-Wall
Enable most warnings.-Wextra
Enable extra warnings.-I path
Add include directory.-L path
Add library search path.-l library
Link with library.
CAVEATS
Some GCC-specific extensions may not be supported. Use -stdlib=libc++ for LLVM's libc++ or -stdlib=libstdc++ for GNU's standard library.
SEE ALSO
clang(1), g++(1), clang-format(1)
