OVERVIEW: clang LLVM compiler USAGE: clang-21 [options] file... OPTIONS: -### Print (but do not run) the commands to run for this compilation --analyzer-output Static analyzer report output format (html|plist|plist-multi-file|plist-html|sarif|sarif-html|text). --analyze Run the static analyzer -B Search $prefix$file for executables, libraries, and data files. If $prefix is a directory, search $prefix/$file -b Pass -b to the linker on AIX -cc1-args pass cc1 options to depscan afterwards -CC Include comments from within macros in preprocessed output -cl-denorms-are-zero OpenCL only. Allow denormals to be flushed to zero. -cl-ext= OpenCL only. Enable or disable OpenCL extensions/optional features. The argument is a comma-separated sequence of one or more extension names, each prefixed by '+' or '-'. -cl-fast-relaxed-math OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__. -cl-finite-math-only OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf. -cl-fp32-correctly-rounded-divide-sqrt OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded. -cl-kernel-arg-info OpenCL only. Generate kernel argument metadata. -cl-mad-enable OpenCL only. Allow use of less precise MAD computations in the generated binary. -cl-no-signed-zeros OpenCL only. Allow use of less precise no signed zeros computations in the generated binary. -cl-no-stdinc OpenCL only. Disables all standard includes containing non-native compiler types and functions. -cl-opt-disable OpenCL only. This option disables all optimizations. By default optimizations are enabled. -cl-single-precision-constant OpenCL only. Treat double precision floating-point constant as single precision constant. -cl-std= OpenCL language standard to compile for. -cl-strict-aliasing OpenCL only. This option is added for compatibility with OpenCL 1.0. -cl-uniform-work-group-size OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel -cl-unsafe-math-optimizations OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable. -clangir-disable-passes Disable CIR transformations pipeline -clangir-disable-verifier ClangIR: Disable MLIR module verifier --config= 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= 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= 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= CUDA installation path -cuid= 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. -cxx-isystem Add directory to the C++ SYSTEM include search path -C Include comments in preprocessed output -c Only run preprocess, compile, and assemble steps -darwin-target-variant-triple Specify the darwin target variant triple -darwin-target-variant Generate code for an additional runtime variant of the deployment target -dD Print macro definitions in -E mode in addition to normal output -dependency-dot Filename to write DOT-formatted header dependencies to -dependency-file Filename (or -) to write dependency output to -dI Print include directives in -E mode in addition to normal output -dM Print macro definitions in -E mode instead of normal output -dsym-dir Directory to output dSYM's (if any) to -dump-depscan-tree= emit the CAS identifier for the tree instead of the full -cc1 -dumpdir Use as a prefix to form auxiliary and dump file names -dumpmachine Display the compiler's target processor -dumpversion Display the version of the compiler -D = Define to (or 1 if omitted) --embed-dir= Add directory to embed search path -emit-ast Emit Clang AST files for source inputs -emit-cir Build ASTs and then lower to ClangIR --emit-extension-symbol-graphs Generate additional symbol graphs for extended modules. -emit-interface-stubs Generate Interface Stub Files. -emit-llvm Use the LLVM representation for assembler and object files -emit-merged-ifs Generate Interface Stub Files, emit merged text not binary. --emit-static-lib Enable linker job to emit a static library. -emit-symbol-graph Generate Extract API information as a side effect of compilation. --end-no-unused-arguments Start emitting warnings for unused driver arguments --extract-api-ignores= Comma separated list of files containing a new line separated list of API symbols to ignore when extracting API information. -extract-api Extract API information -E Only run the preprocessor -faapcs-bitfield-load Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only). -faapcs-bitfield-width Follow the AAPCS standard requirement stating that volatile bit-field width is dictated by the field container type. (ARM only). -faarch64-jump-table-hardening Use hardened lowering for jump-table dispatch -faddrsig Emit an address-significance table -falign-loops= N must be a power of two. Align loops to the boundary -faligned-allocation Enable C++17 aligned allocation functions -fallow-editor-placeholders Treat editor placeholders as valid source code -fallow-runtime-check-skip-hot-cutoff= Exclude __builtin_allow_runtime_check for the top hottest code responsible for the given fraction of PGO counters (0.0 [default] = skip none; 1.0 = skip all). Argument format: -faltivec-src-compat= Source-level compatibility for Altivec vectors (for PowerPC targets). This includes results of vector comparison (scalar for 'xl', vector for 'gcc') as well as behavior when initializing with a scalar (splatting for 'xl', element zero only for 'gcc'). For 'mixed', the compatibility is as 'gcc' for 'vector bool/vector pixel' and as 'xl' for other types. Current default is 'mixed'. -fansi-escape-codes Use ANSI escape codes for diagnostics -fapinotes-cache-path= Does nothing; API notes are no longer cached separately from modules -fapinotes-modules Enable module-based external API notes support -fapinotes-swift-version= Specify the Swift version to use when filtering API notes -fapinotes Enable external API notes support -fapple-kext Use Apple's kernel extensions ABI -fapple-link-rtlib Force linking the clang builtins runtime library -fapple-pragma-pack Enable Apple gcc-compatible #pragma pack handling -fapplication-extension Restrict code to those available for App Extensions -fapprox-func Allow certain math function calls to be replaced with an approximately equivalent calculation -fassume-nothrow-exception-dtor Assume that exception objects' destructors are non-throwing -fasync-exceptions Enable EH Asynchronous exceptions -fatomic-fine-grained-memory May have atomic operations on fine-grained memory -fatomic-ignore-denormal-mode Allow atomic operations to ignore denormal mode -fatomic-remote-memory May have atomic operations on remote memory -fauto-import MinGW specific. Enable code generation support for automatic dllimport, and enable support for it in the linker. Enabled by default. -fbasic-block-address-map Emit the basic block address map section. -fbasic-block-sections= Place each function's basic blocks in unique sections (ELF Only) -fbinutils-version= Produced object files can use all ELF features supported by this binutils version and newer. If -fno-integrated-as is specified, the generated assembly will consider GNU as support. 'none' means that all ELF features can be used, regardless of binutils support. Defaults to 2.26. -fblocks Enable the 'blocks' language feature -fborland-extensions Accept non-standard constructs supported by the Borland compiler -fbounds-safety-adoption-mode Enable generating improved -fbounds-safety diagnostics to aid engineers adopting -fbounds-safety. This is off by default to avoid impacting compile times -fbounds-safety-bringup-missing-checks= Enable a set of new -fbounds-safety run-time checks, (option: access_size, indirect_count_update, return_size, ended_by_lower_bound, compound_literal_init, libc_attributes, array_subscript_agg, all, batch_0) -fbounds-safety-bringup-missing-checks Enable new -fbounds-safety run-time checks -fbounds-safety-debug-trap-reasons= 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`. -fbounds-safety-relaxed-system-headers Enable relaxed bounds safety rules for code in system headers -fbounds-safety-soft-traps= Enables soft traps which causes the compiler to emit a non-fatal instruction sequence when a bounds check fails. After this instruction sequence execution resumes as if the bounds check had succeeded.For `call-*` modes see 'bounds_safety_soft_traps.h' for the runtime function interface. This option supports the following modes: `none` - No soft traps, i.e. use hard traps (default).`call-with-str` - Emit a call to a runtime function that receives the trap reason as a string.`call-minimal` - Emit a call to a runtime function that takes no arguments and uses a custom calling convention if possible. This is better for codesize than `call-with-str` but is harder to debug if debug info is missing. -fbounds-safety-unique-traps Make trap instructions unique by preventing traps from being merged by the optimizer. This is useful for preserving the debug information on traps in optimized code. This makes it easier to debug programs at the cost of increased code size -fbounds-safety Enable bounds safety extension for C -fbuild-session-file= Use the last modification time of as the build session timestamp -fbuild-session-timestamp=