clang
Compile C, C++, and Objective-C source files. tldr-pages
On several platforms
Several platforms
Compile C, C++, and Objective-C source files. Can be used as a drop-in replacement for GCC. Part of LLVM.
Compile multiple source files into an executable
clang path/to/source1.c path/to/source2.c ... --output path/to/output_executableIdentifyActivate output of all errors and warnings
clang path/to/source.c -Wall --output output_executableIdentifyShow common warnings, debug symbols in output, and optimize without affecting debugging
clang path/to/source.c -Wall --debug -Og --output path/to/output_executableIdentifyInclude libraries from a different path
clang path/to/source.c --output path/to/output_executable -Ipath/to/header -Lpath/to/library -llibrary_nameIdentifyCompile source code into LLVM Intermediate Representation (IR)
clang --assemble -emit-llvm path/to/source.c --output path/to/output.llIdentifyCompile source code into an object file without linking
clang --compile path/to/source.cIdentifyOptimize the compiled program for performance
clang path/to/source.c -O1 --output path/to/output_executableIdentifyDisplay version
clang --versionIdentify