OVERVIEW: clang LLVM compiler
USAGE: clang-21 [options] file...
CL.EXE COMPATIBILITY OPTIONS:
/? Display available options
/arch:<value> Set architecture for code generation
/arm64EC Set build target to arm64ec
/Brepro- Write current time into COFF output (default)
/Brepro Do not write current time into COFF output (breaks link.exe /incremental)
/clang:<arg> Pass <arg> to the clang driver
/C Do not discard comments when preprocessing
/c Compile only
/d1PP Retain macro definitions in /E mode
/d1reportAllClassLayout Dump record layout information
/d2epilogunwindrequirev2
Require generation of unwind v2 (epilog) information for x64 Windows
/d2epilogunwind Best effort generate unwind v2 (epilog) information for x64 Windows
/diagnostics:caret Enable caret and column diagnostics (default)
/diagnostics:classic Disable column and caret diagnostics
/diagnostics:column Disable caret diagnostics but keep column info
/diasdkdir <dir> Path to the DIA SDK
/D <macro[=value]> Define macro
/EH<value> Set exception handling model
/EP Disable linemarker output and preprocess to stdout
/execution-charset:<value>
Set runtime encoding, supports only UTF-8
/external:env:<var> Add dirs in env var <var> to include search path with warnings suppressed
/external:I <dir> Add directory to include search path with warnings suppressed
/external:W0 Ignore warnings from system headers (default)
/external:W1 Enable -Wsystem-headers
/external:W2 Enable -Wsystem-headers
/external:W3 Enable -Wsystem-headers
/external:W4 Enable -Wsystem-headers
/E Preprocess to stdout
/FA<value> Output assembly code file during compilation
/Fa<file or dir/> Set assembly output file name (with /FA)
/Fe<file or dir/> Set output executable file name
/FI <value> Include file before parsing
/Fi<file> Set preprocess output file name (with /P)
/Fo<file or dir/> Set output object file (with /c)
/Fp<file> Set pch file name (with /Yc and /Yu)
/fsanitize=address Enable AddressSanitizer
/funcoverride:<function>
Mark <function> as being replaceable by the Windows kernel loader
/GA Assume thread-local variables are defined in the executable
/Gd Set __cdecl as a default calling convention
/GF- Disable string pooling
/GF Enable string pooling (default)
/GR- Do not emit RTTI data
/Gregcall4 Set __regcall4 as a default calling convention to respect __regcall ABI v.4
/Gregcall Set __regcall as a default calling convention
/GR Emit RTTI data (default)
/Gr Set __fastcall as a default calling convention
/GS- Disable buffer security check
/GS Enable buffer security check (default)
/Gs Use stack probes (default)
/Gs<value> Set stack probe size (default 4096)
/guard:<value> Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks. Enable EH Continuation Guard with /guard:ehcont
/Gv Set __vectorcall as a default calling convention
/Gw- Do not put each data item in its own section (default)
/Gw Put each data item in its own section
/GX- Deprecated (like not passing /EH)
/GX Deprecated; use /EHsc
/Gy- Do not put each function in its own section (default)
/Gy Put each function in its own section
/Gz Set __stdcall as a default calling convention
/help Display available options
/hotpatch Create hotpatchable image
/imsvc <dir> Add <dir> to system include search path, as if in %INCLUDE%
/I <dir> Add directory to include search path
/JMC- Disable just-my-code debugging (default)
/JMC Enable just-my-code debugging
/J Make char type unsigned
/LDd Create debug DLL
/LD Create DLL
/link <options> Forward options to the linker
/MDd Use DLL debug run-time
/MD Use DLL run-time
/MTd Use static debug run-time
/MT Use static run-time
/O1 Optimize for size (like /Og /Os /Oy /Ob2 /GF /Gy)
/O2 Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy)
/Ob0 Disable function inlining
/Ob1 Only inline functions explicitly or implicitly marked inline
/Ob2 Inline functions as deemed beneficial by the compiler
/Ob3 Same as /Ob2
/Od Disable optimization
/Og No effect
/Oi- Disable use of builtin functions
/Oi Enable use of builtin functions
/openmp- Disable OpenMP support
/openmp:experimental Enable OpenMP support with experimental SIMD support
/openmp Enable OpenMP support
/Os Optimize for size (like clang -Os)
/Ot Optimize for speed (like clang -O3)
/Ox Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2
/Oy- Disable frame pointer omission (x86 only, default)
/Oy Enable frame pointer omission (x86 only)
/O<flags> Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'
/o <file or dir/> Deprecated (set output file name); use /Fe or /Fe
/permissive- Disable non conforming code from compiling (default)
/permissive Enable some non conforming code to compile
/P Preprocess to file
/Qgather- Disable generation of gather instructions in auto-vectorization(x86 only)
/QIntel-jcc-erratum Align branches within 32-byte boundaries to mitigate the performance impact of the Intel JCC erratum.
/Qscatter- Disable generation of scatter instructions in auto-vectorization(x86 only)
/Qvec- Disable the loop vectorization passes
/Qvec Enable the loop vectorization passes
/showFilenames- Do not print the name of each compiled file (default)
/showFilenames Print the name of each compiled file
/showIncludes:user Like /showIncludes but omit system headers
/showIncludes Print info about included files to stderr
/source-charset:<value> Set source encoding, supports only UTF-8
/std:<value> Set language version (c++14,c++17,c++20,c++23preview,c++latest,c11,c17)
/TC Treat all source files as C
/Tc <file> Treat <file> as C source file
/TP Treat all source files as C++
/Tp <file> Treat <file> as C++ source file
/tune:<value> Set CPU for optimization without affecting instruction set
/utf-8 Set source and runtime encoding to UTF-8 (default)
/U <macro> Undefine macro
/vctoolsdir <dir> Path to the VCToolChain
/vctoolsversion <value> For use with /winsysroot, defaults to newest found
/vd<value> Control vtordisp placement
/vmb Use a best-case representation method for member pointers
/vmg Use a most-general representation for member pointers
/vmm Set the default most-general representation to multiple inheritance
/vms Set the default most-general representation to single inheritance
/vmv Set the default most-general representation to virtual inheritance
/W0 Disable all warnings
/W1 Enable -Wall
/W2 Enable -Wall
/W3 Enable -Wall
/W4 Enable -Wall and -Wextra
/Wall Enable -Weverything
/winsdkdir <dir> Path to the Windows SDK
/winsdkversion <value> Full version of the Windows SDK, defaults to newest found
/winsysroot <dir> Same as "/diasdkdir <dir>/DIA SDK" /vctoolsdir <dir>/VC/Tools/MSVC/<vctoolsversion> "/winsdkdir <dir>/Windows Kits/10"
/WX- Do not treat warnings as errors (default)
/WX Treat warnings as errors
/w Disable all warnings
/X Do not add %INCLUDE% to include search path
/Y- Disable precompiled headers, overrides /Yc and /Yu
/Yc<filename> Generate a pch file for all code up to and including <filename>
/Yu<filename> Load a pch file and use it instead of all code up to and including <filename>
/Z7 Enable CodeView debug information in object files
/Zc:__STDC__ Define __STDC__
/Zc:alignedNew- Disable C++17 aligned allocation functions
/Zc:alignedNew Enable C++17 aligned allocation functions
/Zc:char8_t- Disable char8_t from c++2a
/Zc:char8_t Enable char8_t from C++2a
/Zc:dllexportInlines- Do not dllexport/dllimport inline member functions of dllexport/import classes
/Zc:dllexportInlines dllexport/dllimport inline member functions of dllexport/import classes (default)
/Zc:sizedDealloc- Disable C++14 sized global deallocation functions
/Zc:sizedDealloc Enable C++14 sized global deallocation functions
/Zc:strictStrings Treat string literals as const
/Zc:threadSafeInit- Disable thread-safe initialization of static variables
/Zc:threadSafeInit Enable thread-safe initialization of static variables
/Zc:tlsGuards- Disable on-demand initialization of thread-local variables
/Zc:tlsGuards Enable on-demand initialization of thread-local variables
/Zc:trigraphs- Disable trigraphs (default)
/Zc:trigraphs Enable trigraphs
/Zc:twoPhase- Disable two-phase name lookup in templates (default)
/Zc:twoPhase Enable two-phase name lookup in templates
/Zc:wchar_t- Disable C++ builtin type wchar_t
/Zc:wchar_t Enable C++ builtin type wchar_t (default)
/ZH:MD5 Use MD5 for file checksums in debug info (default)
/ZH:SHA1 Use SHA1 for file checksums in debug info
/ZH:SHA_256 Use SHA256 for file checksums in debug info
/Zi Like /Z7
/Zl Do not let object file auto-link default libraries
/Zp Set default maximum struct packing alignment to 1
/Zp<value> Set default maximum struct packing alignment
/Zs Run the preprocessor, parser and semantic analysis stages
OPTIONS:
-### Print (but do not run) the commands to run for this compilation
--analyze Run the static analyzer
--config=<file> Specify configuration file
--cuda-compile-host-device
Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
--cuda-device-only Compile CUDA code for device only
--cuda-feature=<value> Manually specify the CUDA feature to use
--cuda-host-only Compile CUDA code for host only. Has no effect on non-CUDA compilations.
--cuda-include-ptx=<value>
Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.
--cuda-noopt-device-debug
Enable device-side debug info generation. Disables ptxas optimizations.
--cuda-path-ignore-env Ignore environment variables to detect CUDA installation
--cuda-path=<value> CUDA installation path
-cuid=<value> An ID for compilation unit, which should be the same for the same compilation unit but different for different compilation units. It is used to externalize device-side static variables for single source offloading languages CUDA and HIP so that they can be accessed by the host code of the same compilation unit.
-darwin-target-variant <value>
Generate code for an additional runtime variant of the deployment target
-emit-ast Emit Clang AST files for source inputs
--end-no-unused-arguments
Start emitting warnings for unused driver arguments
-faddrsig Emit an address-significance table
-fansi-escape-codes Use ANSI escape codes for diagnostics
-fblocks Enable the 'blocks' language feature
-fcaret-diagnostics-max-lines=<value>
Set the maximum number of source lines to show in a caret diagnostic (0 = no limit).
-fcf-protection=<value> Instrument control-flow architecture protection
-fcf-protection Enable cf-protection in 'full' mode
-fcodegen-data-generate=<path>
Emit codegen data into the object file. LLD for MachO (currently) merges them into the specified <path>.
-fcodegen-data-generate Emit codegen data into the object file. LLD for MachO (currently) merges them into default.cgdata.
-fcodegen-data-use=<path>
Use codegen data read from the specified <path>.
-fcodegen-data-use Use codegen data read from default.cgdata to optimize the binary
-fcolor-diagnostics Enable colors in diagnostics
-fcommon Place uninitialized global variables in a common block
-fcomplete-member-pointers
Require member pointer base types to be complete if they would be significant under the Microsoft ABI
-fcoverage-compilation-dir=<value>
The compilation directory to embed in the coverage mapping.
-fcoverage-mapping Generate coverage mapping to enable code coverage analysis
-fcoverage-mcdc Enable MC/DC criteria when generating code coverage
-fcrash-diagnostics-dir=<dir>
Put crash-report files in <dir>
-fcrash-diagnostics=<value>
Set level of crash diagnostic reporting, (option: off, compiler, all)
-fcrash-diagnostics Enable crash diagnostic reporting (default)
-fcs-profile-generate=<directory>
Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)
-fcs-profile-generate Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)
-fcuda-short-ptr Use 32-bit pointers for accessing const/local/shared address spaces
-fdebug-compilation-dir=<value>
The compilation directory to embed in the debug info
-fdebug-macro Emit macro debug information
-fdelayed-template-parsing
Parse templated function definitions at the end of the translation unit
-fdelete-null-pointer-checks
Treat usage of null pointers as undefined behavior (default)
-fdepscan=<value> Scan for dependencies ahead of compiling, generating a pruned CAS tree to send to -fcas-fs. Values are 'auto', 'daemon' (see -fdepscan-share and -fdepscan-share-parent), 'inline', or 'off' (default).
-fdiagnostics-absolute-paths
Print absolute paths in diagnostics
-fdiagnostics-color=<value>
When to use colors in diagnostics
-fdiagnostics-parseable-fixits
Print fix-its in machine parseable form
-fdriver-only Only run the driver.
-feliminate-unused-debug-types
Do not emit debug info for defined but unused types
-fexcess-precision=<value>
Allows control over excess precision on targets where native support for the precision types is not available. By default, excess precision is used to calculate intermediate results following the rules specified in ISO C99.
-fexperimental-library Control whether unstable and experimental library features are enabled. This option enables various library features that are either experimental (also known as TSes), or have been but are not stable yet in the selected Standard Library implementation. It is not recommended to use this option in production code, since neither ABI nor API stability are guaranteed. This is intended to provide a preview of features that will ship in the future for experimentation purposes
-fexperimental-sanitize-metadata-ignorelist=<value>
Disable sanitizer metadata for modules and functions that match the provided special case list
-fexperimental-sanitize-metadata=<value>
Specify the type of metadata to emit for binary analysis sanitizers
-ffile-compilation-dir=<value>
The compilation directory to embed in the debug info and coverage mapping.
-ffile-reproducible Use the target's platform-specific path separator character when expanding the __FILE__ macro
-ffixed-x10 Reserve the x10 register (AArch64/RISC-V only)
-ffixed-x11 Reserve the x11 register (AArch64/RISC-V only)
-ffixed-x12 Reserve the x12 register (AArch64/RISC-V only)
-ffixed-x13 Reserve the x13 register (AArch64/RISC-V only)
-ffixed-x14 Reserve the x14 register (AArch64/RISC-V only)
-ffixed-x15 Reserve the x15 register (AArch64/RISC-V only)
-ffixed-x16 Reserve the x16 register (AArch64/RISC-V only)
-ffixed-x17 Reserve the x17 register (AArch64/RISC-V only)
-ffixed-x18 Reserve the x18 register (AArch64/RISC-V only)
-ffixed-x19 Reserve the x19 register (AArch64/RISC-V only)
-ffixed-x1 Reserve the x1 register (AArch64/RISC-V only)
-ffixed-x20 Reserve the x20 register (AArch64/RISC-V only)
-ffixed-x21 Reserve the x21 register (AArch64/RISC-V only)
-ffixed-x22 Reserve the x22 register (AArch64/RISC-V only)
-ffixed-x23 Reserve the x23 register (AArch64/RISC-V only)
-ffixed-x24 Reserve the x24 register (AArch64/RISC-V only)
-ffixed-x25 Reserve the x25 register (AArch64/RISC-V only)
-ffixed-x26 Reserve the x26 register (AArch64/RISC-V only)
-ffixed-x27 Reserve the x27 register (AArch64/RISC-V only)
-ffixed-x28 Reserve the x28 register (AArch64/RISC-V only)
-ffixed-x29 Reserve the x29 register (AArch64/RISC-V only)
-ffixed-x2 Reserve the x2 register (AArch64/RISC-V only)
-ffixed-x30 Reserve the x30 register (AArch64/RISC-V only)
-ffixed-x31 Reserve the x31 register (AArch64/RISC-V only)
-ffixed-x3 Reserve the x3 register (AArch64/RISC-V only)
-ffixed-x4 Reserve the x4 register (AArch64/RISC-V only)
-ffixed-x5 Reserve the x5 register (AArch64/RISC-V only)
-ffixed-x6 Reserve the x6 register (AArch64/RISC-V only)
-ffixed-x7 Reserve the x7 register (AArch64/RISC-V only)
-ffixed-x8 Reserve the x8 register (AArch64/RISC-V only)
-ffixed-x9 Reserve the x9 register (AArch64/RISC-V only)
-fforce-emit-vtables Emits more virtual tables to improve devirtualization
-ffuchsia-api-level=<value>
Set Fuchsia API level
-fgnuc-version=<value> Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)
-fgpu-allow-device-init Allow device side init function in HIP (experimental)
-fgpu-default-stream=<value>
Specify default stream. The default value is 'legacy'. (CUDA/HIP only)
-fgpu-defer-diag Defer host/device related diagnostic messages for CUDA/HIP
-fgpu-flush-denormals-to-zero
Flush denormal floating point values to zero in CUDA/HIP device mode.
-fgpu-rdc Generate relocatable device code, also known as separate compilation mode
-fgpu-sanitize Enable sanitizer for supported offloading devices
-fhip-emit-relocatable Compile HIP source to relocatable
-fhip-fp32-correctly-rounded-divide-sqrt
Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded (HIP device compilation only)
-fhip-kernel-arg-name Specify that kernel argument names are preserved (HIP only)
-fhip-new-launch-api Use new kernel launching API for HIP
-fimplicit-module-maps Implicitly search the file system for module map files.
-fimplicit-modules-lock-timeout=<seconds>
Time to wait on an implicit module lock before timing out
-finline-max-stacksize=<value>
Suppress inlining of functions whose stack size exceeds the given value
-fintegrated-cc1 Run cc1 in-process
-fintegrated-objemitter Use internal machine object code emitter.
-flto=<value> Set LTO mode
-flto Enable LTO in 'full' mode
-fmacro-backtrace-limit=<value>
Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit)
-fmemory-profile-use=<pathname>
Use memory profile for profile-guided memory optimization
-fmerge-all-constants Allow merging of constants
-fmodule-file=[<name>=]<file>
Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.
-fmodule-header=<kind> Build a C++20 Header Unit from a header that should be found in the user (fmodule-header=user) or system (fmodule-header=system) search path.
-fmodule-header Build a C++20 Header Unit from a header
-fmodule-map-file=<file>
Load this module map file
-fmodule-name=<name> Specify the name of the module to build
-fmodule-output=<value> Save intermediate module file results when compiling a standard C++ module unit.
-fmodule-output Save intermediate module file results when compiling a standard C++ module unit.
-fmodules-decluse Require declaration of modules used within a module
-fmodules-embed-all-files<value>
Embed the contents of all files read by this compilation into the produced module file.
-fmodules-ignore-macro=<value>
Ignore the definition of the given macro when building and loading modules
-fmodules-search-all Search even non-imported modules to resolve references
-fmodules-strict-decluse
Like -fmodules-decluse but requires all headers to be in modules
-fmodules Enable the 'modules' language feature
-fms-compatibility-version=<value>
Dot-separated value representing the Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))
-fms-compatibility Enable full Microsoft Visual C++ compatibility
-fms-define-stdc Define '__STDC__' to '1' in MSVC Compatibility mode
-fms-extensions Accept some non-standard constructs supported by the Microsoft compiler
-fms-hotpatch Ensure that all functions can be hotpatched at runtime
-fms-runtime-lib=<value>
Select Windows run-time library
-fms-secure-hotpatch-functions-file=<value>
Path to a file that contains a list of mangled names of functions that should be hot-patched for Windows Secure Hot-Patching
-fms-secure-hotpatch-functions-list=<value>
List of mangled symbol names of functions that should be hot-patched for Windows Secure Hot-Patching
-fmsc-version=<value> Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))
-fno-addrsig Don't emit an address-significance table
-fno-assume-unique-vtables
Disable optimizations based on vtable pointer identity
-fno-builtin-<value> Disable implicit builtin knowledge of a specific function
-fno-builtin Disable implicit builtin knowledge of functions
-fno-color-diagnostics Disable colors in diagnostics
-fno-complete-member-pointers
Do not require member pointer base types to be complete if they would be significant under the Microsoft ABI
-fno-coverage-mapping Disable code coverage analysis
-fno-coverage-mcdc Disable MC/DC coverage criteria
-fno-crash-diagnostics Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
-fno-debug-macro Do not emit macro debug information
-fno-delayed-template-parsing
Disable delayed template parsing
-fno-delete-null-pointer-checks
Do not treat usage of null pointers as undefined behavior
-fno-eliminate-unused-debug-types
Emit debug info for defined but unused types
-fno-experimental-sanitize-metadata=<value>
Disable emitting metadata for binary analysis sanitizers
-fno-file-reproducible Use the host's platform-specific path separator character when expanding the __FILE__ macro
-fno-gpu-allow-device-init
Don't allow device side init function in HIP (experimental)
-fno-gpu-defer-diag Don't defer host/device related diagnostic messages for CUDA/HIP
-fno-hip-emit-relocatable
Do not override toolchain to compile HIP source to relocatable
-fno-hip-fp32-correctly-rounded-divide-sqrt
Don't specify that single precision floating-point divide and sqrt used in the program source are correctly rounded (HIP device compilation only)
-fno-hip-kernel-arg-name
Don't specify that kernel argument names are preserved (HIP only)
-fno-hip-new-launch-api Don't use new kernel launching API for HIP
-fno-integrated-cc1 Spawn a separate process for each cc1
-fno-integrated-objemitter
Use external machine object code emitter.
-fno-knr-functions Disable support for K&R C function declarations
-fno-lto Disable LTO mode (default)
-fno-offload-lto Disable LTO mode (default) for offload compilation
-fno-offload-via-llvm Don't use LLVM/Offload as portable offloading runtime.
-fno-profile-generate Disable generation of profile instrumentation.
-fno-profile-instr-generate
Disable generation of profile instrumentation.
-fno-profile-instr-use Disable using instrumentation data for profile-guided optimization
-fno-rtlib-defaultlib On Windows, do not emit /defaultlib: directives to link compiler-rt libraries
-fno-sanitize-address-globals-dead-stripping
Disable linker dead stripping of globals in AddressSanitizer
-fno-sanitize-address-outline-instrumentation
Use default code inlining logic for the address sanitizer
-fno-sanitize-address-poison-custom-array-cookie
Disable poisoning array cookies when using custom operator new[] in AddressSanitizer
-fno-sanitize-address-use-after-scope
Disable use-after-scope detection in AddressSanitizer
-fno-sanitize-address-use-odr-indicator
Disable ODR indicator globals
-fno-sanitize-annotate-debug-info=<value>
Do not allow compiler to annotate sanitizer instrumentation with extra debug info for the specified sanitizers
-fno-sanitize-annotate-debug-info
Do not allow compiler to annotate sanitizer instrumentation with extra debug info for any sanitizers
-fno-sanitize-cfi-canonical-jump-tables
Do not make the jump table addresses canonical in the symbol table
-fno-sanitize-cfi-cross-dso
Disable control flow integrity (CFI) checks for cross-DSO calls.
-fno-sanitize-coverage=<value>
Disable features of coverage instrumentation for Sanitizers
-fno-sanitize-debug-trap-reasons
Alias for -fsanitize-debug-trap-reasons=none
-fno-sanitize-hwaddress-experimental-aliasing
Disable aliasing mode in HWAddressSanitizer
-fno-sanitize-ignorelist
Don't use ignorelist file for sanitizers
-fno-sanitize-memory-param-retval
Disable detection of uninitialized parameters and return values
-fno-sanitize-memory-track-origins
Disable origins tracking in MemorySanitizer
-fno-sanitize-memory-use-after-dtor
Disable use-after-destroy detection in MemorySanitizer
-fno-sanitize-merge=<value>
Do not allow compiler to merge handlers for specified sanitizers
-fno-sanitize-merge Do not allow compiler to merge handlers for any sanitizers
-fno-sanitize-recover=<value>
Disable recovery for specified sanitizers
-fno-sanitize-stable-abi
Conventional ABI instrumentation for sanitizer runtime. Default: Conventional
-fno-sanitize-stats Disable sanitizer statistics gathering.
-fno-sanitize-thread-atomics
Disable atomic operations instrumentation in ThreadSanitizer
-fno-sanitize-thread-func-entry-exit
Disable function entry/exit instrumentation in ThreadSanitizer
-fno-sanitize-thread-memory-access
Disable memory access instrumentation in ThreadSanitizer
-fno-sanitize-trap=<value>
Disable trapping for specified sanitizers
-fno-sanitize-trap Disable trapping for all sanitizers
-fno-standalone-debug Limit debug information produced to reduce size of debug binary
-fno-strict-aliasing Disable optimizations based on strict aliasing rules
-fno-sycl Disable SYCL C++ extensions
-fno-temp-file Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes
-fno-verify-intermediate-code
Disable verification of LLVM IR
-fobjc-runtime=<value> Specify the target Objective-C runtime kind and version
-foffload-implicit-host-device-templates
Template functions or specializations without host, device and global attributes have implicit host device attributes (CUDA/HIP only)
-foffload-lto=<value> Set LTO mode for offload compilation
-foffload-lto Enable LTO in 'full' mode for offload compilation
-foffload-via-llvm Use LLVM/Offload as portable offloading runtime.
-fopenmp-target-jit Emit code that can be JIT compiled for OpenMP offloading. Implies -foffload-lto=full
-fpch-instantiate-templates
Instantiate templates already while building a PCH
-fprebuilt-module-path=<directory>
Specify the prebuilt module path
-fprofile-exclude-files=<value>
Instrument only functions from files where names don't match all the regexes separated by a semi-colon
-fprofile-filter-files=<value>
Instrument only functions from files where names match any regex separated by a semi-colon
-fprofile-generate-cold-function-coverage=<directory>
Generate instrumented code to collect coverage info for cold functions into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)
-fprofile-generate-cold-function-coverage
Generate instrumented code to collect coverage info for cold functions into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)
-fprofile-generate=<directory>
Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)
-fprofile-generate Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)
-fprofile-instr-generate=<file>
Generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var)
-fprofile-instr-generate
Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)
-fprofile-instr-use=<value>
Use instrumentation data for profile-guided optimization
-fprofile-list=<value> Filename defining the list of functions/files to instrument. The file uses the sanitizer special case list format.
-fprofile-remapping-file=<file>
Use the remappings described in <file> to match the profile data against names in the program
-fprofile-sample-use=<value>
Enable sample-based profile guided optimizations
-fprofile-update=<method>
Set update method of profile counters
-fprofile-use=<pathname>
Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
-fprotect-parens Determines whether the optimizer honors parentheses when floating-point expressions are evaluated
-frtlib-defaultlib On Windows, emit /defaultlib: directives to link compiler-rt libraries (default)
-fsanitize-address-destructor=<value>
Set the kind of module destructors emitted by AddressSanitizer instrumentation. These destructors are emitted to unregister instrumented global variables when code is unloaded (e.g. via `dlclose()`).
-fsanitize-address-field-padding=<value>
Level of field padding for AddressSanitizer
-fsanitize-address-globals-dead-stripping
Enable linker dead stripping of globals in AddressSanitizer
-fsanitize-address-outline-instrumentation
Always generate function calls for address sanitizer instrumentation
-fsanitize-address-poison-custom-array-cookie
Enable poisoning array cookies when using custom operator new[] in AddressSanitizer
-fsanitize-address-use-after-return=<mode>
Select the mode of detecting stack use-after-return in AddressSanitizer
-fsanitize-address-use-after-scope
Enable use-after-scope detection in AddressSanitizer
-fsanitize-address-use-odr-indicator
Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized programs at the cost of an increase in binary size
-fsanitize-annotate-debug-info=<value>
Annotate sanitizer instrumentation with extra debug info for the specified sanitizers, if supported
-fsanitize-annotate-debug-info
Allow compiler to annotate sanitizer instrumentation with extra debug info for all sanitizers, where supported
-fsanitize-cfi-canonical-jump-tables
Make the jump table addresses canonical in the symbol table
-fsanitize-cfi-cross-dso
Enable control flow integrity (CFI) checks for cross-DSO calls.
-fsanitize-cfi-icall-experimental-normalize-integers
Normalize integers in CFI indirect call type signature checks
-fsanitize-cfi-icall-generalize-pointers
Generalize pointers in CFI indirect call type signature checks
-fsanitize-coverage-allowlist=<value>
Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones
-fsanitize-coverage-ignorelist=<value>
Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones
-fsanitize-coverage-stack-depth-callback-min=<M>
Use callback for max stack depth tracing with minimum stack depth M
-fsanitize-coverage=<value>
Specify the type of coverage instrumentation for Sanitizers
-fsanitize-debug-trap-reasons=<value>
Set how trap reasons are emitted. `none` - Not emitted. This gives the smallest debug info; `basic` - Emit a fixed trap message per check type. This increases the debug info size but not as much as `detailed`; `detailed` - Emit a more detailed trap message. This increases the debug info size the most. Default is `detailed`.
-fsanitize-debug-trap-reasons
Alias for -fsanitize-debug-trap-reasons=detailed
-fsanitize-hwaddress-abi=<value>
Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused.
-fsanitize-hwaddress-experimental-aliasing
Enable aliasing mode in HWAddressSanitizer
-fsanitize-ignorelist=<value>
Path to ignorelist file for sanitizers
-fsanitize-kcfi-arity Embed function arity information into the KCFI patchable function prefix
-fsanitize-memory-param-retval
Enable detection of uninitialized parameters and return values
-fsanitize-memory-track-origins=<value>
Enable origins tracking in MemorySanitizer
-fsanitize-memory-track-origins
Enable origins tracking in MemorySanitizer
-fsanitize-memory-use-after-dtor
Enable use-after-destroy detection in MemorySanitizer
-fsanitize-memtag-mode=<value>
Set default MTE mode to 'sync' (default) or 'async'
-fsanitize-merge=<value>
Allow compiler to merge handlers for specified sanitizers
-fsanitize-merge Allow compiler to merge handlers for all sanitizers
-fsanitize-recover=<value>
Enable recovery for specified sanitizers
-fsanitize-skip-hot-cutoff=<value>
Exclude sanitization for the top hottest code responsible for the given fraction of PGO counters (0.0 [default] = skip none; 1.0 = skip all). Argument format: <sanitizer1>=<value1>,<sanitizer2>=<value2>,...
-fsanitize-stable-abi Stable ABI instrumentation for sanitizer runtime. Default: Conventional
-fsanitize-stats Enable sanitizer statistics gathering.
-fsanitize-system-ignorelist=<value>
Path to system ignorelist file for sanitizers
-fsanitize-thread-atomics
Enable atomic operations instrumentation in ThreadSanitizer (default)
-fsanitize-thread-func-entry-exit
Enable function entry/exit instrumentation in ThreadSanitizer (default)
-fsanitize-thread-memory-access
Enable memory access instrumentation in ThreadSanitizer (default)
-fsanitize-trap=<value> Enable trapping for specified sanitizers
-fsanitize-trap Enable trapping for all sanitizers
-fsanitize-undefined-ignore-overflow-pattern=<value>
Specify the overflow patterns to exclude from arithmetic sanitizer instrumentation
-fsanitize-undefined-strip-path-components=<number>
Strip (or keep only, if negative) a given number of path components when emitting check metadata.
-fsanitize=<check> Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
-fsplit-lto-unit Enables splitting of the LTO unit
-fstandalone-debug Emit full debug info for all types used by the program
-fstrict-aliasing Enable optimizations based on strict aliasing rules
-fswift-async-fp=<option>
Control emission of Swift async extended frame info
-fsycl-device-only Compile SYCL code for device only
-fsycl-host-only Compile SYCL code for host only. Has no effect on non-SYCL compilations
-fsycl Enable SYCL C++ extensions
-fsyntax-only Run the preprocessor, parser and semantic analysis stages
-fsystem-module Build this module as a system module. Only used with -emit-module
-ftemporal-profile Generate instrumented code to collect temporal information
-fthin-link-bitcode=<value>
Write minimized bitcode to <file> for the ThinLTO thin link only
-fthinlto-distributor=<path>
Path to the ThinLTO distributor process. If specified, ThinLTO backend compilations will be distributed by LLD
-fthinlto-index=<value> Perform ThinLTO importing using provided function summary index
-ftime-trace-granularity=<value>
Minimum time granularity (in microseconds) traced by time profiler
-ftime-trace-verbose<value>
Make time trace capture verbose event details (e.g. source filenames). This can increase the size of the output by 2-3 times
-ftime-trace=<value> Similar to -ftime-trace. Specify the JSON file or a directory which will contain the JSON file
-ftime-trace Turn on time profiler. Generates JSON file based on output filename.
-ftrivial-auto-var-init-max-size=<value>
Stop initializing trivial automatic stack variables if var size exceeds the specified number of instances (in bytes)
-ftrivial-auto-var-init-stop-after=<value>
Stop initializing trivial automatic stack variables after the specified number of instances
-ftrivial-auto-var-init=<value>
Initialize trivial automatic stack variables. Defaults to 'uninitialized'
-fuse-cuid=<value> Method to generate ID's for compilation units for single source offloading languages CUDA and HIP: 'hash' (ID's generated by hashing file path and command line options) | 'random' (ID's generated as random numbers) | 'none' (disabled). Default is 'hash'. This option will be overridden by option '-cuid=[ID]' if it is specified.
-fverify-intermediate-code
Enable verification of LLVM IR
-fvirtual-function-elimination
Enables dead virtual function elimination optimization. Requires -flto=full
-fwhole-program-vtables Enables whole-program vtable optimization. Requires -flto
-fwrapv-pointer Treat pointer overflow as two's complement
-fwrapv Treat signed integer overflow as two's complement
-gcodeview-command-line Emit compiler path and command line into CodeView debug information
-gcodeview-ghash Emit type record hashes in a .debug$H section
-gcodeview Generate CodeView debug information
-gdwarf Generate source-level debug information with the default dwarf version
-gen-reproducer=<value> Emit reproducer on (option: off, crash (default), error, always)
-gkey-instructions Enable Key Instructions, which reduces the jumpiness of debug stepping in optimized C/C++ code in some debuggers. DWARF only. Implies -g.
-gline-directives-only Emit debug line info directives only
-gline-tables-only Emit debug line number tables only
-gno-codeview-command-line
Don't emit compiler path and command line into CodeView debug information
-gno-inline-line-tables Don't emit inline line tables.
--gpu-bundle-output Bundle output files of HIP device compilation
--gpu-instrument-lib=<value>
Instrument device library for HIP, which is a LLVM bitcode containing __cyg_profile_func_enter and __cyg_profile_func_exit
--gpu-max-threads-per-block=<value>
Default max threads per block for kernel launch bounds for HIP
-gsplit-dwarf=<value> Set DWARF fission mode
-gstrict-dwarf Restrict DWARF features to those defined in the specified version, avoiding features from later versions.
-gstructor-decl-linkage-names
Attach linkage names to C++ constructor/destructor declarations in DWARF.Implies -g.
-G <size> Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
-g Generate source-level debug information
--hip-device-lib=<value>
HIP device library
--hip-link Link clang-offload-bundler bundles for HIP
--hip-path=<value> HIP runtime installation path, used for finding HIP version and adding HIP include path.
--hip-version=<value> HIP version in the format of major.minor.patch
--hipspv-pass-plugin=<dsopath>
path to a pass plugin for HIP to SPIR-V passes.
--hipstdpar-interpose-alloc
Replace all memory allocation / deallocation calls with hipManagedMalloc / hipFree equivalents
--hipstdpar-path=<value>
HIP Standard Parallel Algorithm Acceleration library path, used for finding and implicitly including the library header
--hipstdpar-prim-path=<value>
rocPrim path, required by the HIP Standard Parallel Algorithm Acceleration library, used to implicitly include the rocPrim library
--hipstdpar-thrust-path=<value>
rocThrust path, required by the HIP Standard Parallel Algorithm Acceleration library, used to implicitly include the rocThrust library
--hipstdpar Enable HIP acceleration for standard parallel algorithms
-mabi=quadword-atomics Enable quadword atomics ABI on AIX (AIX PPC64 only). Uses lqarx/stqcx. instructions.
-maix-struct-return Return all structs in memory (PPC32 only)
-malign-branch-boundary=<value>
Specify the boundary's size to align branches
-malign-branch=<value> Specify types of branches to align
-malign-double Align doubles to two words in structs (x86 only)
-mamdgpu-ieee Sets the IEEE bit in the expected default floating point mode register. Floating point opcodes that support exception flag gathering quiet and propagate signaling NaN inputs per IEEE 754-2008. This option changes the ABI. (AMDGPU only)
-mamdgpu-precise-memory-op
Enable precise memory mode (AMDGPU only)
-mannotate-tablejump Enable annotate table jump instruction to correlate it with the jump table.
-mapx-features=<value> Enable features of APX
-mapx-inline-asm-use-gpr32
Enable use of GPR32 in inline assembly for APX
-march=<value> For a list of available architectures for the target use '-mcpu=help'
-marm64x<value> Link as a hybrid ARM64X image
-mbackchain Link stack frames through backchain on System Z
-mbranch-protection=<value>
Enforce targets of indirect branches and function returns
-mbranches-within-32B-boundaries
Align selected branches (fused, jcc, jmp) within 32-byte boundary
-mcf-branch-label-scheme=<value>
Select label scheme for branch control-flow architecture protection
-mcode-object-version=<value>
Specify code object ABI version. Defaults to 6. (AMDGPU only)
-mconstructor-aliases Enable emitting complete constructors and destructors as aliases when possible
-mcpu=<value> For a list of available CPUs for the target use '-mcpu=help'
-mcrc Allow use of CRC instructions (ARM/Mips only)
-mdaz-ftz Globally set the denormals-are-zero (DAZ) and flush-to-zero (FTZ) bits in the floating-point control register on program startup
-mdefault-visibility-export-mapping=<value>
Mapping between default visibility and export
-mdiv32 Use div.w[u] and mod.w[u] instructions with input not sign-extended.
-mdouble=<n Force double to be <n> bits
-meabi <value> Set EABI type. Default depends on triple)
-menable-experimental-extensions
Enable use of experimental RISC-V extensions.
-mfentry Insert calls to fentry at function entry (x86/SystemZ only)
-mfrecipe Enable frecipe.{s/d} and frsqrte.{s/d}
-mfunction-return=<value>
Replace returns with jumps to ``__x86_return_thunk`` (x86 only, error otherwise)
-mgeneral-regs-only Generate code which only uses the general purpose registers (AArch64/x86 only)
-mglobal-merge Enable merging of globals
-mguard=<value> Enable or disable Control Flow Guard checks and guard tables emission
-mharden-sls=<value> Select straight-line speculation hardening scope (ARM/AArch64/X86 only). <arg> must be: all, none, retbr(ARM/AArch64), blr(ARM/AArch64), comdat(ARM/AArch64), nocomdat(ARM/AArch64), return(X86), indirect-jmp(X86)
-miamcu Use Intel MCU ABI
-mignore-xcoff-visibility
Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file
-mincremental-linker-compatible
(integrated-as) Emit an object file which can be used with an incremental linker
-mindirect-branch-cs-prefix
Add cs prefix to call and jmp to indirect thunk
-mios-version-min=<value>
Set iOS deployment target
-mlam-bh Enable amswap[_db].{b/h} and amadd[_db].{b/h}
-mlamcas Enable amcas[_db].{b/h/w/d}
-mlasx Enable Loongson Advanced SIMD Extension (LASX).
-mld-seq-sa Do not generate same-address load-load barrier instructions (dbar 0x700)
-mlink-builtin-bitcode-postopt
Link builtin bitcodes after the optimization pipeline
-mllvm=<arg> Alias for -mllvm
-mllvm <value> Additional arguments to forward to LLVM's option processing
-mlong-calls Generate branches with extended addressability, usually via indirect jumps.
-mlsx Enable Loongson SIMD Extension (LSX).
-mlvi-cfi Enable only control-flow mitigations for Load Value Injection (LVI)
-mlvi-hardening Enable all mitigations for Load Value Injection (LVI)
-mmacos-version-min=<value>
Set macOS deployment target
-mms-bitfields Set the default structure layout to be compatible with the Microsoft compiler standard
-mno-amdgpu-precise-memory-op
Disable precise memory mode (AMDGPU only)
-mno-annotate-tablejump Disable annotate table jump instruction to correlate it with the jump table.
-mno-apx-features=<value>
Disable features of APX
-mno-constructor-aliases
Disable emitting complete constructors and destructors as aliases when possible
-mno-daz-ftz Do not globally set the denormals-are-zero (DAZ) and flush-to-zero (FTZ) bits in the floating-point control register on program startup
-mno-div32 Do not use div.w[u] and mod.w[u] instructions with input not sign-extended.
-mno-frecipe Disable frecipe.{s/d} and frsqrte.{s/d}
-mno-gather Disable generation of gather instructions in auto-vectorization(x86 only)
-mno-global-merge Disable merging of globals
-mno-implicit-float Don't generate implicit floating point or vector instructions
-mno-incremental-linker-compatible
(integrated-as) Emit an object file which cannot be used with an incremental linker
-mno-lam-bh Disable amswap[_db].{b/h} and amadd[_db].{b/h}
-mno-lamcas Disable amcas[_db].{b/h/w/d}
-mno-lasx Disable Loongson Advanced SIMD Extension (LASX).
-mno-ld-seq-sa Generate same-address load-load barrier instructions (dbar 0x700)
-mno-long-calls Restore the default behaviour of not generating long calls
-mno-lsx Disable Loongson SIMD Extension (LSX).
-mno-lvi-cfi Disable control-flow mitigations for Load Value Injection (LVI)
-mno-lvi-hardening Disable mitigations for Load Value Injection (LVI)
-mno-ms-bitfields Do not set the default structure layout to be compatible with the Microsoft compiler standard
-mno-pic-data-is-text-relative
Don't assume data segments are relative to text segment
-mno-regnames Use only register numbers when writing assembly output
-mno-relax Disable linker relaxation
-mno-scalar-strict-align
Allow scalar memory accesses to be unaligned (RISC-V only)
-mno-scatter Disable generation of scatter instructions in auto-vectorization(x86 only)
-mno-scq Disable sc.q instruction.
-mno-seses Disable speculative execution side effect suppression (SESES)
-mno-stack-arg-probe Disable stack probes which are enabled by default
-mno-strict-align Allow memory accesses to be unaligned (AArch64/LoongArch/RISC-V only)
-mno-tls-direct-seg-refs
Disable direct TLS access through segment registers
-mno-tocdata=<value> Specifies a list of variables to be exempt from the TOC data transformation.
-mno-tocdata This is the default. TOC data transformation is not applied to any variables. Only variables specified explicitly in -mtocdata= will have the TOC data transformation.
-mno-unaligned-access Force all memory accesses to be aligned (AArch32/MIPSr6 only)
-mno-unaligned-symbols Expect external char-aligned symbols to be without ABI alignment (SystemZ only)
-mno-vector-strict-align
Allow vector memory accesses to be unaligned (RISC-V only)
-mno-wavefrontsize64 Specify wavefront size 32 mode (AMDGPU only)
-mnop-mcount Generate mcount/__fentry__ calls as nops. To activate they need to be patched in.
-momit-leaf-frame-pointer
Omit frame pointer setup for leaf functions
-mpacked-stack Use packed stack layout (SystemZ only).
-mpad-max-prefix-size=<value>
Specify maximum number of prefixes to use for padding
-mpic-data-is-text-relative
Assume data segments are relative to text segment
-mprefer-vector-width=<value>
Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.
-mprintf-kind=<value> Specify the printf lowering scheme (AMDGPU only), allowed values are "hostcall"(printing happens during kernel execution, this scheme relies on hostcalls which require system to support pcie atomics) and "buffered"(printing happens after all kernel threads exit, this uses a printf buffer and does not rely on pcie atomic support)
-mqdsp6-compat Enable hexagon-qdsp6 backward compatibility
-mrecip=<value> Control use of approximate reciprocal and reciprocal square root instructions followed by <n> iterations of Newton-Raphson refinement. <value> = ( ['!'] ['vec-'] ('rcp'|'sqrt') [('h'|'s'|'d')] [':'<n>] ) | 'all' | 'default' | 'none'
-mrecip Equivalent to '-mrecip=all'
-mrecord-mcount Generate a __mcount_loc section entry for each __fentry__ call.
-mregnames Use full register names when writing assembly output
-mrelax-all (integrated-as) Relax all machine instructions
-mrelax Enable linker relaxation
-mrtd Make StdCall calling convention the default
-mrvv-vector-bits=<value>
Specify the size in bits of an RVV vector register
-msave-reg-params Save arguments passed by registers to ABI-defined stack positions
-mscalar-strict-align Force all scalar memory accesses to be aligned (RISC-V only)
-mscq Enable sc.q instruction.
-mseses Enable speculative execution side effect suppression (SESES). Includes LVI control flow integrity mitigations
-msign-return-address=<value>
Select return address signing scope
-msimd=<value> Select the SIMD extension(s) to be enabled in LoongArch either 'none', 'lsx', 'lasx'.
-mskip-rax-setup Skip setting up RAX register when passing variable arguments (x86 only)
-msmall-data-limit=<value>
Put global and static data smaller than the limit into a special section
-msoft-float Use software floating point
-msse2avx Specify that the assembler should encode SSE instructions with VEX prefix
-mstack-alignment=<value>
Set the stack alignment
-mstack-arg-probe Enable stack probes
-mstack-probe-size=<value>
Set the stack probe size
-mstack-protector-guard-offset=<value>
Use the given offset for addressing the stack-protector guard
-mstack-protector-guard-reg=<value>
Use the given reg for addressing the stack-protector guard
-mstack-protector-guard-symbol=<value>
Use the given symbol for addressing the stack-protector guard
-mstack-protector-guard=<value>
Use the given guard (global, tls) for addressing the stack-protector guard
-mstackrealign Force realign the stack at entry to every function
-mstrict-align Force all memory accesses to be aligned (AArch64/LoongArch/RISC-V only)
-msvr4-struct-return Return small structs in registers (PPC32 only)
-mtargetos=<value> Set the deployment target to be the specified OS and OS version
-mthread-model <value> The thread model to use. Defaults to 'posix')
-mtls-dialect=<value> Which thread-local storage dialect to use for dynamic accesses of TLS variables
-mtls-direct-seg-refs Enable direct TLS access through segment registers (default)
-mtls-size=<value> Specify bit size of immediate TLS offsets (AArch64 ELF only): 12 (for 4KB) | 24 (for 16MB, default) | 32 (for 4GB) | 48 (for 256TB, needs -mcmodel=large)
-mtocdata=<value> Specifies a list of variables to which the TOC data transformation will be applied.
-mtocdata All suitable variables will have the TOC data transformation applied
-mtune=<value> Only supported on AArch64, PowerPC, RISC-V, SPARC, SystemZ, and X86
-munaligned-access Allow memory accesses to be unaligned (AArch32/MIPSr6 only)
-munaligned-symbols Expect external char-aligned symbols to be without ABI alignment (SystemZ only)
-mvector-strict-align Force all vector memory accesses to be aligned (RISC-V only)
-mwavefrontsize64 Specify wavefront size 64 mode (AMDGPU only)
-mxcoff-roptr Place constant objects with relocatable address values in the RO data section and add -bforceimprw to the linker flags (AIX only)
-mzos-target=<value> Set the z/OS release of the runtime environment
--no-cuda-include-ptx=<value>
Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.
--no-cuda-version-check Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
--no-default-config Disable loading default configuration files
--no-gpu-bundle-output Do not bundle output files of HIP device compilation
-no-hip-rt Do not link against HIP runtime libraries
--no-offload-arch=<value>
Remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. 'all' resets the list to its default value.
--no-offload-new-driver Don't Use the new driver for offloading compilation.
--no-wasm-opt Disable the wasm-opt optimizer
-nobuiltininc Disable builtin #include directories only
-nostdinc Disable both standard system #include directories and builtin #include directories
-object-file-name=<file>
Set the output <file> for debug infos
--offload-arch-tool=<value>
Tool used for detecting offloading architectures in the system.
--offload-arch=<value> Specify an offloading device architecture for CUDA, HIP, or OpenMP. (e.g. sm_35). If 'native' is used the compiler will detect locally installed architectures. For HIP offloading, the device architecture can be followed by target ID features delimited by a colon (e.g. gfx908:xnack+:sramecc-). May be specified more than once.
--offload-compress Compress offload device binaries (HIP only)
--offload-device-only Only compile for the offloading device.
--offload-host-device Compile for both the offloading host and device (default).
--offload-host-only Only compile for the offloading host.
--offload-jobs=<value> Specify the number of threads to use for device offloading tasks during compilation.
--offload-new-driver Use the new driver for offloading compilation.
--offload-targets=<value>
Specify a list of target architectures to use for offloading.
--precompile Only precompile the input
-print-diagnostic-options
Print all of Clang's warning options
-print-effective-triple Print the effective target triple
-print-enabled-extensions
Print the extensions enabled by the given target and -march/-mcpu options. (AArch64 and RISC-V only)
-print-file-name=<file> Print the full library path of <file>
-print-libgcc-file-name Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang_rt.builtins.*.a")
-print-library-module-manifest-path
Print the path for the C++ Standard library module manifest
-print-prog-name=<name> Print the full program path of <name>
-print-resource-dir Print the resource directory pathname
-print-rocm-search-dirs Print the paths used for finding ROCm installation
-print-runtime-dir Print the directory pathname containing Clang's runtime libraries
-print-search-dirs Print the paths used for finding libraries and programs
-print-supported-cpus Print supported cpu models for the given target (if target is not specified,it will print the supported cpus for the default target)
-print-supported-extensions
Print supported -march extensions (RISC-V, AArch64 and ARM only)
-print-target-triple Print the normalized target triple
-print-targets Print the registered targets
--ptxas-path=<value> Path to ptxas (used for compiling CUDA code)
-Qunused-arguments Don't emit warning for unused driver arguments
-regcall4 Set __regcall4 as a default calling convention to respect __regcall ABI v.4
--rocm-device-lib-path=<value>
ROCm device library path. Alternative to rocm-path.
--rocm-path=<value> ROCm installation path, used for finding and automatically linking required bitcode libraries.
-rtlib=<value> Compiler runtime library to use
--start-no-unused-arguments
Don't emit warnings about unused arguments for the following arguments
-sycl-std=<value> SYCL language standard to compile for.
--target=<value> Generate code for the given target
--version Print version information
-vfsoverlay <value> Overlay the virtual filesystem described by file over the real file system. Additionally, pass this overlay file to the linker if it supports it
/volatile:iso Volatile loads and stores have standard semantics
/volatile:ms Volatile loads and stores have acquire and release semantics
-v Show commands to run and use verbose output
--warning-suppression-mappings=<value>
File containing diagnostic suppression mappings. See user manual for file format.
--wasm-opt Enable the wasm-opt optimizer (default)
-W<warning> Enable the specified warning
-Xclang=<arg> Alias for -Xclang
-Xclangas=<arg> Alias for -Xclangas
-Xclangas <arg> Pass <arg> to clang -cc1as
-Xclang <arg> Pass <arg> to clang -cc1
-Xcuda-ptxas <arg> Pass <arg> to the ptxas assembler
-Xflang <arg> Pass <arg> to the flang compiler
-Xlinker <arg> Pass <arg> to the linker
-Xthinlto-distributor=<arg>
Pass <arg> to the ThinLTO distributor process. Can be specified multiple times or with comma-separated values.
-x <language> Treat subsequent input files as having type <language>
Options (467)
| Option | Description | Source |
|---|---|---|
-### | Print (but do not run) the commands to run for this compilation | help |
--analyze | Run the static analyzer | help |
--config file | Specify configuration file | help |
--cuda-compile-host-device | Compile CUDA code for both host and device (default). | help |
--cuda-device-only | Compile CUDA code for device only | help |
--cuda-feature value | Manually specify the CUDA feature to use | help |
--cuda-host-only | Compile CUDA code for host only. | help |
--cuda-include-ptx value | Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. | help |
--cuda-noopt-device-debug | Enable device-side debug info generation. | help |
--cuda-path-ignore-env | Ignore environment variables to detect CUDA installation | help |
--cuda-path value | CUDA installation path | help |
-cuid value | An ID for compilation unit, which should be the same for the same compilation unit but different for different compilation units. | help |
-darwin-target-variant value | Generate code for an additional runtime variant of the deployment target | help |
-emit-ast | Emit Clang AST files for source inputs | help |
--end-no-unused-arguments | Start emitting warnings for unused driver arguments | help |
-faddrsig | Emit an address-significance table | help |
-fansi-escape-codes | Use ANSI escape codes for diagnostics | help |
-fblocks | Enable the 'blocks' language feature | help |
-fcaret-diagnostics-max-lines value | Set the maximum number of source lines to show in a caret diagnostic (0 = no limit). | help |
-fcf-protection | Enable cf-protection in 'full' mode | help |
-fcodegen-data-generate path | Emit codegen data into the object file. | help |
-fcodegen-data-use path | Use codegen data read from the specified <path>. | help |
-fcolor-diagnostics | Enable colors in diagnostics | help |
-fcommon | Place uninitialized global variables in a common block | help |
-fcomplete-member-pointers | Require member pointer base types to be complete if they would be significant under the Microsoft ABI | help |
-fcoverage-compilation-dir value | The compilation directory to embed in the coverage mapping. | help |
-fcoverage-mapping | Generate coverage mapping to enable code coverage analysis | help |
-fcoverage-mcdc | Enable MC/DC criteria when generating code coverage | help |
-fcrash-diagnostics-dir dir | Put crash-report files in <dir> | help |
-fcrash-diagnostics value | Set level of crash diagnostic reporting, (option: off, compiler, all) | help |
-fcs-profile-generate directory | Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var) | help |
-fcuda-short-ptr | Use 32-bit pointers for accessing const/local/shared address spaces | help |
-fdebug-compilation-dir value | The compilation directory to embed in the debug info | help |
-fdebug-macro | Emit macro debug information | help |
-fdelayed-template-parsing | Parse templated function definitions at the end of the translation unit | help |
-fdelete-null-pointer-checks | Treat usage of null pointers as undefined behavior (default) | help |
-fdepscan value | Scan for dependencies ahead of compiling, generating a pruned CAS tree to send to -fcas-fs. | help |
-fdiagnostics-absolute-paths | Print absolute paths in diagnostics | help |
-fdiagnostics-color value | When to use colors in diagnostics | help |
-fdiagnostics-parseable-fixits | Print fix-its in machine parseable form | help |
-fdriver-only | Only run the driver. | help |
-feliminate-unused-debug-types | Do not emit debug info for defined but unused types | help |
-fexcess-precision value | Allows control over excess precision on targets where native support for the precision types is not available. | help |
-fexperimental-library | Control whether unstable and experimental library features are enabled. | help |
-fexperimental-sanitize-metadata-ignorelist value | Disable sanitizer metadata for modules and functions that match the provided special case list | help |
-fexperimental-sanitize-metadata value | Specify the type of metadata to emit for binary analysis sanitizers | help |
-ffile-compilation-dir value | The compilation directory to embed in the debug info and coverage mapping. | help |
-ffile-reproducible | Use the target's platform-specific path separator character when expanding the __FILE__ macro | help |
-ffixed-x10 | Reserve the x10 register (AArch64/RISC-V only) | help |
-ffixed-x11 | Reserve the x11 register (AArch64/RISC-V only) | help |
-ffixed-x12 | Reserve the x12 register (AArch64/RISC-V only) | help |
-ffixed-x13 | Reserve the x13 register (AArch64/RISC-V only) | help |
-ffixed-x14 | Reserve the x14 register (AArch64/RISC-V only) | help |
-ffixed-x15 | Reserve the x15 register (AArch64/RISC-V only) | help |
-ffixed-x16 | Reserve the x16 register (AArch64/RISC-V only) | help |
-ffixed-x17 | Reserve the x17 register (AArch64/RISC-V only) | help |
-ffixed-x18 | Reserve the x18 register (AArch64/RISC-V only) | help |
-ffixed-x19 | Reserve the x19 register (AArch64/RISC-V only) | help |
-ffixed-x1 | Reserve the x1 register (AArch64/RISC-V only) | help |
-ffixed-x20 | Reserve the x20 register (AArch64/RISC-V only) | help |
-ffixed-x21 | Reserve the x21 register (AArch64/RISC-V only) | help |
-ffixed-x22 | Reserve the x22 register (AArch64/RISC-V only) | help |
-ffixed-x23 | Reserve the x23 register (AArch64/RISC-V only) | help |
-ffixed-x24 | Reserve the x24 register (AArch64/RISC-V only) | help |
-ffixed-x25 | Reserve the x25 register (AArch64/RISC-V only) | help |
-ffixed-x26 | Reserve the x26 register (AArch64/RISC-V only) | help |
-ffixed-x27 | Reserve the x27 register (AArch64/RISC-V only) | help |
-ffixed-x28 | Reserve the x28 register (AArch64/RISC-V only) | help |
-ffixed-x29 | Reserve the x29 register (AArch64/RISC-V only) | help |
-ffixed-x2 | Reserve the x2 register (AArch64/RISC-V only) | help |
-ffixed-x30 | Reserve the x30 register (AArch64/RISC-V only) | help |
-ffixed-x31 | Reserve the x31 register (AArch64/RISC-V only) | help |
-ffixed-x3 | Reserve the x3 register (AArch64/RISC-V only) | help |
-ffixed-x4 | Reserve the x4 register (AArch64/RISC-V only) | help |
-ffixed-x5 | Reserve the x5 register (AArch64/RISC-V only) | help |
-ffixed-x6 | Reserve the x6 register (AArch64/RISC-V only) | help |
-ffixed-x7 | Reserve the x7 register (AArch64/RISC-V only) | help |
-ffixed-x8 | Reserve the x8 register (AArch64/RISC-V only) | help |
-ffixed-x9 | Reserve the x9 register (AArch64/RISC-V only) | help |
-fforce-emit-vtables | Emits more virtual tables to improve devirtualization | help |
-ffuchsia-api-level value | Set Fuchsia API level | help |
-fgnuc-version value | Sets various macros to claim compatibility with the given GCC version (default is 4.2.1) | help |
-fgpu-default-stream value | Specify default stream. | help |
-fgpu-defer-diag | Defer host/device related diagnostic messages for CUDA/HIP | help |
-fgpu-flush-denormals-to-zero | Flush denormal floating point values to zero in CUDA/HIP device mode. | help |
-fgpu-rdc | Generate relocatable device code, also known as separate compilation mode | help |
-fgpu-sanitize | Enable sanitizer for supported offloading devices | help |
-fhip-emit-relocatable | Compile HIP source to relocatable | help |
-fhip-fp32-correctly-rounded-divide-sqrt | Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded (HIP device compilation only) | help |
-fhip-kernel-arg-name | Specify that kernel argument names are preserved (HIP only) | help |
-fhip-new-launch-api | Use new kernel launching API for HIP | help |
-fimplicit-module-maps | Implicitly search the file system for module map files. | help |
-fimplicit-modules-lock-timeout seconds | Time to wait on an implicit module lock before timing out | help |
-finline-max-stacksize value | Suppress inlining of functions whose stack size exceeds the given value | help |
-fintegrated-cc1 | Run cc1 in-process | help |
-flto value | Set LTO mode | help |
-fmacro-backtrace-limit value | Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit) | help |
-fmemory-profile-use pathname | Use memory profile for profile-guided memory optimization | help |
-fmerge-all-constants | Allow merging of constants | help |
-fmodule-file name>=]<file | Specify the mapping of module name to precompiled module file, or load a module file if name is omitted. | help |
-fmodule-header kind | Build a C++20 Header Unit from a header that should be found in the user (fmodule-header=user) or system (fmodule-header=system) search path. | help |
-fmodule-map-file file | Load this module map file | help |
-fmodule-name name | Specify the name of the module to build | help |
-fmodule-output | Save intermediate module file results when compiling a standard C++ module unit. | help |
-fmodules-decluse | Require declaration of modules used within a module | help |
-fmodules-embed-all-files value | Embed the contents of all files read by this compilation into the produced module file. | help |
-fmodules-ignore-macro value | Ignore the definition of the given macro when building and loading modules | help |
-fmodules-search-all | Search even non-imported modules to resolve references | help |
-fmodules-strict-decluse | Like -fmodules-decluse but requires all headers to be in modules | help |
-fmodules | Enable the 'modules' language feature | help |
-fms-compatibility-version value | Dot-separated value representing the Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default)) | help |
-fms-compatibility | Enable full Microsoft Visual C++ compatibility | help |
-fms-define-stdc | Define '__STDC__' to '1' in MSVC Compatibility mode | help |
-fms-extensions | Accept some non-standard constructs supported by the Microsoft compiler | help |
-fms-hotpatch | Ensure that all functions can be hotpatched at runtime | help |
-fms-runtime-lib value | Select Windows run-time library | help |
-fms-secure-hotpatch-functions-file value | Path to a file that contains a list of mangled names of functions that should be hot-patched for Windows Secure Hot-Patching | help |
-fms-secure-hotpatch-functions-list value | List of mangled symbol names of functions that should be hot-patched for Windows Secure Hot-Patching | help |
-fmsc-version value | Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default)) | help |
-fno-addrsig | Don't emit an address-significance table | help |
-fno-assume-unique-vtables | Disable optimizations based on vtable pointer identity | help |
-fno-builtin- value | Disable implicit builtin knowledge of a specific function | help |
-fno-builtin | Disable implicit builtin knowledge of functions | help |
-fno-color-diagnostics | Disable colors in diagnostics | help |
-fno-complete-member-pointers | Do not require member pointer base types to be complete if they would be significant under the Microsoft ABI | help |
-fno-coverage-mapping | Disable code coverage analysis | help |
-fno-coverage-mcdc | Disable MC/DC coverage criteria | help |
-fno-crash-diagnostics | Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash | help |
-fno-debug-macro | Do not emit macro debug information | help |
-fno-delayed-template-parsing | Disable delayed template parsing | help |
-fno-delete-null-pointer-checks | Do not treat usage of null pointers as undefined behavior | help |
-fno-eliminate-unused-debug-types | Emit debug info for defined but unused types | help |
-fno-experimental-sanitize-metadata value | Disable emitting metadata for binary analysis sanitizers | help |
-fno-file-reproducible | Use the host's platform-specific path separator character when expanding the __FILE__ macro | help |
-fno-gpu-allow-device-init | Don't allow device side init function in HIP (experimental) | help |
-fno-gpu-defer-diag | Don't defer host/device related diagnostic messages for CUDA/HIP | help |
-fno-hip-emit-relocatable | Do not override toolchain to compile HIP source to relocatable | help |
-fno-hip-fp32-correctly-rounded-divide-sqrt | Don't specify that single precision floating-point divide and sqrt used in the program source are correctly rounded (HIP device compilation only) | help |
-fno-hip-kernel-arg-name | Don't specify that kernel argument names are preserved (HIP only) | help |
-fno-integrated-cc1 | Spawn a separate process for each cc1 | help |
-fno-integrated-objemitter | Use external machine object code emitter. | help |
-fno-knr-functions | Disable support for K&R C function declarations | help |
-fno-lto | Disable LTO mode (default) | help |
-fno-offload-lto | Disable LTO mode (default) for offload compilation | help |
-fno-offload-via-llvm | Don't use LLVM/Offload as portable offloading runtime. | help |
-fno-profile-generate | Disable generation of profile instrumentation. | help |
-fno-profile-instr-generate | Disable generation of profile instrumentation. | help |
-fno-profile-instr-use | Disable using instrumentation data for profile-guided optimization | help |
-fno-rtlib-defaultlib | On Windows, do not emit /defaultlib: directives to link compiler-rt libraries | help |
-fno-sanitize-address-globals-dead-stripping | Disable linker dead stripping of globals in AddressSanitizer | help |
-fno-sanitize-address-outline-instrumentation | Use default code inlining logic for the address sanitizer | help |
-fno-sanitize-address-poison-custom-array-cookie | Disable poisoning array cookies when using custom operator new[] in AddressSanitizer | help |
-fno-sanitize-address-use-after-scope | Disable use-after-scope detection in AddressSanitizer | help |
-fno-sanitize-address-use-odr-indicator | Disable ODR indicator globals | help |
-fno-sanitize-annotate-debug-info value | Do not allow compiler to annotate sanitizer instrumentation with extra debug info for the specified sanitizers | help |
-fno-sanitize-cfi-canonical-jump-tables | Do not make the jump table addresses canonical in the symbol table | help |
-fno-sanitize-cfi-cross-dso | Disable control flow integrity (CFI) checks for cross-DSO calls. | help |
-fno-sanitize-coverage value | Disable features of coverage instrumentation for Sanitizers | help |
-fno-sanitize-debug-trap-reasons | Alias for -fsanitize-debug-trap-reasons=none | help |
-fno-sanitize-hwaddress-experimental-aliasing | Disable aliasing mode in HWAddressSanitizer | help |
-fno-sanitize-ignorelist | Don't use ignorelist file for sanitizers | help |
-fno-sanitize-memory-param-retval | Disable detection of uninitialized parameters and return values | help |
-fno-sanitize-memory-track-origins | Disable origins tracking in MemorySanitizer | help |
-fno-sanitize-memory-use-after-dtor | Disable use-after-destroy detection in MemorySanitizer | help |
-fno-sanitize-merge value | Do not allow compiler to merge handlers for specified sanitizers | help |
-fno-sanitize-recover value | Disable recovery for specified sanitizers | help |
-fno-sanitize-stable-abi | Conventional ABI instrumentation for sanitizer runtime. | help |
-fno-sanitize-stats | Disable sanitizer statistics gathering. | help |
-fno-sanitize-thread-atomics | Disable atomic operations instrumentation in ThreadSanitizer | help |
-fno-sanitize-thread-func-entry-exit | Disable function entry/exit instrumentation in ThreadSanitizer | help |
-fno-sanitize-thread-memory-access | Disable memory access instrumentation in ThreadSanitizer | help |
-fno-sanitize-trap value | Disable trapping for specified sanitizers | help |
-fno-standalone-debug | Limit debug information produced to reduce size of debug binary | help |
-fno-strict-aliasing | Disable optimizations based on strict aliasing rules | help |
-fno-sycl | Disable SYCL C++ extensions | help |
-fno-temp-file | Directly create compilation output files. | help |
-fno-verify-intermediate-code | Disable verification of LLVM IR | help |
-fobjc-runtime value | Specify the target Objective-C runtime kind and version | help |
-foffload-implicit-host-device-templates | Template functions or specializations without host, device and global attributes have implicit host device attributes (CUDA/HIP only) | help |
-foffload-lto value | Set LTO mode for offload compilation | help |
-foffload-via-llvm | Use LLVM/Offload as portable offloading runtime. | help |
-fopenmp-target-jit | Emit code that can be JIT compiled for OpenMP offloading. | help |
-fpch-instantiate-templates | Instantiate templates already while building a PCH | help |
-fprebuilt-module-path directory | Specify the prebuilt module path | help |
-fprofile-exclude-files value | Instrument only functions from files where names don't match all the regexes separated by a semi-colon | help |
-fprofile-filter-files value | Instrument only functions from files where names match any regex separated by a semi-colon | help |
-fprofile-generate-cold-function-coverage directory | Generate instrumented code to collect coverage info for cold functions into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var) | help |
-fprofile-generate directory | Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var) | help |
-fprofile-instr-generate file | Generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var) | help |
-fprofile-instr-use value | Use instrumentation data for profile-guided optimization | help |
-fprofile-list value | Filename defining the list of functions/files to instrument. | help |
-fprofile-remapping-file file | Use the remappings described in <file> to match the profile data against names in the program | help |
-fprofile-sample-use value | Enable sample-based profile guided optimizations | help |
-fprofile-update method | Set update method of profile counters | help |
-fprofile-use pathname | Use instrumentation data for profile-guided optimization. | help |
-fprotect-parens | Determines whether the optimizer honors parentheses when floating-point expressions are evaluated | help |
-frtlib-defaultlib | On Windows, emit /defaultlib: directives to link compiler-rt libraries (default) | help |
-fsanitize-address-destructor value | Set the kind of module destructors emitted by AddressSanitizer instrumentation. | help |
-fsanitize-address-field-padding value | Level of field padding for AddressSanitizer | help |
-fsanitize-address-globals-dead-stripping | Enable linker dead stripping of globals in AddressSanitizer | help |
-fsanitize-address-outline-instrumentation | Always generate function calls for address sanitizer instrumentation | help |
-fsanitize-address-poison-custom-array-cookie | Enable poisoning array cookies when using custom operator new[] in AddressSanitizer | help |
-fsanitize-address-use-after-return mode | Select the mode of detecting stack use-after-return in AddressSanitizer | help |
-fsanitize-address-use-after-scope | Enable use-after-scope detection in AddressSanitizer | help |
-fsanitize-address-use-odr-indicator | Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized programs at the cost of an increase in binary size | help |
-fsanitize-annotate-debug-info value | Annotate sanitizer instrumentation with extra debug info for the specified sanitizers, if supported | help |
-fsanitize-cfi-canonical-jump-tables | Make the jump table addresses canonical in the symbol table | help |
-fsanitize-cfi-cross-dso | Enable control flow integrity (CFI) checks for cross-DSO calls. | help |
-fsanitize-cfi-icall-experimental-normalize-integers | Normalize integers in CFI indirect call type signature checks | help |
-fsanitize-cfi-icall-generalize-pointers | Generalize pointers in CFI indirect call type signature checks | help |
-fsanitize-coverage-allowlist value | Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones | help |
-fsanitize-coverage-ignorelist value | Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones | help |
-fsanitize-coverage-stack-depth-callback-min M | Use callback for max stack depth tracing with minimum stack depth M | help |
-fsanitize-coverage value | Specify the type of coverage instrumentation for Sanitizers | help |
-fsanitize-debug-trap-reasons value | Set how trap reasons are emitted. | help |
-fsanitize-hwaddress-abi value | Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). | help |
-fsanitize-hwaddress-experimental-aliasing | Enable aliasing mode in HWAddressSanitizer | help |
-fsanitize-ignorelist value | Path to ignorelist file for sanitizers | help |
-fsanitize-kcfi-arity | Embed function arity information into the KCFI patchable function prefix | help |
-fsanitize-memory-param-retval | Enable detection of uninitialized parameters and return values | help |
-fsanitize-memory-track-origins value | Enable origins tracking in MemorySanitizer | help |
-fsanitize-memory-use-after-dtor | Enable use-after-destroy detection in MemorySanitizer | help |
-fsanitize-memtag-mode value | Set default MTE mode to 'sync' (default) or 'async' | help |
-fsanitize-merge value | Allow compiler to merge handlers for specified sanitizers | help |
-fsanitize-recover value | Enable recovery for specified sanitizers | help |
-fsanitize-skip-hot-cutoff value | Exclude sanitization for the top hottest code responsible for the given fraction of PGO counters (0.0 [default] = skip none; | help |
-fsanitize-stable-abi | Stable ABI instrumentation for sanitizer runtime. | help |
-fsanitize-stats | Enable sanitizer statistics gathering. | help |
-fsanitize-system-ignorelist value | Path to system ignorelist file for sanitizers | help |
-fsanitize-thread-atomics | Enable atomic operations instrumentation in ThreadSanitizer (default) | help |
-fsanitize-thread-func-entry-exit | Enable function entry/exit instrumentation in ThreadSanitizer (default) | help |
-fsanitize-thread-memory-access | Enable memory access instrumentation in ThreadSanitizer (default) | help |
-fsanitize-trap | Enable trapping for all sanitizers | help |
-fsanitize-undefined-ignore-overflow-pattern value | Specify the overflow patterns to exclude from arithmetic sanitizer instrumentation | help |
-fsanitize-undefined-strip-path-components number | Strip (or keep only, if negative) a given number of path components when emitting check metadata. | help |
-fsanitize check | Turn on runtime checks for various forms of undefined or suspicious behavior. | help |
-fsplit-lto-unit | Enables splitting of the LTO unit | help |
-fstandalone-debug | Emit full debug info for all types used by the program | help |
-fstrict-aliasing | Enable optimizations based on strict aliasing rules | help |
-fswift-async-fp option | Control emission of Swift async extended frame info | help |
-fsycl-device-only | Compile SYCL code for device only | help |
-fsycl-host-only | Compile SYCL code for host only. | help |
-fsycl | Enable SYCL C++ extensions | help |
-fsyntax-only | Run the preprocessor, parser and semantic analysis stages | help |
-fsystem-module | Build this module as a system module. | help |
-ftemporal-profile | Generate instrumented code to collect temporal information | help |
-fthin-link-bitcode value | Write minimized bitcode to <file> for the ThinLTO thin link only | help |
-fthinlto-distributor path | Path to the ThinLTO distributor process. | help |
-ftime-trace-granularity value | Minimum time granularity (in microseconds) traced by time profiler | help |
-ftime-trace-verbose value | Make time trace capture verbose event details (e.g. source filenames). | help |
-ftime-trace value | Similar to -ftime-trace. | help |
-ftrivial-auto-var-init-max-size value | Stop initializing trivial automatic stack variables if var size exceeds the specified number of instances (in bytes) | help |
-ftrivial-auto-var-init-stop-after value | Stop initializing trivial automatic stack variables after the specified number of instances | help |
-ftrivial-auto-var-init value | Initialize trivial automatic stack variables. | help |
-fuse-cuid value | Method to generate ID's for compilation units for single source offloading languages CUDA and HIP: 'hash' (ID's generated by hashing file path and command line options) | 'random' (ID's generated as… | help |
-fverify-intermediate-code | Enable verification of LLVM IR | help |
-fvirtual-function-elimination | Enables dead virtual function elimination optimization. | help |
-fwrapv-pointer | Treat pointer overflow as two's complement | help |
-fwrapv | Treat signed integer overflow as two's complement | help |
-gcodeview-ghash | Emit type record hashes in a .debug$H section | help |
-gcodeview | Generate CodeView debug information | help |
-gdwarf | Generate source-level debug information with the default dwarf version | help |
-gkey-instructions | Enable Key Instructions, which reduces the jumpiness of debug stepping in optimized C/C++ code in some debuggers. | help |
-gline-directives-only | Emit debug line info directives only | help |
-gline-tables-only | Emit debug line number tables only | help |
-gno-codeview-command-line | Don't emit compiler path and command line into CodeView debug information | help |
--gpu-bundle-output | Bundle output files of HIP device compilation | help |
--gpu-instrument-lib value | Instrument device library for HIP, which is a LLVM bitcode containing __cyg_profile_func_enter and __cyg_profile_func_exit | help |
--gpu-max-threads-per-block value | Default max threads per block for kernel launch bounds for HIP | help |
-gsplit-dwarf value | Set DWARF fission mode | help |
-gstrict-dwarf | Restrict DWARF features to those defined in the specified version, avoiding features from later versions. | help |
-gstructor-decl-linkage-names | Attach linkage names to C++ constructor/destructor declarations in DWARF.Implies -g. | help |
-G size | Put objects of at most <size> bytes into small data section (MIPS / Hexagon) | help |
-g | Generate source-level debug information | help |
--hip-device-lib value | HIP device library | help |
--hip-link | Link clang-offload-bundler bundles for HIP | help |
--hip-path value | HIP runtime installation path, used for finding HIP version and adding HIP include path. | help |
--hip-version value | HIP version in the format of major.minor.patch | help |
--hipspv-pass-plugin dsopath | path to a pass plugin for HIP to SPIR-V passes. | help |
--hipstdpar-interpose-alloc | Replace all memory allocation / deallocation calls with hipManagedMalloc / hipFree equivalents | help |
--hipstdpar-path value | HIP Standard Parallel Algorithm Acceleration library path, used for finding and implicitly including the library header | help |
--hipstdpar-prim-path value | rocPrim path, required by the HIP Standard Parallel Algorithm Acceleration library, used to implicitly include the rocPrim library | help |
--hipstdpar-thrust-path value | rocThrust path, required by the HIP Standard Parallel Algorithm Acceleration library, used to implicitly include the rocThrust library | help |
--hipstdpar | Enable HIP acceleration for standard parallel algorithms | help |
-mabi quadword-atomics | Enable quadword atomics ABI on AIX (AIX PPC64 only). | help |
-maix-struct-return | Return all structs in memory (PPC32 only) | help |
-malign-branch-boundary value | Specify the boundary's size to align branches | help |
-malign-branch value | Specify types of branches to align | help |
-malign-double | Align doubles to two words in structs (x86 only) | help |
-mamdgpu-ieee | Sets the IEEE bit in the expected default floating point mode register. | help |
-mamdgpu-precise-memory-op | Enable precise memory mode (AMDGPU only) | help |
-mannotate-tablejump | Enable annotate table jump instruction to correlate it with the jump table. | help |
-mapx-features value | Enable features of APX | help |
-mapx-inline-asm-use-gpr32 | Enable use of GPR32 in inline assembly for APX | help |
-march value | For a list of available architectures for the target use '-mcpu=help' | help |
-marm64x value | Link as a hybrid ARM64X image | help |
-mbackchain | Link stack frames through backchain on System Z | help |
-mbranch-protection value | Enforce targets of indirect branches and function returns | help |
-mbranches-within-32B-boundaries | Align selected branches (fused, jcc, jmp) within 32-byte boundary | help |
-mcf-branch-label-scheme value | Select label scheme for branch control-flow architecture protection | help |
-mcode-object-version value | Specify code object ABI version. | help |
-mconstructor-aliases | Enable emitting complete constructors and destructors as aliases when possible | help |
-mcpu value | For a list of available CPUs for the target use '-mcpu=help' | help |
-mcrc | Allow use of CRC instructions (ARM/Mips only) | help |
-mdaz-ftz | Globally set the denormals-are-zero (DAZ) and flush-to-zero (FTZ) bits in the floating-point control register on program startup | help |
-mdefault-visibility-export-mapping value | Mapping between default visibility and export | help |
-mdiv32 | Use div.w[u] and mod.w[u] instructions with input not sign-extended. | help |
-mdouble n | Force double to be <n> bits | help |
-meabi value | Set EABI type. | help |
-menable-experimental-extensions | Enable use of experimental RISC-V extensions. | help |
-mfentry | Insert calls to fentry at function entry (x86/SystemZ only) | help |
-mfrecipe | Enable frecipe.{s/d} and frsqrte.{s/d} | help |
-mfunction-return value | Replace returns with jumps to ``__x86_return_thunk`` (x86 only, error otherwise) | help |
-mgeneral-regs-only | Generate code which only uses the general purpose registers (AArch64/x86 only) | help |
-mglobal-merge | Enable merging of globals | help |
-mguard value | Enable or disable Control Flow Guard checks and guard tables emission | help |
-mharden-sls value | Select straight-line speculation hardening scope (ARM/AArch64/X86 only). | help |
-miamcu | Use Intel MCU ABI | help |
-mignore-xcoff-visibility | Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file | help |
-mincremental-linker-compatible | (integrated-as) Emit an object file which can be used with an incremental linker | help |
-mindirect-branch-cs-prefix | Add cs prefix to call and jmp to indirect thunk | help |
-mios-version-min value | Set iOS deployment target | help |
-mlam-bh | Enable amswap[_db].{b/h} and amadd[_db].{b/h} | help |
-mlamcas | Enable amcas[_db].{b/h/w/d} | help |
-mlasx | Enable Loongson Advanced SIMD Extension (LASX). | help |
-mld-seq-sa | Do not generate same-address load-load barrier instructions (dbar 0x700) | help |
-mlink-builtin-bitcode-postopt | Link builtin bitcodes after the optimization pipeline | help |
-mllvm arg | Alias for -mllvm | help |
-mlong-calls | Generate branches with extended addressability, usually via indirect jumps. | help |
-mlsx | Enable Loongson SIMD Extension (LSX). | help |
-mlvi-cfi | Enable only control-flow mitigations for Load Value Injection (LVI) | help |
-mlvi-hardening | Enable all mitigations for Load Value Injection (LVI) | help |
-mmacos-version-min value | Set macOS deployment target | help |
-mms-bitfields | Set the default structure layout to be compatible with the Microsoft compiler standard | help |
-mno-amdgpu-precise-memory-op | Disable precise memory mode (AMDGPU only) | help |
-mno-apx-features value | Disable features of APX | help |
-mno-constructor-aliases | Disable emitting complete constructors and destructors as aliases when possible | help |
-mno-daz-ftz | Do not globally set the denormals-are-zero (DAZ) and flush-to-zero (FTZ) bits in the floating-point control register on program startup | help |
-mno-div32 | Do not use div.w[u] and mod.w[u] instructions with input not sign-extended. | help |
-mno-frecipe | Disable frecipe.{s/d} and frsqrte.{s/d} | help |
-mno-gather | Disable generation of gather instructions in auto-vectorization(x86 only) | help |
-mno-global-merge | Disable merging of globals | help |
-mno-implicit-float | Don't generate implicit floating point or vector instructions | help |
-mno-incremental-linker-compatible | (integrated-as) Emit an object file which cannot be used with an incremental linker | help |
-mno-lam-bh | Disable amswap[_db].{b/h} and amadd[_db].{b/h} | help |
-mno-lamcas | Disable amcas[_db].{b/h/w/d} | help |
-mno-lasx | Disable Loongson Advanced SIMD Extension (LASX). | help |
-mno-ld-seq-sa | Generate same-address load-load barrier instructions (dbar 0x700) | help |
-mno-long-calls | Restore the default behaviour of not generating long calls | help |
-mno-lsx | Disable Loongson SIMD Extension (LSX). | help |
-mno-lvi-cfi | Disable control-flow mitigations for Load Value Injection (LVI) | help |
-mno-lvi-hardening | Disable mitigations for Load Value Injection (LVI) | help |
-mno-ms-bitfields | Do not set the default structure layout to be compatible with the Microsoft compiler standard | help |
-mno-pic-data-is-text-relative | Don't assume data segments are relative to text segment | help |
-mno-regnames | Use only register numbers when writing assembly output | help |
-mno-relax | Disable linker relaxation | help |
-mno-scalar-strict-align | Allow scalar memory accesses to be unaligned (RISC-V only) | help |
-mno-scatter | Disable generation of scatter instructions in auto-vectorization(x86 only) | help |
-mno-scq | Disable sc.q instruction. | help |
-mno-seses | Disable speculative execution side effect suppression (SESES) | help |
-mno-stack-arg-probe | Disable stack probes which are enabled by default | help |
-mno-strict-align | Allow memory accesses to be unaligned (AArch64/LoongArch/RISC-V only) | help |
-mno-tls-direct-seg-refs | Disable direct TLS access through segment registers | help |
-mno-tocdata value | Specifies a list of variables to be exempt from the TOC data transformation. | help |
-mno-unaligned-access | Force all memory accesses to be aligned (AArch32/MIPSr6 only) | help |
-mno-unaligned-symbols | Expect external char-aligned symbols to be without ABI alignment (SystemZ only) | help |
-mno-vector-strict-align | Allow vector memory accesses to be unaligned (RISC-V only) | help |
-mno-wavefrontsize64 | Specify wavefront size 32 mode (AMDGPU only) | help |
-mnop-mcount | Generate mcount/__fentry__ calls as nops. | help |
-momit-leaf-frame-pointer | Omit frame pointer setup for leaf functions | help |
-mpacked-stack | Use packed stack layout (SystemZ only). | help |
-mpad-max-prefix-size value | Specify maximum number of prefixes to use for padding | help |
-mpic-data-is-text-relative | Assume data segments are relative to text segment | help |
-mprefer-vector-width value | Specifies preferred vector width for auto-vectorization. | help |
-mprintf-kind value | Specify the printf lowering scheme (AMDGPU only), allowed values are "hostcall"(printing happens during kernel execution, this scheme relies on hostcalls which require system to support pcie atomics)… | help |
-mqdsp6-compat | Enable hexagon-qdsp6 backward compatibility | help |
-mrecip value | Control use of approximate reciprocal and reciprocal square root instructions followed by <n> iterations of Newton-Raphson refinement. | help |
-mrecord-mcount | Generate a __mcount_loc section entry for each __fentry__ call. | help |
-mregnames | Use full register names when writing assembly output | help |
-mrelax-all | (integrated-as) Relax all machine instructions | help |
-mrelax | Enable linker relaxation | help |
-mrtd | Make StdCall calling convention the default | help |
-mrvv-vector-bits value | Specify the size in bits of an RVV vector register | help |
-msave-reg-params | Save arguments passed by registers to ABI-defined stack positions | help |
-mscalar-strict-align | Force all scalar memory accesses to be aligned (RISC-V only) | help |
-mscq | Enable sc.q instruction. | help |
-mseses | Enable speculative execution side effect suppression (SESES). | help |
-msign-return-address value | Select return address signing scope | help |
-msimd value | Select the SIMD extension(s) to be enabled in LoongArch either 'none', 'lsx', 'lasx'. | help |
-mskip-rax-setup | Skip setting up RAX register when passing variable arguments (x86 only) | help |
-msmall-data-limit value | Put global and static data smaller than the limit into a special section | help |
-msoft-float | Use software floating point | help |
-msse2avx | Specify that the assembler should encode SSE instructions with VEX prefix | help |
-mstack-alignment value | Set the stack alignment | help |
-mstack-arg-probe | Enable stack probes | help |
-mstack-probe-size value | Set the stack probe size | help |
-mstack-protector-guard-offset value | Use the given offset for addressing the stack-protector guard | help |
-mstack-protector-guard-reg value | Use the given reg for addressing the stack-protector guard | help |
-mstack-protector-guard-symbol value | Use the given symbol for addressing the stack-protector guard | help |
-mstack-protector-guard value | Use the given guard (global, tls) for addressing the stack-protector guard | help |
-mstackrealign | Force realign the stack at entry to every function | help |
-mstrict-align | Force all memory accesses to be aligned (AArch64/LoongArch/RISC-V only) | help |
-msvr4-struct-return | Return small structs in registers (PPC32 only) | help |
-mtargetos value | Set the deployment target to be the specified OS and OS version | help |
-mthread-model value | The thread model to use. | help |
-mtls-dialect value | Which thread-local storage dialect to use for dynamic accesses of TLS variables | help |
-mtls-direct-seg-refs | Enable direct TLS access through segment registers (default) | help |
-mtls-size value | Specify bit size of immediate TLS offsets (AArch64 ELF only): 12 (for 4KB) | 24 (for 16MB, default) | 32 (for 4GB) | 48 (for 256TB, needs -mcmodel=large) | help |
-mtocdata value | Specifies a list of variables to which the TOC data transformation will be applied. | help |
-mtune value | Only supported on AArch64, PowerPC, RISC-V, SPARC, SystemZ, and X86 | help |
-munaligned-access | Allow memory accesses to be unaligned (AArch32/MIPSr6 only) | help |
-munaligned-symbols | Expect external char-aligned symbols to be without ABI alignment (SystemZ only) | help |
-mvector-strict-align | Force all vector memory accesses to be aligned (RISC-V only) | help |
-mwavefrontsize64 | Specify wavefront size 64 mode (AMDGPU only) | help |
-mxcoff-roptr | Place constant objects with relocatable address values in the RO data section and add -bforceimprw to the linker flags (AIX only) | help |
-mzos-target value | Set the z/OS release of the runtime environment | help |
--no-cuda-include-ptx value | Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. | help |
--no-default-config | Disable loading default configuration files | help |
--no-gpu-bundle-output | Do not bundle output files of HIP device compilation | help |
-no-hip-rt | Do not link against HIP runtime libraries | help |
--no-offload-arch value | Remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. | help |
--no-wasm-opt | Disable the wasm-opt optimizer | help |
-nobuiltininc | Disable builtin #include directories only | help |
-nostdinc | Disable both standard system #include directories and builtin #include directories | help |
-object-file-name file | Set the output <file> for debug infos | help |
--offload-arch-tool value | Tool used for detecting offloading architectures in the system. | help |
--offload-arch value | Specify an offloading device architecture for CUDA, HIP, or OpenMP. | help |
--offload-compress | Compress offload device binaries (HIP only) | help |
--offload-device-only | Only compile for the offloading device. | help |
--offload-host-device | Compile for both the offloading host and device (default). | help |
--offload-host-only | Only compile for the offloading host. | help |
--offload-jobs value | Specify the number of threads to use for device offloading tasks during compilation. | help |
--offload-new-driver | Use the new driver for offloading compilation. | help |
--offload-targets value | Specify a list of target architectures to use for offloading. | help |
--precompile | Only precompile the input | help |
-print-diagnostic-options | Print all of Clang's warning options | help |
-print-enabled-extensions | Print the extensions enabled by the given target and -march/-mcpu options. | help |
-print-library-module-manifest-path | Print the path for the C++ Standard library module manifest | help |
-print-resource-dir | Print the resource directory pathname | help |
-print-runtime-dir | Print the directory pathname containing Clang's runtime libraries | help |
-print-search-dirs | Print the paths used for finding libraries and programs | help |
-print-supported-cpus | Print supported cpu models for the given target (if target is not specified,it will print the supported cpus for the default target) | help |
-print-supported-extensions | Print supported -march extensions (RISC-V, AArch64 and ARM only) | help |
-print-target-triple | Print the normalized target triple | help |
-print-targets | Print the registered targets | help |
--ptxas-path value | Path to ptxas (used for compiling CUDA code) | help |
-Qunused-arguments | Don't emit warning for unused driver arguments | help |
-regcall4 | Set __regcall4 as a default calling convention to respect __regcall ABI v.4 | help |
--rocm-device-lib-path value | ROCm device library path. | help |
--rocm-path value | ROCm installation path, used for finding and automatically linking required bitcode libraries. | help |
-rtlib value | Compiler runtime library to use | help |
--start-no-unused-arguments | Don't emit warnings about unused arguments for the following arguments | help |
-sycl-std value | SYCL language standard to compile for. | help |
--target value | Generate code for the given target | help |
--version | Print version information | help |
-vfsoverlay value | Overlay the virtual filesystem described by file over the real file system. | help |
-v | Show commands to run and use verbose output | help |
--warning-suppression-mappings value | File containing diagnostic suppression mappings. | help |
--wasm-opt | Enable the wasm-opt optimizer (default) | help |
-W warning | Enable the specified warning | help |
-Xclang arg | Alias for -Xclang | help |
-Xclangas arg | Alias for -Xclangas | help |
-Xcuda-ptxas arg | Pass <arg> to the ptxas assembler | help |
-Xflang arg | Pass <arg> to the flang compiler | help |
-Xlinker arg | Pass <arg> to the linker | help |
-Xthinlto-distributor arg | Pass <arg> to the ThinLTO distributor process. | help |
-x language | Treat subsequent input files as having type <language> | help |