OVERVIEW: clang LLVM compiler USAGE: clang-15 [options] file... CL.EXE COMPATIBILITY OPTIONS: /? Display available options /arch: 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: Pass 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 /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 Path to the DIA SDK /D Define macro /EH Set exception handling model /EP Disable linemarker output and preprocess to stdout /execution-charset: Set runtime encoding, supports only UTF-8 /external:env: Add dirs in env var to include search path with warnings suppressed /external:I 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 Output assembly code file during compilation /Fa Set assembly output file name (with /FA) /Fe Set output executable file name /FI Include file before parsing /Fi Set preprocess output file name (with /P) /Fo Set output object file (with /c) /Fp Set pch file name (with /Yc and /Yu) /fsanitize=address Enable AddressSanitizer /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 /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 Set stack probe size (default 4096) /guard: 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 Add to system include search path, as if in %INCLUDE% /I 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 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 /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 /Ot Optimize for speed /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 Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-' /o 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 /QIntel-jcc-erratum Align branches within 32-byte boundaries to mitigate the performance impact of the Intel JCC erratum. /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: Set source encoding, supports only UTF-8 /std: Set language version (c++14,c++17,c++20,c++latest,c11,c17) /TC Treat all source files as C /Tc Treat as C source file /TP Treat all source files as C++ /Tp Treat as C++ source file /tune: Set CPU for optimization without affecting instruction set /utf-8 Set source and runtime encoding to UTF-8 (default) /U Undefine macro /vctoolsdir Path to the VCToolChain /vctoolsversion For use with /winsysroot, defaults to newest found /vd 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 /volatile:iso Volatile loads and stores have standard semantics /volatile:ms Volatile loads and stores have acquire and release semantics /W0 Disable all warnings /W1 Enable -Wall /W2 Enable -Wall /W3 Enable -Wall /W4 Enable -Wall and -Wextra /Wall Enable -Weverything /winsdkdir Path to the Windows SDK /winsdkversion Full version of the Windows SDK, defaults to newest found /winsysroot Same as "/diasdkdir /DIA SDK" /vctoolsdir /VC/Tools/MSVC/ "/winsdkdir /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 Generate a pch file for all code up to and including /Yu Load a pch file and use it instead of all code up to and including /Z7 Enable CodeView debug information in object files /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: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 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= Specify configuration file -darwin-target-variant 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 -fcf-protection= Instrument control-flow architecture protection -fcf-protection Enable cf-protection in 'full' mode -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= The compilation directory to embed in the coverage mapping. -fcoverage-mapping Generate coverage mapping to enable code coverage analysis -fcrash-diagnostics-dir= Put crash-report files in -fcrash-diagnostics= Set level of crash diagnostic reporting, (option: off, compiler, all) -fcrash-diagnostics Enable crash diagnostic reporting (default) -fcs-profile-generate= Generate instrumented code to collect context sensitive execution counts into /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) -fdebug-compilation-dir= 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) -fdiagnostics-absolute-paths Print absolute paths in diagnostics -fdiagnostics-parseable-fixits Print fix-its in machine parseable form -fdriver-only Only run the driver. -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= Specify the type of metadata to emit for binary analysis sanitizers -ffile-compilation-dir= 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 -fforce-emit-vtables Emits more virtual tables to improve devirtualization -fgnuc-version= Sets various macros to claim compatibility with the given GCC version (default is 4.2.1) -fimplicit-module-maps Implicitly search the file system for module map files. -finline-max-stacksize= 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= Set LTO mode -flto Enable LTO in 'full' mode -fmerge-all-constants Allow merging of constants -fmodule-file=[=] Specify the mapping of module name to precompiled module file, or load a module file if name is omitted. -fmodule-map-file= Load this module map file -fmodule-name= Specify the name of the module to build -fmodules-decluse Require declaration of modules used within a module -fmodules-ignore-macro= 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= 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-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= Select Windows run-time library -fmsc-version= 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-builtin- 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-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-experimental-sanitize-metadata= 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-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-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-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-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= Disable features of coverage instrumentation for Sanitizers -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-recover= 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= 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-sycl Disables SYCL kernels compilation for device -fno-temp-file Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes -fobjc-runtime= Specify the target Objective-C runtime kind and version -foffload-lto= Set LTO mode for offload compilation -foffload-lto Enable LTO in 'full' mode for offload compilation -forder-file-instrumentation Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var) -fpch-instantiate-templates Instantiate templates already while building a PCH -fprofile-exclude-files= Instrument only functions from files where names don't match all the regexes separated by a semi-colon -fprofile-filter-files= Instrument only functions from files where names match any regex separated by a semi-colon -fprofile-generate= Generate instrumented code to collect execution counts into /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= Generate instrumented code to collect execution counts into (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= Use instrumentation data for profile-guided optimization -fprofile-list= Filename defining the list of functions/files to instrument -fprofile-remapping-file= Use the remappings described in to match the profile data against names in the program -fprofile-update= Set update method of profile counters -fprofile-use= Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from /default.profdata. Otherwise, it reads from file . -fprotect-parens Determines whether the optimizer honors parentheses when floating-point expressions are evaluated -fsanitize-address-destructor= Set destructor type used in ASan instrumentation -fsanitize-address-field-padding= 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= 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-blacklist= Alias for -fsanitize-ignorelist= -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-generalize-pointers Generalize pointers in CFI indirect call type signature checks -fsanitize-coverage-allowlist= Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones -fsanitize-coverage-ignorelist= Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones -fsanitize-coverage= Specify the type of coverage instrumentation for Sanitizers -fsanitize-hwaddress-abi= 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= Path to ignorelist file for sanitizers -fsanitize-memory-param-retval Enable detection of uninitialized parameters and return values -fsanitize-memory-track-origins= 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= Set default MTE mode to 'sync' (default) or 'async' -fsanitize-recover= Enable recovery for specified sanitizers -fsanitize-stable-abi Stable ABI instrumentation for sanitizer runtime. Default: Conventional -fsanitize-stats Enable sanitizer statistics gathering. -fsanitize-system-blacklist= Alias for -fsanitize-system-ignorelist= -fsanitize-system-ignorelist= 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= Enable trapping for specified sanitizers -fsanitize-trap Enable trapping for all sanitizers -fsanitize-undefined-strip-path-components= Strip (or keep only, if negative) a given number of path components when emitting check metadata. -fsanitize= 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 -fswift-async-fp=