CLANG-22(1)
๐ clang-22 ๐
okay bestie, welcome to CLANG-22(1) โ yes that's the User Commands section, section 1, you're in the right place ๐ . This is the clang LLVM compiler for oneAPI and she is that girl. Buckle up, this page is a whole saga (it comes in 14 parts, we're on part 1, don't you dare skip ahead).
๐ธ NAME ๐ธ
clang-22 โ clang LLVM compiler for oneAPI โจ
โจ DESCRIPTION โจ
OVERVIEW: clang LLVM compiler ๐ซถ
USAGE:
clang-22 [options] file...
Like, you give her some file...s and some [options] and she does her little compiler thing. iconic.
๐ OPTIONS ๐
okay so this is the big list, stay with me, we're going through ALL of them, no skipping (iykyk ๐ญ):
-###โ Print (but do not run) the commands that would be run for this compilation. It's giving "let me show you my outfit before I leave the house" ๐--analyzer-output <value>โ the report output format for the static analyzer. Pick your fighter:html,plist,plist-multi-file,plist-html,sarif,sarif-html, ortext.--analyzeโ Run the static analyzer. she's judging your code (lovingly) ๐-B <prefix>โ Search$prefix$filefor executables, libraries, and data files. If$prefixis a directory, search$prefix/$fileinstead.-b <arg>โ Pass-b <arg>to the linker on AIX.-CCโ Include comments from within macros in the preprocessed output. yes comments inside macros, she sees everything ๐-cl-denorms-are-zeroโ OpenCL only. Allow denormals to be flushed to zero.-cl-ext=<value>โ 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-onlyand-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. precision queen ๐-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=<value>โ 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 toclEnqueueNDRangeKernel.-cl-unsafe-math-optimizationsโ OpenCL only. Allow unsafe floating-point optimizations. Also implies-cl-no-signed-zerosand-cl-mad-enable. โ ๏ธ unsafe is right there in the name bestie.-clangir-disable-passesโ Disable CIR transformations pipeline.-clangir-disable-verifierโ ClangIR: Disable MLIR module verifier.--config=<file>โ Specify configuration file.--cuda-compile-host-deviceโ Compile CUDA code for both host and device (this is the default, she's an overachiever). 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.-cxx-isystem <directory>โ Add directory to the C++ SYSTEM include search path.-Cโ Include comments in preprocessed output.-cโ Only run preprocess, compile, and assemble steps. short and efficient, we respect her ๐-darwin-target-variant-triple <value>โ Specify the darwin target variant triple.-darwin-target-variant <value>โ Generate code for an additional runtime variant of the deployment target.-dDโ Print macro definitions in-Emode in addition to normal output.-dependency-dot <value>โ Filename to write DOT-formatted header dependencies to.-dependency-file <value>โ Filename (or-) to write dependency output to.-dIโ Print include directives in-Emode in addition to normal output.-dMโ Print macro definitions in-Emode instead of normal output.-dsym-dir <dir>โ Directory to output dSYM's (if any) to.-dumpdir <dumppfx>โ Use<dumpfpx>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 <macro>=<value>โ Define<macro>to<value>(or1if<value>omitted).--embed-dir=<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=<value>โ 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>โNmust be a power of two. Align loops to the boundary.-faligned-allocationโ Enable C++17 aligned allocation functions.-falloc-token-max=<N>โ Limit to maximumNallocation tokens (0= targetSIZE_MAX).-fallow-editor-placeholdersโ Treat editor placeholders as valid source code.-fallow-runtime-check-skip-hot-cutoff=<value>โ Exclude__builtin_allow_runtime_checkfor the top hottest code responsible for the given fraction of PGO counters (0.0[default] = skip none;1.0= skip all). Argument format:<value>.-faltivec-src-compat=<value>โ 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. colorful errors, we love to see it ๐-fapinotes-modulesโ Enable module-based external API notes support.-fapinotes-swift-version=<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 packhandling.-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=<value>โ Place each function's basic blocks in unique sections (ELF Only).-fbinutils-version=<major.minor>โ Produced object files can use all ELF features supported by this binutils version and newer. If-fno-integrated-asis specified, the generated assembly will consider GNU as support.'none'means that all ELF features can be used, regardless of binutils support. Defaults to2.26.-fblocksโ Enable the'blocks'language feature.-fborland-extensionsโ Accept non-standard constructs supported by the Borland compiler.-fbuild-session-file=<file>โ Use the last modification time of<file>as the build session timestamp.-fbuild-session-timestamp=<time since Epoch in seconds>โ Time when the current build session started.-fbuiltin-module-mapโ Load the clang builtins module map file.-fc++-abi=<value>โ C++ ABI to use. This will override the target C++ ABI.-fc++-static-destructors=<value>โ Controls which variables C++ static destructors are registered for.-fcall-saved-x10โ Make thex10register call-saved (AArch64 only).-fcall-saved-x11โ Make thex11register call-saved (AArch64 only).-fcall-saved-x12โ Make thex12register call-saved (AArch64 only).
okay that's the vibe so far, and there is so much more coming in the next parts โ don't go anywhere ๐
-fcall-saved-x13โ makes thex13register call-saved ๐ (AArch64 only)-fcall-saved-x14โ makes thex14register call-saved ๐ (AArch64 only)-fcall-saved-x15โ makes thex15register call-saved ๐ (AArch64 only)-fcall-saved-x18โ makes thex18register call-saved ๐ (AArch64 only)-fcall-saved-x8โ makes thex8register call-saved ๐ (AArch64 only)-fcall-saved-x9โ makes thex9register call-saved ๐ (AArch64 only)-fcaret-diagnostics-max-lines=<value>โ caps how many source lines get shown in a caret diagnostic. Set it to0and there's, like, no limit at all โจ-fcf-protection=<value>โ instruments control-flow architecture protection ๐ก๏ธ-fcf-protectionโ turns cf-protection on in'full'mode, periodt ๐-fchar8_tโ enables the C++ builtin typechar8_t๐ธ-fcheck-newโ don't assume C++operator newmight not returnNULL๐ซถ-fclang-abi-compat=<version>โ tries to match the ABI of Clang<version>๐-fclangirโ uses the ClangIR pipeline to compile ๐ฅ-fcodegen-data-generate=<path>โ emits codegen data into the object file. LLD for MachO (currently) merges them into the<path>you specified ๐พ-fcodegen-data-generateโ emits codegen data into the object file. LLD for MachO (currently) merges them intodefault.cgdata๐พ-fcodegen-data-use=<path>โ uses codegen data read from the<path>you gave it ๐-fcodegen-data-useโ uses codegen data read fromdefault.cgdatato optimize the binary ๐-fcolor-diagnosticsโ enables colors in diagnostics ๐โจ-fcomment-block-commands=<arg>โ treats each comma separated argument inside<arg>as a documentation comment block command ๐-fcommonโ places uninitialized global variables in a common block ๐งฑ-fcomplete-member-pointersโ requires member pointer base types to be complete if they'd be significant under the Microsoft ABI ๐-fcomplex-arithmetic=<value>โ controls the calculation methods used for complex number multiplication and division ๐งฎ-fconstexpr-backtrace-limit=<value>โ sets the max number of entries to print in a constexpr evaluation backtrace (0= no limit) ๐-fconstexpr-depth=<value>โ sets the max depth of recursive constexpr function calls ๐-fconstexpr-steps=<value>โ sets the max number of steps in constexpr function evaluation (0= no limit) ๐-fconvergent-functionsโ assumes all functions may be convergent ๐ค-fcoro-aligned-allocationโ prefers aligned allocation for C++ Coroutines ๐-fcoroutinesโ enables support for the C++ Coroutines ๐-fcoverage-compilation-dir=<value>โ the compilation directory to embed in the coverage mapping ๐-fcoverage-mappingโ generates coverage mapping so you can do code coverage analysis ๐-fcoverage-mcdcโ enables MC/DC criteria when generating code coverage ๐-fcoverage-prefix-map=<old>=<new>โ remaps file source paths<old>to<new>in coverage mapping. Heads up bestie: if there are multiple options, prefix replacement is applied in reverse order, starting from the last one ๐-fcrash-diagnostics-dir=<dir>โ puts crash-report files in<dir>๐ฅ-fcrash-diagnostics=<value>โ sets the level of crash diagnostic reporting (option:off,compiler,all) ๐ฅ-fcrash-diagnosticsโ enables crash diagnostic reporting (this is the default btw) ๐ฅ-fcs-profile-generate=<directory>โ generates instrumented code to collect context sensitive execution counts into<directory>/default.profraw(overridden by theLLVM_PROFILE_FILEenv var) ๐-fcs-profile-generateโ generates instrumented code to collect context sensitive execution counts intodefault.profraw(overridden by theLLVM_PROFILE_FILEenv var) ๐-fcuda-prec-sqrtโ specifies thatsqrtis correctly rounded (for CUDA devices) ๐ฏ-fcuda-short-ptrโ uses 32-bit pointers for accessing const/local/shared address spaces ๐ฏ-fcx-fortran-rulesโ range reduction is enabled for complex arithmetic operations ๐งฎ-fcx-limited-rangeโ basic algebraic expansions of complex arithmetic operations involving are enabled ๐งฎ-fcxx-exceptionsโ enables C++ exceptions ๐จ-fcxx-modulesโ enables modules for C++ ๐ฆ-fdata-sectionsโ places each data in its own section ๐๏ธ-fdebug-compilation-dir=<value>โ the compilation directory to embed in the debug info ๐-fdebug-default-version=<value>โ the default DWARF version to use, if a-goption caused DWARF debug info to be produced ๐-fdebug-info-for-profilingโ emits extra debug info to make the sample profile more accurate ๐ฏ-fdebug-macroโ emits macro debug information ๐-fdebug-prefix-map=<old>=<new>โ for paths in debug info, remaps directory<old>to<new>. If multiple options match a path, the last option wins ๐-fdebug-ranges-base-addressโ uses DWARF base address selection entries in.debug_ranges๐-fdebug-types-sectionโ places debug types in their own section (ELF Only) ๐-fdeclspecโ allows__declspecas a keyword ๐-fdefer-tsโ enables support for the C'_Defer'Technical Specification โณ-fdefine-target-os-macrosโ enables predefined target OS macros ๐-fdelayed-template-parsingโ parses templated function definitions at the end of the translation unit โฐ-fdelete-null-pointer-checksโ treats usage of null pointers as undefined behavior (and yes, this is the default) ๐-fdevirtualize-speculativelyโ enables speculative devirtualization optimization ๐ฎ-fdiagnostics-absolute-pathsโ prints absolute paths in diagnostics ๐-fdiagnostics-color=<value>โ when to use colors in diagnostics ๐-fdiagnostics-hotness-threshold=<value>โ prevents optimization remarks from being output if they don't have at least this profile count. Use'auto'to apply the threshold from the profile summary ๐ฅ-fdiagnostics-misexpect-tolerance=<value>โ prevents misexpect diagnostics from being output if the profile counts are within N% of the expected ๐-fdiagnostics-parseable-fixitsโ prints fix-its in machine parseable form ๐ค-fdiagnostics-print-source-range-infoโ prints source range spans in numeric form ๐ข-fdiagnostics-show-hotnessโ enables profile hotness information in the diagnostic line ๐ฅ-fdiagnostics-show-note-include-stackโ displays include stacks for diagnostic notes ๐-fdiagnostics-show-optionโ prints the option name along with mappable diagnostics ๐ท๏ธ-fdiagnostics-show-template-treeโ prints a template comparison tree for differing templates ๐ณ-fdigraphsโ enables alternative token representations'<:',':>','<%','%>','%:','%:%:'(this one's the default btw) โจ-fdirect-access-external-dataโ don't use GOT indirection to reference external data symbols ๐-fdisable-block-signature-stringโ disable block signature string ๐-fdiscard-value-namesโ discards value names in LLVM IR ๐๏ธ-fdollars-in-identifiersโ allows'$'in identifiers ๐ฐ-fdriver-onlyโ only runs the driver ๐-fdwarf-exceptionsโ uses DWARF style exceptions ๐-feliminate-unused-debug-typesโ do not emit debug info for defined but unused types ๐ซ-fembed-bitcode-markerโ embeds placeholder LLVM IR data as a marker ๐-fembed-bitcode=<option>โ embeds LLVM bitcode ๐พ-fembed-bitcodeโ embeds LLVM IR bitcode as data ๐พ-fembed-offload-object=<value>โ embeds Offloading device-side binary into the host object file as a section ๐ฆ-femit-all-declsโ emits all declarations, even if unused ๐ข-femit-compact-unwind-non-canonicalโ tries emitting Compact-Unwind for non-canonical entries. This maybe gets overridden by other constraints ๐-femit-dwarf-unwind=<value>โ when to emit DWARF unwind (EH frame) info ๐-femulated-tlsโ uses emutls functions to access thread_local variables ๐งต-fenable-matrixโ enables the matrix data type and related builtin functions ๐ข-fexceptionsโ enables support for exception handling ๐จ-fexcess-precision=<value>โ lets you control excess precision on targets where native support for the precision types isn't available. By default, excess precision is used to calculate intermediate results following the rules specified in ISO C99 ๐ฏ-fexperimental-call-graph-sectionโ emits a call graph section ๐ธ๏ธ-fexperimental-late-parse-attributesโ enables experimental late parsing of attributes ๐งช-fexperimental-libraryโ controls 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-loop-fusionโ enable the loop fusion pass ๐-fexperimental-new-constant-interpreterโ enables the experimental new constant interpreter ๐งช-fexperimental-openacc-macro-override <value>โ overrides the_OPENACCmacro value for experimental testing during OpenACC support development ๐งช-fexperimental-relative-c++-abi-vtablesโ uses the experimental C++ class ABI for classes with virtual tables ๐งช-fexperimental-sanitize-metadata-ignorelist=<value>โ disables sanitizer metadata for modules and functions that match the provided special case list ๐-fexperimental-sanitize-metadata=<value>โ specifies the type of metadata to emit for binary analysis sanitizers ๐งช-fexperimental-strict-floating-pointโ enables the use of non-default rounding modes and non-default exception handling on targets that are not currently ready ๐ฌ (like, it literally says they're not ready bestie)-fextend-arguments=<value>โ controls how scalar integer arguments are extended in calls to unprototyped and varargs functions ๐-fextend-variable-liveness=<value>โ extends the liveness of user variables through optimizations to prevent stale or optimized-out variable values when debugging ๐-fextend-variable-livenessโ alias for-fextend-variable-liveness=all๐-ffast-mathโ allows aggressive, lossy floating-point optimizations โก (emphasis on lossy, it's giving risky)-ffat-lto-objectsโ enables fat LTO object support ๐-ffile-compilation-dir=<value>โ tells the compiler which compilation directory to bake into the debug info and the coverage mapping. like, so your debugger knows where home is ๐-ffile-prefix-map=<value>โ remaps file source paths everywhere it matters: debug info, coverage mapping, predefined preprocessor macros, and__builtin_FILE(). it also implies-ffile-reproducible, so you get that for free โจ-ffile-reproducibleโ uses the target's platform-specific path separator character when it expands the__FILE__macro. yes bestie, that's the whole thing ๐-ffine-grained-bitfield-accessesโ uses separate accesses for consecutive bitfield runs whose widths and alignments are legal. small bites, cuter bites ๐-ffinite-loopsโ assumes all non-trivial loops are finite. bold assumption, hope it's right ๐ญ-ffinite-math-onlyโ allows floating-point optimizations that assume arguments and results are not NaNs or +-inf. and it defines the__FINITE_MATH_ONLY__preprocessor macro. so if your math is cursed, this is gonna be a whole situation ๐-ffixed-a0โ reserve thea0register (M68k only)-ffixed-a1โ reserve thea1register (M68k only)-ffixed-a2โ reserve thea2register (M68k only)-ffixed-a3โ reserve thea3register (M68k only)-ffixed-a4โ reserve thea4register (M68k only)-ffixed-a5โ reserve thea5register (M68k only)-ffixed-a6โ reserve thea6register (M68k only)-ffixed-d0โ reserve thed0register (M68k only)-ffixed-d1โ reserve thed1register (M68k only)-ffixed-d2โ reserve thed2register (M68k only)-ffixed-d3โ reserve thed3register (M68k only)-ffixed-d4โ reserve thed4register (M68k only)-ffixed-d5โ reserve thed5register (M68k only)-ffixed-d6โ reserve thed6register (M68k only)-ffixed-d7โ reserve thed7register (M68k only)
okay so this is where it gets VERY "reserve the register" โ the compiler is basically moving in and claiming the good seats and you cannot sit there. no cap. moving on to the SPARC benches ๐
-ffixed-g1โ reserve theG1register (SPARC only)-ffixed-g2โ reserve theG2register (SPARC only)-ffixed-g3โ reserve theG3register (SPARC only)-ffixed-g4โ reserve theG4register (SPARC only)-ffixed-g5โ reserve theG5register (SPARC only)-ffixed-g6โ reserve theG6register (SPARC only)-ffixed-g7โ reserve theG7register (SPARC only)-ffixed-i0โ reserve theI0register (SPARC only)-ffixed-i1โ reserve theI1register (SPARC only)-ffixed-i2โ reserve theI2register (SPARC only)-ffixed-i3โ reserve theI3register (SPARC only)-ffixed-i4โ reserve theI4register (SPARC only)-ffixed-i5โ reserve theI5register (SPARC only)-ffixed-l0โ reserve theL0register (SPARC only)-ffixed-l1โ reserve theL1register (SPARC only)-ffixed-l2โ reserve theL2register (SPARC only)-ffixed-l3โ reserve theL3register (SPARC only)-ffixed-l4โ reserve theL4register (SPARC only)-ffixed-l5โ reserve theL5register (SPARC only)-ffixed-l6โ reserve theL6register (SPARC only)-ffixed-l7โ reserve theL7register (SPARC only)-ffixed-o0โ reserve theO0register (SPARC only)-ffixed-o1โ reserve theO1register (SPARC only)-ffixed-o2โ reserve theO2register (SPARC only)-ffixed-o3โ reserve theO3register (SPARC only)-ffixed-o4โ reserve theO4register (SPARC only)-ffixed-o5โ reserve theO5register (SPARC only)-ffixed-pointโ enable fixed point types. it's giving "decimals but obsessed with staying put" ๐ธ-ffixed-r19โ reserve registerr19(Hexagon only)-ffixed-r9โ reserve ther9register (ARM only)
and now we get to the AArch64/RISC-V section, which is literally just "reserve the x-something register" for like thirty options. it's iconic actually. the compiler said "everybody gets a boundary" ๐
-ffixed-x10โ reserve thex10register (AArch64/RISC-V only)-ffixed-x11โ reserve thex11register (AArch64/RISC-V only)-ffixed-x12โ reserve thex12register (AArch64/RISC-V only)-ffixed-x13โ reserve thex13register (AArch64/RISC-V only)-ffixed-x14โ reserve thex14register (AArch64/RISC-V only)-ffixed-x15โ reserve thex15register (AArch64/RISC-V only)-ffixed-x16โ reserve thex16register (AArch64/RISC-V only)-ffixed-x17โ reserve thex17register (AArch64/RISC-V only)-ffixed-x18โ reserve thex18register (AArch64/RISC-V only)-ffixed-x19โ reserve thex19register (AArch64/RISC-V only)-ffixed-x1โ reserve thex1register (AArch64/RISC-V only)-ffixed-x20โ reserve thex20register (AArch64/RISC-V only)-ffixed-x21โ reserve thex21register (AArch64/RISC-V only)-ffixed-x22โ reserve thex22register (AArch64/RISC-V only)-ffixed-x23โ reserve thex23register (AArch64/RISC-V only)-ffixed-x24โ reserve thex24register (AArch64/RISC-V only)-ffixed-x25โ reserve thex25register (AArch64/RISC-V only)-ffixed-x26โ reserve thex26register (AArch64/RISC-V only)-ffixed-x27โ reserve thex27register (AArch64/RISC-V only)-ffixed-x28โ reserve thex28register (AArch64/RISC-V only)-ffixed-x29โ reserve thex29register (AArch64/RISC-V only)-ffixed-x2โ reserve thex2register (AArch64/RISC-V only)-ffixed-x30โ reserve thex30register (AArch64/RISC-V only)-ffixed-x31โ reserve thex31register (AArch64/RISC-V only)-ffixed-x3โ reserve thex3register (AArch64/RISC-V only)-ffixed-x4โ reserve thex4register (AArch64/RISC-V only)-ffixed-x5โ reserve thex5register (AArch64/RISC-V only)-ffixed-x6โ reserve thex6register (AArch64/RISC-V only)-ffixed-x7โ reserve thex7register (AArch64/RISC-V only)-ffixed-x8โ reserve thex8register (AArch64/RISC-V only)-ffixed-x9โ reserve thex9register (AArch64/RISC-V only)
periodt. register drama over, back to your regularly scheduled compiler flags ๐ฆ
-fforce-check-cxx20-modules-input-filesโ checks the input source files from C++20 modules explicitly. no vibes-based skipping allowed ๐-fforce-dwarf-frameโ always emit a debug frame section. always always ๐-fforce-emit-vtablesโ emits more virtual tables to improve devirtualization. more tables, more devirtualizing, we love to see it โจ-fforce-enable-int128โ enable support for theint128_ttype. big numbers, big energy ๐-ffp-accuracy=<value>โ specifies the required accuracy for floating-point operations and library calls.-ffp-contract=<value>โ forms fused FP ops (e.g. FMAs)-ffp-eval-method=<value>โ specifies the evaluation method to use for floating-point arithmetic.-ffp-exception-behavior=<value>โ specifies the exception behavior of floating-point operations.-ffp-model=<value>โ controls the semantics of floating-point calculations.-ffreestandingโ asserts that the compilation takes place in a freestanding environment. no host, no problem ๐ง-ffuchsia-api-level=<value>โ sets the Fuchsia API level.-ffunction-sectionsโ puts each function in its own section. everyone gets their own room, main character energy fr fr ๐-fglobal-iselโ enables the global instruction selector.-fgnu-keywordsโ allows GNU-extension keywords regardless of the language standard. rules? never heard of her ๐-fgnu-runtimeโ generates output compatible with the standard GNU Objective-C runtime.-fgnu89-inlineโ uses the gnu89 inline semantics.-fgnuc-version=<value>โ sets various macros to claim compatibility with the given GCC version; the default is4.2.1. yes bestie, it just says it's that version. fake it till you make it ๐-fgpu-allow-device-initโ allow device side init function in HIP (experimental). it's marked experimental so treat it like a situationship, careful ๐ญ-fgpu-approx-transcendentalsโ use approximate transcendental functions.-fgpu-default-stream=<value>โ specify default stream. the default value islegacy. (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.-fheinous-gnu-extensionsโ (deprecated) controls whether-Winvalid-gnu-asm-castdefaults to an error or a warning. deprecated bestie, it's giving "we don't do that anymore" ๐-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.-fhlsl-strict-availabilityโ enables strict availability diagnostic mode for HLSL built-in functions.-fhonor-infinitiesโ specify that floating-point optimizations are not allowed that assume arguments and results are not +-inf. so infinity gets respect ๐-fhonor-nansโ specify that floating-point optimizations are not allowed that assume arguments and results are not NANs. NaN rights ๐ซถ-fignore-exceptionsโ enable support for ignoring exception handling constructs. we simply do not perceive them โจ-fimplicit-module-mapsโ implicitly search the file system for module map files.-fincremental-extensionsโ enable incremental processing extensions such as processing statements on the global scope.-finit-global-zeroโ zero initialize globals without default initialization (default). it's the default, so like, it's already doing this unless you said otherwise ๐-finline-functionsโ inline suitable functions.-finline-hint-functionsโ inline functions which are (explicitly or implicitly) marked inline.-finline-max-stacksize=<value>โ suppress inlining of functions whose stack size exceeds the given value. if your stack is too thicc, you're not coming in ๐-finput-charset=<value>โ specify the default character set for source files.-finstrument-function-entry-bareโ instrument function entry only, after inlining, without arguments to the instrumentation call.-finstrument-functions-after-inliningโ like-finstrument-functions, but insert the calls after inlining.-finstrument-functionsโ generate calls to instrument function entry and exit.-fintegrated-asโ enable the integrated assembler.-fintegrated-cc1โ run cc1 in-process.-fintegrated-objemitterโ use internal machine object code emitter.-fjmcโ enable just-my-code debugging.-fjump-tablesโ use jump tables for lowering switches.-fkeep-persistent-storage-variablesโ keeps every variable with persistent storage duration alive and well, so globals, statics and thread-local variables all get to stay ๐ the whole point is guaranteeing you can directly address them, bestie.-fkeep-static-constsโ keeps thosestatic constvariables around even when nobody's using them ๐ฅบ no variable left behind fr fr.-fkeep-system-includesโ okay so instead of expanding system headers when you're emitting preprocessor output, this one preserves the#includedirective โจ super handy when you're making preprocessed output for test case reduction. But listen: it can produce incorrect output if preprocessor symbols that control the included content (like_XOPEN_SOURCE) are defined in the including source file ๐ญ and, ngl, the portability of the resulting source to other compilation environments is not guaranteed. Only valid with-E, periodt.-flax-vector-conversions=<value>โ turns on implicit vector bit-casts ๐ฆ let them cast, let them slay.-flink-huge-device-codeโ generates and uses a custom linker script for those huge device code sections ๐ big section energy.-floop-interchangeโ enables the loop interchange pass ๐ iconic compiler optimization behavior.-flto-jobs=<value>โ controls the backend parallelism of-flto=thinโจ and the default of0means the number of threads gets derived from the number of CPUs detected, so basically it counts your cores and goes off ๐-flto-partitions=<value>โ how many partitions to use for parallel full LTO codegen.ld.lldonly, just so you know ๐ซถ-flto=autoโ enables LTO in'full'mode ๐ฅ-flto=jobserverโ enables LTO in'full'mode ๐ฅ (same mode, different flavor of "yes").-flto=<value>โ sets the LTO mode โ๏ธ you pick, it does.-fltoโ enables LTO in'full'mode ๐-fmacro-backtrace-limit=<value>โ sets the max number of entries to print in a macro expansion backtrace, and0= no limit ๐ (yes, "no limit" is a real choice and it is chaotic of you).-fmacro-prefix-map=<value>โ remaps file source paths inside predefined preprocessor macros and__builtin_FILE()๐ and heads up, it implies-ffile-reproducible.-fmath-errnoโ requires math functions to indicate errors by settingerrno๐จ they gotta tell you when something's wrong, communication is key bestie.-fmatrix-memory-layout=<value>โ sets the matrix memory layout, either row-major or column-major ๐ pick your lane.-fmax-tokens=<value>โ the max total number of preprocessed tokens, used for-Wmax-tokens. ๐งฎ-fmax-type-align=<value>โ specifies the maximum alignment to enforce on pointers that don't have an explicit alignment ๐.-fmemory-profile-use=<pathname>โ uses a memory profile for profile-guided memory optimization ๐ง โจ.-fmemory-profile=<directory>โ enables heap memory profiling and dumps the results into<directory>๐.-fmemory-profileโ enables heap memory profiling, no directory specified, no notes ๐.-fmerge-all-constantsโ allows merging of constants ๐ซ let the constants be friends.-fmessage-length=<value>โ formats message diagnostics so they fit within N columns ๐ tidy little diagnostics, we love to see it.-fminimize-whitespaceโ ignores the whitespace from the input file when emitting preprocessor output ๐ธ it'll only contain whitespace when it's necessary, e.g. to keep two minus signs from merging into an increment operator. Super useful with the-Poption to normalize whitespace such that two files with only formatting changes come out equal โจ Important: only valid with-Eon C-like inputs, and it's incompatible with-traditional-cpp๐ญ pick one, you can't have both.-fmodule-file=[<name>=]<file>โ specifies the mapping of module name to precompiled module file, or just loads a module file if the name is omitted ๐ flexible.-fmodule-header=<kind>โ builds a C++20 Header Unit from a header that should be found in the user search path (fmodule-header=user) or the system search path (fmodule-header=system) ๐.-fmodule-headerโ builds a C++20 Header Unit from a header ๐ the short version.-fmodule-map-file=<file>โ loads this module map file ๐.-fmodule-name=<name>โ specifies the name of the module to build ๐ท๏ธ name it, claim it.-fmodule-output=<value>โ saves intermediate module file results when compiling a standard C++ module unit ๐พ.-fmodule-outputโ saves intermediate module file results when compiling a standard C++ module unit ๐พ (same deal, no argument).-fmodulemap-allow-subdirectory-searchโ allows searching for module maps in subdirectories of search paths ๐๏ธ dig deeper.-fmodules-cache-path=<directory>โ specifies the module cache path ๐งบ where the modules go to chill.-fmodules-decluseโ requires declaration of modules used within a module ๐ no sneaky undeclared usage.-fmodules-disable-diagnostic-validationโ disables validation of the diagnostic options when loading the module ๐.-fmodules-embed-all-files<value>โ embeds the contents of all files read by this compilation into the produced module file ๐ฆ everything, in the box.-fmodules-force-validate-user-headersโ forces validation of user headers when repeatedly loading a module file within a single build session ๐.-fmodules-ignore-macro=<value>โ ignores the definition of the given macro when building and loading modules ๐ โ๏ธ.-fmodules-prune-after=<seconds>โ specifies the interval (in seconds) after which a module file will be considered unused โณ.-fmodules-prune-interval=<seconds>โ specifies the interval (in seconds) between attempts to prune the module cache ๐งน.-fmodules-reduced-bmiโ generates the reduced BMI โจ.-fmodules-search-allโ searches even non-imported modules to resolve references ๐.-fmodules-strict-decluseโ like-fmodules-declusebut requires all headers to be in modules ๐ค stricter, no exceptions.-fmodules-user-build-path<directory>โ specifies the module user build path ๐ ๏ธ.-fmodules-validate-input-files-contentโ validates PCM input files based on content if themtimediffers ๐ต๏ธ content over timestamps.-fmodules-validate-once-per-build-sessionโ doesn't verify input files for the modules if the module has already been successfully validated or loaded during this build session โ trust the process.-fmodules-validate-system-headersโ validates the system headers that a module depends on when loading the module ๐ฉบ.-fmodulesโ enables the'modules'language feature ๐ซ.-fms-compatibility-version=<value>โ a dot-separated value representing the Microsoft compiler version number to report in_MSC_VER, and0= don't define it (that's the default) ๐ช.-fms-compatibilityโ enables full Microsoft Visual C++ compatibility ๐งฉ.-fms-define-stdcโ defines'__STDC__'to'1'in MSVC Compatibility mode ๐ท๏ธ.-fms-extensionsโ accepts some non-standard constructs supported by the Microsoft compiler ๐ค.-fms-hotpatchโ ensures that all functions can be hotpatched at runtime ๐ฅ๐ฉน.-fms-runtime-lib=<value>โ selects the 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>โ a list of mangled symbol names of functions that should be hot-patched for Windows Secure Hot-Patching ๐๐.-fms-volatileโ volatile loads and stores have acquire and release semantics โก.-fmsc-version=<value>โ Microsoft compiler version number to report in_MSC_VER, and0= don't define it (default) ๐ช.-fnamed-loopsโ enables support for named loops ๐ท๏ธ๐.-fnew-alignment=<align>โ specifies the largest alignment guaranteed by'::operator new(size_t)'๐.-fnew-infallibleโ enables treating throwing global C++operator newas always returning valid memory ๐ it annotates with__attribute__((returns_nonnull))andthrow(). And yes, this is detectable in source ๐.-fno-aapcs-bitfield-widthโ does not follow the AAPCS standard requirement stating that volatile bit-field width is dictated by the field container type ๐ซ๐ (ARM only).-fno-access-controlโ disables C++ access control ๐ private? never heard of her.-fno-addrsigโ doesn't emit an address-significance table ๐ .-fno-apinotes-modulesโ disables module-based external API notes support ๐๐ซ.-fno-apinotesโ disables external API notes support ๐ซ.-fno-assume-sane-operator-newโ doesn't assume that C++'s globaloperator newcan't alias any pointer ๐คจ assume nothing bestie.-fno-assume-unique-vtablesโ disables optimizations based on vtable pointer identity ๐งฌ.-fno-assumptionsโ disables codegen and compile-time checks for C++23's[[assume]]attribute ๐ซ๐ค.-fno-atomic-fine-grained-memoryโ assumes no atomic operations on fine-grained memory ๐งต.-fno-atomic-ignore-denormal-modeโ disallows atomic operations from ignoring denormal mode ๐ซ๐.-fno-atomic-remote-memoryโ assumes no atomic operations on remote memory ๐ก.-fno-auto-importโ MinGW specific ๐ง disables support for automaticdllimportin code generation and linking.-fno-autolinkโ disables generation of linker directives for automatic library linking ๐๐ซ.-fno-builtin-<value>โ disables implicit builtin knowledge of one specific function ๐ฏ.-fno-builtinโ disables implicit builtin knowledge of functions, full stop ๐.-fno-bundle-offload-archโ specifies that the offload bundler should not identify a bundle with a specific arch ๐ฆ so like, for example, the bundle fornvptx64-nvidia-cuda-sm_80uses the bundle tagnvptx64-nvidia-cudawhen used. This lets.ofiles contain.bcbundles that are unspecific to a particular arch version โจ.-fno-c++-static-destructorsโ disables C++ static destructor registration ๐ซ๐.-fno-char8_tโ disables the C++ builtin typechar8_t๐ก๐ซ.-fno-clangirโ uses the AST -> LLVM pipeline to compile ๐ณโก๏ธ๐ง.-fno-color-diagnosticsโ disables colors in diagnostics ๐๐ซ (sad, but sometimes necessary).-fno-commonโ compiles common globals like normal definitions ๐ฆ.-fno-complete-member-pointersโ does not require member pointer base types to be complete if they would be significant under the Microsoft ABI ๐ช๐ซ.-fno-constant-cfstringsโ disables creation of CodeFoundation-type constant strings ๐ซ๐.-fno-coverage-mappingโ disables code coverage analysis ๐๐ซ.-fno-coverage-mcdcโ disables MC/DC coverage criteria ๐ซ๐งช.-fno-crash-diagnosticsโ disables auto-generation of preprocessed source files and a script for reproduction when clang crashes ๐ฅ๐ซ (so when it goes down, it goes down quietly, your call bestie).-fno-cuda-prec-sqrtโ doesn't specify thatsqrtis correctly rounded, for CUDA devices ๐ฎ๐.-fno-cx-fortran-rulesโ range reduction is disabled for complex arithmetic operations ๐๐ซ.-fno-cx-limited-rangeโ basic algebraic expansions of complex arithmetic operations involving are disabled ๐ (yes, that's the exact wording, keeping it verbatim for you).-fno-cxx-modulesโ disables modules for C++ ๐ซ๐ฆ.-fno-debug-macroโ does not emit macro debug information ๐๐ซ.-fno-declspecโ disallows__declspecas a keyword ๐ซ๐.-fno-define-target-os-macrosโ disables predefined target OS macros ๐ฅ๏ธ๐ซ.-fno-delayed-template-parsingโ Disable delayed template parsing. No more waiting around, bestie. โจ-fno-delete-null-pointer-checksโ Do not treat usage of null pointers as undefined behavior. live your null-pointer truth, lowkey. ๐ฆ-fno-diagnostics-fixit-infoโ Do not include fixit information in diagnostics. no little hints, just vibes. ๐-fno-diagnostics-show-line-numbersโ Show line numbers in diagnostic code snippets. yes literally "Show" even though it's-fno, the page said it, periodt. ๐-fno-digraphsโ Disallow alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:'. no digraphs allowed, sorry not sorry. ๐-fno-direct-access-external-dataโ Use GOT indirection to reference external data symbols. GOT indirection, iconic. ๐-fno-disable-block-signature-stringโ Don't disable block signature string) the stray)is part of the lore, bestie. ๐-fno-discard-value-namesโ Do not discard value names in LLVM IR. keep the names, they're main character energy. ๐ธ-fno-dollars-in-identifiersโ Disallow '$' in identifiers. no dollar signs in identifiers, even if capitalism said yes. ๐ธ-fno-elide-constructorsโ Disable C++ copy constructor elision. copy constructors stay visible, no cap. ๐ฆ-fno-elide-typeโ Do not elide types when printing diagnostics. full type names, no editing. โจ-fno-eliminate-unused-debug-typesโ Emit debug info for defined but unused types. even the unused types get their moment. ๐-fno-exceptionsโ Disable support for exception handling. no throw, no catch, just vibes. ๐-fno-experimental-late-parse-attributesโ Disable experimental late parsing of attributes. late parsing? not today. ๐ง-fno-experimental-loop-fusionโ DisableEnable the loop fusion pass. it really says "DisableEnable", I'm just the messenger ๐ญ ๐ฅ-fno-experimental-relative-c++-abi-vtablesโ Do not use the experimental C++ class ABI for classes with virtual tables. no experimental vtable ABI, bestie. ๐-fno-experimental-sanitize-metadata=<value>โ Disable emitting metadata for binary analysis sanitizers. metadata says bye. ๐-fno-fat-lto-objectsโ Disable fat LTO object support. no fat LTO objects. ๐-fno-file-reproducibleโ Use the host's platform-specific path separator character when expanding the__FILE__macro. platform-specific path separator, slay. ๐-fno-fine-grained-bitfield-accessesโ Use large-integer access for consecutive bitfield runs. large-integer access, period. ๐ฆ-fno-finite-loopsโ Do not assume that any loop is finite. infinite loops are valid, bestie. ๐ธ-fno-fixed-pointโ Disable fixed point types. fixed point? not here. โจ-fno-force-enable-int128โ Disable support for int128_t type. no int128_t forcing. ๐-fno-global-iselโ Disables the global instruction selector. global isel is off. ๐ง-fno-gnu-inline-asmโ Disable GNU style inline asm. no GNU inline asm, lowkey. ๐-fno-gpu-allow-device-initโ Don't allow device side init function in HIP (experimental). experimental HIP device init, blocked. ๐ฅ-fno-gpu-approx-transcendentalsโ Don't use approximate transcendental functions. no approximate transcendentals, bestie. ๐-fno-gpu-defer-diagโ Don't defer host/device related diagnostic messages for CUDA/HIP. diagnostics come through immediately. ๐-fno-hip-emit-relocatableโ Do not override toolchain to compile HIP source to relocatable. relocatable HIP? not overridden. ๐-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). HIP device only, bestie. ๐ฆ-fno-hip-kernel-arg-nameโ Don't specify that kernel argument names are preserved (HIP only). HIP only, no preservation. ๐ธ-fno-hip-new-launch-apiโ Don't use new kernel launching API for HIP. old API stays, period. โจ-fno-init-global-zeroโ Do not zero initialize globals without default initialization. no free zero init. ๐-fno-integrated-asโ Disable the integrated assembler. external assembler era. ๐ง-fno-integrated-cc1โ Spawn a separate process for each cc1. separate cc1 processes, every time. ๐ฅ-fno-integrated-objemitterโ Use external machine object code emitter. external object emitter, slay. ๐-fno-jump-tablesโ Do not use jump tables for lowering switches. no jump tables for switches. ๐-fno-keep-persistent-storage-variablesโ Disable keeping all variables that have a persistent storage duration, including global, static and thread-local variables, to guarantee that they can be directly addressed. persistent storage variables, not kept. ๐-fno-keep-static-constsโ Don't keep static const variables even if unused. unused static consts get yeeted. ๐ฆ-fno-knr-functionsโ Disable support for K&R C function declarations. K&R functions? no. ๐ธ-fno-link-huge-device-codeโ Do not generate or use a custom linker script for huge device code sections (default). this is the default, bestie. โจ-fno-loop-interchangeโ Disable the loop interchange pass. loop interchange off. ๐-fno-ltoโ Disable LTO mode (default). default behavior, no LTO. ๐ง-fno-memory-profileโ Disable heap memory profiling. no heap memory profiling. ๐ฅ-fno-merge-all-constantsโ Disallow merging of constants. constants stay separate, period. ๐-fno-modules-check-relocated<value>โ Skip checks for relocated modules when loading PCM files. PCM files, skip checks. ๐-fno-modules-force-validate-user-headersโ Do not force validation of user headers when repeatedly loading a module file within single build session. single build session, no force validation. ๐-fno-modules-validate-textual-header-includesโ Do not enforce-fmodules-decluseand private header restrictions for textual headers. This flag will be removed in a future Clang release. future removal warning, bestie. ๐ฆ-fno-ms-tls-guardsโ Do not emit code to perform on-demand initialization of thread-local variables. no MS TLS guards. ๐ธ-fno-new-infallibleโ Disable treating throwing global C++ operator new as always returning valid memory (annotates with__attribute__((returns_nonnull))andthrow()). This is detectable in source. detectable in source, no cap. โจ-fno-objc-avoid-heapify-local-blocksโ Don't try to avoid heapifying local blocks. local blocks get heapified. ๐-fno-objc-infer-related-result-typeโ do not infer Objective-C related result type based on method family. no inference from method family. ๐ง-fno-offload-fp32-prec-divโ fdiv operations in offload device code are not required to return correctly rounded results. offload fdiv, not correctly rounded required. ๐ฅ-fno-offload-fp32-prec-sqrtโ sqrt operations in offload device code are not required to return correctly rounded results. offload sqrt, same vibe. ๐-fno-offload-ltoโ Disable LTO mode (default) for offload compilation. default offload LTO off. ๐-fno-offload-uniform-blockโ Don't assume that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise). default true for CUDA/HIP, false otherwise. ๐-fno-offload-via-llvmโ Don't use LLVM/Offload as portable offloading runtime. no LLVM/Offload runtime. ๐ฆ-fno-openmp-extensionsโ Disable all Clang extensions for OpenMP directives and clauses. no OpenMP extensions. ๐ธ-fno-openmp-simdโ Do not emit code for any OpenMP constructs. no OpenMP code at all. โจ-fno-operator-namesโ Do not treat C++ operator name keywords as synonyms for operators. operator names are not synonyms. ๐-fno-optimize-sibling-callsโ Disable tail call optimization, keeping the call stack accurate. accurate call stack, period. ๐ง-fno-partition-static-data-sectionsโ Disable partition static data sections using profile information (x86 and aarch64 ELF). x86 and aarch64 ELF only. ๐ฅ-fno-pch-codegenโ Do not generate code for uses of this PCH that assumes an explicit object file will be built for the PCH. PCH codegen, no. ๐-fno-pch-debuginfoโ Do not generate debug info for types in an object file built from this PCH and do not generate them elsewhere. no PCH debuginfo. ๐-fno-pltโ Use GOT indirection instead of PLT to make external function calls (x86 only). x86 only, bestie. ๐-fno-preserve-as-commentsโ Do not preserve comments in inline assembly. inline asm comments, gone. ๐ฆ-fno-profile-generateโ Disable generation of profile instrumentation. no profile instrumentation. ๐ธ-fno-profile-instr-generateโ Disable generation of profile instrumentation. same as above, iconic. โจ-fno-profile-instr-useโ Disable using instrumentation data for profile-guided optimization. no PGO instrumentation data. ๐-fno-pseudo-probe-for-profilingโ Do not emit pseudo probes for sample profiling. no pseudo probes. ๐ง-fno-raw-string-literalsโ Disable raw string literals. raw string literals? no. ๐ฅ-fno-register-global-dtors-with-atexitโ Don't useatexitor__cxa_atexitto register global destructors. global dtors not registered that way. ๐-fno-rtlib-add-rpathโ Do not add-rpathwith architecture-specific resource directory to the linker flags. When--hip-linkis specified, do not add-rpathwith HIP runtime library directory to the linker flags. no rpath additions, bestie. ๐-fno-rtlib-defaultlibโ On Windows, do not emit/defaultlib:directives to link compiler-rt libraries. Windows only. ๐-fno-rtti-dataโ Disable generation of RTTI data. no RTTI data. ๐ฆ-fno-rttiโ Disable generation of rtti information. no rtti info at all. ๐ธ-fno-sanitize-address-globals-dead-strippingโ Disable linker dead stripping of globals in AddressSanitizer. ASan globals not dead-stripped. โจ-fno-sanitize-address-outline-instrumentationโ Use default code inlining logic for the address sanitizer. default inlining for ASan. ๐-fno-sanitize-address-poison-custom-array-cookieโ Disable poisoning array cookies when using customoperator new[]in AddressSanitizer. customoperator new[], no poisoning. ๐ง-fno-sanitize-address-use-after-scopeโ Disable use-after-scope detection in AddressSanitizer. no use-after-scope detection. ๐ฅ-fno-sanitize-address-use-odr-indicatorโ Disable ODR indicator globals. no ODR indicator globals. ๐-fno-sanitize-alloc-token-extendedโ Disable extended coverage to custom allocation functions. no extended AllocToken coverage. ๐-fno-sanitize-alloc-token-fast-abiโ Use the default AllocToken ABI. default ABI, period. ๐-fno-sanitize-annotate-debug-info=<value>โ Do not allow compiler to annotate sanitizer instrumentation with extra debug info for the specified sanitizers. specified sanitizers only. ๐ฆ-fno-sanitize-annotate-debug-infoโ Do not allow compiler to annotate sanitizer instrumentation with extra debug info for any sanitizers. any sanitizers, no annotations. ๐ธ-fno-sanitize-cfi-canonical-jump-tablesโ Do not make the jump table addresses canonical in the symbol table. no canonical jump table addresses. โจ-fno-sanitize-cfi-cross-dsoโ Disable control flow integrity (CFI) checks for cross-DSO calls. no cross-DSO CFI checks. ๐-fno-sanitize-coverage=<value>โ Disable features of coverage instrumentation for Sanitizers. specified coverage features off. ๐ง-fno-sanitize-debug-trap-reasonsโ Alias for-fsanitize-debug-trap-reasons=none. alias, bestie. ๐ฅ-fno-sanitize-handler-preserve-all-regsโ Disable handlers withpreserve_allcalling convention. nopreserve_allhandlers. ๐-fno-sanitize-hwaddress-experimental-aliasingโ Disable aliasing mode in HWAddressSanitizer. no HWASan aliasing mode. ๐-fno-sanitize-ignorelistโ Don't use ignorelist file for sanitizers. no ignorelist file. ๐-fno-sanitize-memory-param-retvalโ Disable detection of uninitialized parameters and return values. no param/retval uninit detection. ๐ฆ-fno-sanitize-memory-track-originsโ Disable origins tracking in MemorySanitizer. no MSan origins tracking. ๐ธ-fno-sanitize-memory-use-after-dtorโ Disable use-after-destroy detection in MemorySanitizer. no use-after-dtor detection. โจ-fno-sanitize-merge=<value>โ Do not allow compiler to merge handlers for specified sanitizers. specified sanitizers, no merge. ๐-fno-sanitize-mergeโ Do not allow compiler to merge handlers for any sanitizers. any sanitizers, no merge. ๐ง-fno-sanitize-recover=<value>โ Disable recovery for specified sanitizers. specified sanitizers, no recovery. ๐ฅ-fno-sanitize-stable-abiโ Conventional ABI instrumentation for sanitizer runtime. Default: Conventional. default is Conventional, bestie. ๐-fno-sanitize-statsโ Disable sanitizer statistics gathering. no sanitizer stats. ๐-fno-sanitize-thread-atomicsโ Disable atomic operations instrumentation in ThreadSanitizer. no TSan atomics instrumentation. ๐-fno-sanitize-thread-func-entry-exitโ Disable function entry/exit instrumentation in ThreadSanitizer. no TSan func entry/exit. ๐ฆ-fno-sanitize-thread-memory-accessโ Disable memory access instrumentation in ThreadSanitizer. no TSan memory access instrumentation. ๐ธ-fno-sanitize-trap=<value>โ Disable trapping for specified sanitizers. specified sanitizers, no trap. โจ-fno-sanitize-trapโ turns OFF trapping for every single sanitizer ๐ no traps, we vibe differently now.-fno-sanitize-type-outline-instrumentationโ tells it to use the code inlining logic for the type sanitizer โจ-fno-short-wcharโ forceswchar_tto be an unsigned int, no cap ๐ซถ-fno-show-columnโ diagnostics will NOT include the column number. bestie loses her coordinates ๐ญ-fno-show-source-locationโ no source location info attached to diagnostics at all. it's giving mystery ๐ฆ-fno-signed-charโcharis unsigned, periodt ๐-fno-signed-zerosโ allows optimizations that ignore the sign of floating point zeros ๐ฅ (yes it's chaotic, yes it's allowed)-fno-skip-odr-check-in-gmfโ performs ODR checks for decls inside the global module fragment ๐-fno-spell-checkingโ disables spell-checking. typos are my truth now ๐-fno-split-machine-functionsโ disables late function splitting using profile information (x86 and aarch64 ELF) ๐ธ-fno-split-stackโ wouldn't use segmented stack. nope, not doing it ๐-fno-stack-clash-protectionโ disables stack clash protection โ ๏ธ-fno-stack-protectorโ disables the use of stack protectors โ ๏ธ-fno-standalone-debugโ limits the debug information produced, to reduce the size of the debug binary ๐-fno-strict-aliasingโ disables optimizations based on strict aliasing rules โจ-fno-strict-float-cast-overflowโ relaxes the language rules and tries to match the behavior of the target's native float-to-int conversion instructions ๐-fno-strict-returnโ does NOT treat control flow paths that fall off the end of a non-void function as unreachable ๐-fno-swift-version-independent-apinotesโ disables version-independent external API notes support ๐-fno-sycl-add-default-spec-consts-imageโ turns off generation of the device image where all specialization constant usages are replaced with default values ๐ฆ-fno-sycl-allow-device-dependenciesโ deprecated, bestie: please use-fno-sycl-allow-device-image-dependenciesinstead ๐จ-fno-sycl-allow-device-image-dependenciesโ does not allow dependencies between device code images (this is the default) ๐ซถ-fno-sycl-cuda-compatibilityโ disables CUDA compatibility mode ๐-fno-sycl-dead-args-optimizationโ disables elimination of DPC++ dead kernel arguments โจ-fno-sycl-decompose-functorโ does not decompose the SYCL functor if possible (experimental, CUDA only) ๐ง-fno-sycl-device-code-split-esimdโ does not split ESIMD and SYCL device code into separate device binary images. has effect only for SPIR-based targets. (experimental) ๐ธ-fno-sycl-early-optimizationsโ disables the standard optimization pipeline for the SYCL device compiler ๐ญ-fno-sycl-esimd-force-stateless-memโ does not enforce using stateless memory accesses ๐-fno-sycl-explicit-simdโ disables the SYCL explicit SIMD extension. (deprecated) โ ๏ธ-fno-sycl-force-inline-kernel-lambdaโ disallows force inline SYCL kernels lambda in the entry point ๐ฅ-fno-sycl-id-queries-fit-in-intโ does not assume that SYCL ID queries fit withinMAX_INT๐-fno-sycl-instrument-device-codeโ does not add Instrumentation and Tracing Technology (ITT) instrumentation intrinsics calls (experimental) ๐-fno-sycl-libspirvโ disables the check forlibspirvโ-fno-sycl-link-spirvโ disables adding of the default (spir64) triple when it's discovered in user specified objects and archives ๐-fno-sycl-rdcโ generates relocatable device code during SYCL offload target compilation. using-fno-sycl-rdcin combination with-cwill produce final device binaries within the generated fat object. when you use this option, each kernel must be self-contained within its translation unit (source file). therefore, the use ofSYCL_EXTERNALis disallowed when this option is enabled ๐-fno-sycl-remove-unused-external-funcsโ prevents removal of unusedSYCL_EXTERNALfunctions ๐-fno-sycl-unnamed-lambdaโ disallows unnamed SYCL lambda kernels ๐ฆ-fno-sycl-use-bitcodeโ uses SPIR-V instead of LLVM bitcode in fat objects (deprecated) ๐จ-fno-sycl-use-footerโ disables usage of the integration footer during SYCL enabled compilations โจ-fno-syclโ disables SYCL C++ extensions ๐-fno-system-debugโ does not emit debug information for declarations in system headers ๐ธ-fno-temp-fileโ directly creates the compilation output files. this may lead to incorrect incremental builds if the compiler crashes โ ๏ธ (fr fr, be careful)-fno-threadsafe-staticsโ does not emit code to make initialization of local statics thread safe ๐-fno-trigraphsโ does not process trigraph sequences ๐-fno-unified-ltoโ uses distinct LTO pipelines ๐-fno-unique-section-namesโ does not use unique names for text and data sections ๐ฅ-fno-unroll-loopsโ turns off the loop unroller ๐ญ-fno-use-cxa-atexitโ doesn't use__cxa_atexitfor calling destructors ๐ซถ-fno-use-init-arrayโ uses.ctors/.dtorsinstead of.init_array/.fini_array๐-fno-verify-intermediate-codeโ disables verification of LLVM IR ๐ฌ-fno-visibility-inlines-hidden-static-local-varโ disables-fvisibility-inlines-hidden-static-local-var(this is the default on non-darwin targets) โจ-fno-xray-function-indexโ omits the function index section, at the expense of single-function patching performance ๐-fno-zero-initialized-in-bssโ doesn't place zero initialized data in BSS ๐ฆ-fno-zos-extensionsโ does not accept non-standard constructs supported by the z/OS compiler ๐
-fobjc-arc-exceptionsโ uses EH-safe code when synthesizing retains and releases in-fobjc-arc๐-fobjc-arcโ synthesizes retain and release calls for Objective-C pointers โจ-fobjc-avoid-heapify-local-blocksโ tries to avoid heapifying local blocks ๐ธ-fobjc-direct-precondition-thunkโ moves precondition checks for direct methods into thunks ๐-fobjc-disable-direct-methods-for-testingโ ignores the attributeobjc_directso that direct methods can be tested ๐งช-fobjc-encode-cxx-class-template-specโ fully encodes c++ class template specialization ๐ฅ-fobjc-exceptionsโ enables Objective-C exceptions ๐ซถ-fobjc-runtime=<value>โ specifies the target Objective-C runtime kind and version ๐-fobjc-weakโ enables ARC-style weak references in Objective-C ๐
-foffload-fp32-prec-divโ fdiv operations in offload device code are required to return correctly rounded results โญ-foffload-fp32-prec-sqrtโ sqrt operations in offload device code are required to return correctly rounded results โญ-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>โ sets the LTO mode for offload compilation โจ-foffload-ltoโ enables LTO in'full'mode for offload compilation ๐ฅ-foffload-uniform-blockโ assumes that kernels are launched with uniform block sizes (defaulttruefor CUDA/HIP andfalseotherwise) ๐-foffload-via-llvmโ uses LLVM/Offload as the portable offloading runtime ๐
-fomit-frame-pointerโ omits the frame pointer from functions that don't need it. some stack unwinding cases, such as profilers and sanitizers, may prefer specifying-fno-omit-frame-pointer. on many targets,-O1and higher omit the frame pointer by default.-m[no-]omit-leaf-frame-pointertakes precedence for leaf functions ๐ธ-fopenaccโ enables OpenACC ๐-fopenmp-extensionsโ enables all Clang extensions for OpenMP directives and clauses โจ-fopenmp-force-usmโ forces behavior as if the user specifiedpragma omp requires unified_shared_memory๐-fopenmp-offload-mandatoryโ does not create a host fallback if offloading to the device fails ๐ค-fopenmp-simdโ emits OpenMP code only for SIMD-based constructs ๐-fopenmp-target-debugโ enables debugging in the OpenMP offloading device RTL ๐-fopenmp-target-jitโ emits code that can be JIT compiled for OpenMP offloading. implies-foffload-lto=full๐ฅ-fopenmp-targets=<value>โ specifies a comma-separated list of triples of OpenMP offloading targets to be supported ๐-fopenmp-version=<value>โ sets the OpenMP version (e.g.45for OpenMP 4.5,51for OpenMP 5.1). the default value is51for Clang ๐-fopenmpโ parses OpenMP pragmas and generates parallel code โจ-foperator-arrow-depth=<value>โ maximum number of'operator->'s to call for a member access ๐ฆ-foptimization-record-file=<file>โ specifies the output name of the file containing the optimization remarks. implies-fsave-optimization-record. on Darwin platforms, this cannot be used with multiple-arch <arch>options โ ๏ธ-foptimization-record-passes=<regex>โ only includes passes which match a specified regular expression in the generated optimization record (by default, include all passes) ๐-fpack-struct=<value>โ specifies the default maximum struct packing alignment ๐ฆ-fpartition-static-data-sectionsโ enables partition static data sections using profile information (x86 and aarch64 ELF) ๐ธ-fpascal-stringsโ recognizes and constructs Pascal-style string literals ๐-fpass-plugin=<dsopath>โ loads pass plugin from a dynamic shared object file (only with new pass manager) ๐-fpatchable-function-entry=<N,M,Section>โ generatesMNOPs before function entry andN-MNOPs after function entry. if section is specified, use it instead of__patchable_function_entries๐-fpcc-struct-returnโ overrides the default ABI to return all structs on the stack ๐-fpch-codegenโ generates code for uses of this PCH that assumes an explicit object file will be built for the PCH โจ-fpch-debuginfoโ generates debug info for types in an object file built from this PCH, and does not generate them elsewhere ๐-fpch-instantiate-templatesโ instantiates templates already while building a PCH โก-fpch-validate-input-files-contentโ validates PCH input files based on content if mtime differs ๐ต๏ธ-fplugin-arg-<name>-<arg>โ passes <arg> to plugin <name> ๐-fplugin=<dsopath>โ loads the named plugin (dynamic shared object) ๐-fprebuilt-implicit-modulesโ looks up implicit modules in the prebuilt module path ๐-fprebuilt-module-path=<directory>โ specifies the prebuilt module path ๐-fpreview-breaking-changesโ okay so this is the "we're allowed to break stuff on purpose" flag ๐ It tells the compiler driver and all the compilation phases that backwards compatibility is officially cancelled, no cap. Turn it on and the compiler also defines the macro__INTEL_PREVIEW_BREAKING_CHANGESfor you. And bbz, if you pair it with-fsycl, the driver links against a whole alternate form of libsycl calledlibsycl-previewโจ-fproc-stat-report=<value>โ saves the subprocess statistics into the file you name ๐-fproc-stat-report<value>โ same energy but it just prints the subprocess statistics instead of filing them away ๐ซถ-fprofile-arcsโ instruments your code so it produces gcov data files (*.gcda) ๐-fprofile-continuousโ turns on continuous instrumentation profiling mode, lowkey the vibe of "just keep watching me" ๐-fprofile-exclude-files=<value>โ instruments only functions from files whose names don't match all the regexes you separated with a semi-colon ๐-fprofile-filter-files=<value>โ the flip side: instruments only functions from files whose names match any regex separated by a semi-colon ๐ฏ-fprofile-function-groups=<N>โ splits the functions into N groups and then you use-fprofile-selected-function-groupto pick just group i for instrumentation ๐ง-fprofile-generate-cold-function-coverage=<directory>โ generates instrumented code to collect coverage info for the cold functions (the unpopular ones, we love them anyway) into<directory>/default.profrawโ though theLLVM_PROFILE_FILEenv var gets to override that ๐-fprofile-generate-cold-function-coverageโ same coverage-info-for-cold-functions deal, but it lands in adefault.profrawfile instead (and yes, it's overridden by the=form of the option or byLLVM_PROFILE_FILE) โ๏ธ-fprofile-generate=<directory>โ generates instrumented code that collects execution counts into<directory>/default.profraw, overridable by theLLVM_PROFILE_FILEenv var bestie ๐-fprofile-generateโ collects those execution counts straight intodefault.profraw(overridden byLLVM_PROFILE_FILEenv var) โจ-fprofile-instr-generate=<file>โ generates instrumented code that collects execution counts into<file>, and yeahLLVM_PROFILE_FILEcan override it ๐-fprofile-instr-generateโ collects execution counts into thedefault.profrawfile (overridden by the=form of the option orLLVM_PROFILE_FILEenv var) ๐ธ-fprofile-instr-use=<value>โ uses instrumentation data for profile-guided optimization, iconic behavior ๐ซถ-fprofile-list=<value>โ a filename that defines the list of functions/files to instrument. The file uses the sanitizer special case list format, iykyk ๐-fprofile-remapping-file=<file>โ uses the remappings described in<file>to match the profile data against names in the program ๐ฅ-fprofile-sample-accurateโ says, officially, that the sample profile is accurate. Trust. ๐ฏ-fprofile-sample-use=<value>โ enables sample-based profile guided optimizations, main character energy โญ-fprofile-selected-function-group=<i>โ pairs with-fprofile-function-groupsto split your functions into N groups and instrument only the ones in group i. Valid range is0toN-1inclusive, don't get it twisted ๐-fprofile-update=<method>โ sets the update method of the profile counters ๐ง-fprofile-use=<pathname>โ uses instrumentation data for profile-guided optimization. If<pathname>is a directory it reads from<pathname>/default.profdata; otherwise it reads from the file<pathname>๐๏ธ-fprotect-parensโ decides whether the optimizer actually honors your parentheses when it evaluates floating-point expressions. The way that matters ๐ญ-fpseudo-probe-for-profilingโ emits pseudo probes for sample profiling ๐ง-fptrauth-auth-trapsโ enables traps on authentication failures ๐ชค-fptrauth-block-descriptor-pointersโ enables signing and authentication of block descriptors ๐-fptrauth-callsโ enables signing and authentication of all indirect calls ๐-fptrauth-elf-gotโ enables authentication of pointers from the GOT (ELF only, so don't come at me on other formats) ๐ง-fptrauth-function-pointer-type-discriminationโ enables type discrimination on C function pointers ๐ฏ-fptrauth-indirect-gotosโ enables signing and authentication of indirect goto targets ๐-fptrauth-init-fini-address-discriminationโ enables address discrimination of function pointers in init/fini arrays ๐-fptrauth-init-finiโ enables signing of function pointers in init/fini arrays โ๏ธ-fptrauth-intrinsicsโ enables pointer authentication intrinsics ๐งฉ-fptrauth-objc-class-roโ enables signing and authentication for ObjCclass_ropointers ๐-fptrauth-objc-interface-selโ enables signing and authentication of an Objective-C object's'SEL'fields ๐ท๏ธ-fptrauth-objc-isaโ enables signing and authentication of an Objective-C object's'isa'field ๐ชช-fptrauth-returnsโ enables signing and authentication of return addresses โฉ๏ธ-fptrauth-type-info-vtable-pointer-discriminationโ enables type and address discrimination of the vtable pointer ofstd::type_info๐งฌ-fptrauth-vtable-pointer-address-discriminationโ enables address discrimination of vtable pointers ๐-fptrauth-vtable-pointer-type-discriminationโ enables type discrimination of vtable pointers ๐-frandomize-layout-seed-file=<file>โ the file holding the seed used by the randomize structure layout feature ๐ฒ-frandomize-layout-seed=<seed>โ the actual seed used by the randomize structure layout feature ๐ฑ-fraw-string-literalsโ enables raw string literals ๐ชข-freciprocal-mathโ allows division operations to be reassociated, which is giving "math but make it flexible" ๐งฎ-freg-struct-returnโ overrides the default ABI so small structs get returned in registers ๐ฆ-fregister-global-dtors-with-atexitโ usesatexitor__cxa_atexitto register global destructors ๐งน-fropiโ generates read-only position independent code (ARM only) ๐ฆพ-frtlib-add-rpathโ adds-rpathwith the architecture-specific resource directory to the linker flags. And when--hip-linkis specified, it also adds-rpathwith the HIP runtime library directory to the linker flags ๐ค๏ธ-frtlib-defaultlibโ on Windows, emits/defaultlib:directives to link compiler-rt libraries (this is the default, so it's just doing its thing) ๐ช-frwpiโ generates read-write position independent code (ARM only) ๐ฆพ-fsafe-buffer-usage-suggestionsโ displays suggestions to update code associated with-Wunsafe-buffer-usagewarnings ๐ก-fsample-profile-use-profiโ uses profi to infer block and edge counts ๐-fsanitize-address-destructor=<value>โ sets the kind of module destructors emitted by AddressSanitizer instrumentation. These destructors get emitted to unregister instrumented global variables when code is unloaded (like, for example, viadlclose()) ๐งผ-fsanitize-address-field-padding=<value>โ the level of field padding for AddressSanitizer ๐๏ธ-fsanitize-address-globals-dead-strippingโ enables linker dead stripping of globals in AddressSanitizer ๐๏ธ-fsanitize-address-outline-instrumentationโ always generates function calls for address sanitizer instrumentation ๐-fsanitize-address-poison-custom-array-cookieโ enables poisoning array cookies when using customoperator new[]in AddressSanitizer ๐ช-fsanitize-address-use-after-return=<mode>โ selects the mode of detecting stack use-after-return in AddressSanitizer ๐ต๏ธ-fsanitize-address-use-after-scopeโ enables use-after-scope detection in AddressSanitizer ๐-fsanitize-address-use-odr-indicatorโ enables ODR indicator globals to avoid false ODR violation reports in partially sanitized programs โ at the cost of an increase in binary size, so it's giving tradeoff energy ๐-fsanitize-alloc-token-extendedโ enables extended coverage to custom allocation functions โ-fsanitize-alloc-token-fast-abiโ uses the AllocToken fast ABI โก-fsanitize-annotate-debug-info=<value>โ annotates sanitizer instrumentation with extra debug info for the sanitizers you specify, if that's supported ๐ท๏ธ-fsanitize-annotate-debug-infoโ lets the compiler annotate sanitizer instrumentation with extra debug info for all sanitizers, where supported ๐-fsanitize-cfi-canonical-jump-tablesโ makes the jump table addresses canonical in the symbol table ๐-fsanitize-cfi-cross-dsoโ enables control flow integrity (CFI) checks for cross-DSO calls ๐-fsanitize-cfi-icall-experimental-normalize-integersโ normalizes integers in CFI indirect call type signature checks ๐ข-fsanitize-cfi-icall-generalize-pointersโ generalizes pointers in CFI indirect call type signature checks ๐ช-fsanitize-coverage-allowlist=<value>โ restricts sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list โ except the blocked ones ๐-fsanitize-coverage-ignorelist=<value>โ disables 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>โ uses a callback for max stack depth tracing with a minimum stack depth of<M>๐-fsanitize-coverage=<value>โ specifies the type of coverage instrumentation for Sanitizers ๐๏ธ-fsanitize-debug-trap-reasons=<value>โ sets how trap reasons get emitted:noneโ not emitted at all. This gives the smallest debug info ๐basicโ emits a fixed trap message per check type. This increases the debug info size, but not as much asdetailed๐detailedโ emits a more detailed trap message. This increases the debug info size the most ๐
Default is detailed ๐
-fsanitize-debug-trap-reasonsโ an alias for-fsanitize-debug-trap-reasons=detailedโจ-fsanitize-handler-preserve-all-regsโ enables handlers with thepreserve_allcalling convention ๐พ-fsanitize-hwaddress-abi=<value>โ selects the HWAddressSanitizer ABI to target (interceptororplatform, defaultinterceptor). Heads up bestie: this option is currently unused ๐-fsanitize-hwaddress-experimental-aliasingโ enables aliasing mode in HWAddressSanitizer ๐งช-fsanitize-ignorelist=<value>โ the path to the ignorelist file for sanitizers ๐ซ-fsanitize-kcfi-arityโ embeds function arity information into the KCFI patchable function prefix ๐งท-fsanitize-kcfi-hash=<value>โ selects the hash algorithm for KCFI type IDs (xxHash64,FNV-1a) #๏ธโฃ-fsanitize-memory-param-retvalโ enables detection of uninitialized parameters and return values ๐ณ๏ธ-fsanitize-memory-track-origins=<value>โ enables origins tracking in MemorySanitizer ๐ณ-fsanitize-memory-track-originsโ turns on origins tracking inside MemorySanitizer, so bestie, when it yells at you it can actually tell you where the uninitialized thing came from ๐ต๏ธโ๏ธ-fsanitize-memory-use-after-dtorโ enables use-after-destroy detection in MemorySanitizer. yes, using a thing after its destructor ran. we're catching that ๐-fsanitize-memtag-mode=<value>โ sets the default MTE mode. Valid vibe check:'sync'(which is the default) or'async'โจ-fsanitize-merge=<value>โ lets the compiler merge handlers for the sanitizers you name-fsanitize-mergeโ same energy but for all the sanitizers, no picking and choosing ๐-fsanitize-recover=<value>โ enables recovery for the specified sanitizers-fsanitize-skip-hot-cutoff=<value>โ excludes sanitization for the top hottest code responsible for the given fraction of PGO counters. The scale is:0.0[default] = skip none;1.0= skip all. Argument format is literally:
<sanitizer1>=<value1>,<sanitizer2>=<value2>,...
-fsanitize-stable-abiโ stable ABI instrumentation for the sanitizer runtime. Default: Conventional ๐-fsanitize-statsโ enables sanitizer statistics gathering.-fsanitize-system-ignorelist=<value>โ the path to the system ignorelist file for sanitizers ๐-fsanitize-thread-atomicsโ enables atomic operations instrumentation in ThreadSanitizer (and that's the default, so it's already on, you're welcome)-fsanitize-thread-func-entry-exitโ enables function entry/exit instrumentation in ThreadSanitizer (default, bestie)-fsanitize-thread-memory-accessโ enables memory access instrumentation in ThreadSanitizer (default ๐ซถ)-fsanitize-trap=<value>โ enables trapping for the specified sanitizers-fsanitize-trapโ enables trapping for every single sanitizer, all of them, periodt-fsanitize-type-outline-instrumentationโ always generate function calls for type sanitizer instrumentation-fsanitize-undefined-ignore-overflow-pattern=<value>โ specify the overflow patterns to exclude from arithmetic sanitizer instrumentation-fsanitize-undefined-strip-path-components=<number>โ strip a given number of path components when emitting check metadata โ or, if the number is negative, keep only that many ๐-fsanitize=<check>โ turn on runtime checks for various forms of undefined or suspicious behavior. see the user manual for the available checks, iykyk-fsave-optimization-record=<format>โ generate an optimization record file in a specific format-fsave-optimization-recordโ generate a YAML optimization record file ๐ธ-fseh-exceptionsโ use SEH style exceptions-fseparate-named-sectionsโ use separate unique sections for named sections (ELF only, bestie)-fshort-enumsโ allocate to an enum type only as many bytes as it needs for the declared range of possible values. minimalism โจ-fshort-wcharโ forceswchar_tto be a short unsigned int-fshow-overloads=<value>โ which overload candidates to show when overload resolution fails. defaults to'all'-fshow-skipped-includesโ show skipped includes in-Houtput.-fsigned-charโcharis signed. that's the whole thing. iconic honestly-fsized-deallocationโ enables C++14 sized global deallocation functions-fsjlj-exceptionsโ use SjLj style exceptions-fskip-odr-check-in-gmfโ skip ODR checks for decls in the global module fragment.-fslp-vectorizeโ enables the superword-level parallelism vectorization passes โก-fspell-checking-limit=<value>โ set the maximum number of times to perform spell checking on unrecognized identifiers (0= no limit). your typos are safe, girl-fsplit-dwarf-inliningโ provide minimal debug info in the object/executable so you can still get online symbolication/stack traces when.dwo/.dwpfiles aren't around, as long as you're using Split DWARF-fsplit-lto-unitโ enables splitting of the LTO unit-fsplit-machine-functionsโ enable late function splitting using profile information (x86 and aarch64 ELF)-fsplit-stackโ use segmented stack-fstack-clash-protectionโ enable stack clash protection ๐ก๏ธ-fstack-protector-allโ enable stack protectors for all functions, no exceptions, everyone gets one-fstack-protector-strongโ enable stack protectors for some functions vulnerable to stack smashing. compared to-fstack-protector, this one uses a stronger heuristic that includes functions containing arrays of any size (and any type), plus any calls toallocaor the taking of an address from a local variable ๐ช-fstack-protectorโ enable stack protectors for some functions vulnerable to stack smashing. this uses a loose heuristic which considers functions vulnerable if they contain achar(or 8bit integer) array or constant sized calls toalloca, which are of greater size thanssp-buffer-size(default: 8 bytes). all variable sized calls toallocaare considered vulnerable. a function with a stack protector has a guard value added to the stack frame that gets checked on function exit. the guard value must be positioned in the stack frame such that a buffer overflow from a vulnerable variable will overwrite the guard value before overwriting the function's return address. the reference stack guard value is stored in a global variable. okay that was a lot but like, stack safety is the moment ๐-fstack-size-sectionโ emit a section containing metadata on function stack sizes-fstack-usageโ emit a.sufile containing information on function stack sizes-fstandalone-debugโ emit full debug info for all types used by the program-fstrict-aliasingโ enable optimizations based on strict aliasing rules-fstrict-enumsโ enable optimizations based on the strict definition of an enum's value range-fstrict-flex-arrays=<n>โ enable optimizations based on the strict definition of flexible arrays.-fstrict-float-cast-overflowโ assume that overflowing float-to-int casts are undefined (that's the default, so like, heads up ๐ซฃ)-fstrict-vtable-pointersโ enable optimizations based on the strict rules for overwriting polymorphic C++ objects-fswift-async-fp=<option>โ control emission of Swift async extended frame info-fswift-version-independent-apinotesโ enable version-independent external API notes support-fsycl-add-default-spec-consts-imageโ generates a copy of every device image that uses a specialization constant and replaces all usages of specialization constant with default values specified byspecialization_id. if a device image does not use a specialization constant at all then no copy is generated. this option is only useful if used in conjunction with Ahead of Time Compilation (-fsycl-targetcommand line option). got it? good ๐-fsycl-allow-device-dependenciesโ deprecated: please use-fsycl-allow-device-image-dependenciesinstead. girl, upgrade-fsycl-allow-device-image-dependenciesโ allow dependencies between device code images-fsycl-cuda-compatibilityโ enable CUDA compatibility mode (experimental). enables the use of CUDA device code with SYCL device code. under this mode, a SYCL device function can call a CUDA device function (but not the other way around, so no reverse uno). this implies the definition of CUDA macros and the inclusion of implicit header files.-fsycl-dead-args-optimizationโ enables elimination of DPC++ dead kernel arguments ๐๏ธ-fsycl-decompose-functorโ do decompose SYCL functor if possible (experimental, CUDA only)-fsycl-default-sub-group-size<value>โ set the default sub group size for SYCL kernels-fsycl-device-code-split-esimdโ split ESIMD device code from SYCL into a separate device binary image (that's the default). only has effect for SPIR-based targets. (experimental) ๐งช-fsycl-device-code-split=<value>โ perform SYCL device code split. the options are:per_kernel(device code module is created for each SYCL kernel) |per_source(device code module is created for each source (translation unit)) |off(no device code split) |auto(use heuristic to select the best way of splitting device code). default is'auto'โ use heuristic to distribute device code across modules โจ-fsycl-device-code-splitโ perform SYCL device code split in the'auto'mode, i.e. use heuristic to distribute device code across modules-fsycl-device-obj=<value>โ specify format of device code stored in the resulting object. valid values are:spirv,asm,llvmir(default) ๐-fsycl-device-onlyโ compile SYCL kernels for device-fsycl-disable-range-roundingโ deprecated: please use-fsycl-range-rounding=disableinstead.-fsycl-dump-device-code=<value>โ dump device code into the user provided directory. (deprecated, bestie, it's giving legacy)-fsycl-early-optimizationsโ enable standard optimization pipeline for SYCL device compiler-fsycl-embed-irโ embed LLVM IR for runtime kernel fusion ๐ฅ-fsycl-esimd-force-stateless-memโ enforce using stateless memory accesses. convert stateful accesses via SYCL accessors to stateless within ESIMD kernels. enabled by default.-fsycl-exp-range-roundingโ use experimental range rounding.-fsycl-explicit-simdโ enable SYCL explicit SIMD extension. (deprecated)-fsycl-footer-path=<value>โ specify the location of the temporary source file with the included integration footer-fsycl-force-inline-kernel-lambdaโ allow force inline SYCL kernels lambda in entry point-fsycl-force-target=<value>โ force the usage of the given triple when extracting device code from any given objects on the command line-fsycl-fp32-prec-sqrtโ SYCL only. specify that single precision floating-pointsqrtis correctly rounded. (deprecated)-fsycl-fp64-conv-emuโ enable fp64 partial emulation for kernels with only fp64 conversion operations and no fp64 computation operations (requires Intel GPU backend supporting fp64 partial emulation).-fsycl-help=<value>โ emit help information from the related offline compilation tool. valid values:all,gen,x86_64.-fsycl-helpโ emit help information from all of the offline compilation tools ๐โ๏ธ-fsycl-host-compiler-options=<value>โ when performing the host compilation with-fsycl-host-compilerspecified, use the given options during that compile. options are expected to be a quoted list of space separated options.-fsycl-host-compiler=<value>โ specify the C++ compiler binary to perform host compilation with during SYCL offload compiles.-fsycl-host-onlyโ compile SYCL code for host only. has no effect on non-SYCL compilations ๐-fsycl-id-queries-fit-in-intโ bestie, you're telling it to assume that SYCL ID queries fit withinMAX_INT. Justโฆ trust the vibes. โจ-fsycl-instrument-device-codeโ adds Instrumentation and Tracing Technology (ITT) instrumentation intrinsics calls ๐ซถ (experimental, so likeโฆ it's giving beta energy)-fsycl-libspirv-path=<value>โ the path to the libspirv library, bestie ๐-fsycl-linkโ generate a partially linked device object that's meant to be used with the host link ๐-fsycl-max-parallel-link-jobs=<value>โ controls the max parallelism of actions performed on SYCL device code post-link โ aka the generation of SPIR-V device images, or the AOT compilation of each device image ๐ (experimental)-fsycl-optimize-non-user-codeโ this one runs with-O0: it optimizes the SYCL framework utility functions but leaves your kernel code unoptimized, so your stuff stays untouched โ๏ธ (experimental)-fsycl-range-rounding=<value>โ your options for range rounding of SYCL range kernels:disable(do not generate range rounded kernels),force(only generate range rounded kernels),on(generate range rounded kernels as well as unrounded kernels). The default is'on'๐ซ-fsycl-remove-unused-external-funcsโ allow removal of unusedSYCL_EXTERNALfunctions (this is the default, no cap) ๐งน-fsycl-targets=<value>โ specify a comma-separated list of triples of SYCL offloading targets to be supported ๐ฏ-fsycl-unnamed-lambdaโ allow unnamed SYCL lambda kernels, anonymous icon behavior ๐-fsycl-use-bitcodeโ use LLVM bitcode instead of SPIR-V in fat objects. deprecated, so likeโฆ it's on its way out ๐-fsyclbin=<value>โ outputs in the SYCLBIN binary format in the state specified by<arg>(input, object, or executable โ the default) ๐ฆ-fsyclโ enable SYCL C++ extensions ๐ฅ-fsyntax-onlyโ run the preprocessor, parser and semantic analysis stages. That's it, that's the whole job ๐ง-fsystem-debugโ emit debug information for declarations in system headers ๐-fsystem-moduleโ build this module as a system module. Only used with-emit-module๐งฉ-ftarget-compile-fastโ experimental feature: reduce target compilation time, with a potential runtime performance trade-off. Speedy trade-off arc โก-ftarget-export-symbolsโ expose exported symbols in a generated target library so they're visible to other modules ๐-ftarget-register-alloc-mode=<value>โ specify a register allocation mode for specific hardware, for use by supported target backends ๐๏ธ-ftemplate-backtrace-limit=<value>โ set the maximum number of entries to print in a template instantiation backtrace (0= no limit, go off I guess) ๐-ftemplate-depth=<value>โ set the maximum depth of recursive template instantiation ๐ณ๏ธ-ftemporal-profileโ generate instrumented code to collect temporal information โฑ๏ธ-ftest-coverageโ produce gcov notes files (*.gcno) ๐-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 you specify it, ThinLTO backend compilations get distributed by LLD ๐ก-fthinlto-index=<value>โ perform ThinLTO importing using the provided function summary index ๐-ftime-report=<value>โ (for new pass manager)'per-pass': one report for each pass;'per-pass-run': one report for each pass invocation ๐-ftime-trace-granularity=<value>โ minimum time granularity (in microseconds) traced by the time profiler ๐ฌ-ftime-trace-verbose<value>โ make time trace capture verbose event details (e.g. source filenames). Heads up: 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 the time profiler. Generates a JSON file based on the output filename ๐ฐ๏ธ-ftrap-function=<value>โ issue a call to the specified function rather than a trap instruction ๐ชค-ftrapv-handler=<function name>โ specify the function to be called on overflow ๐จ-ftrapvโ trap on integer overflow, periodt ๐-ftrigraphsโ process trigraph sequences ๐-ftrivial-auto-var-init-max-size=<value>โ stop initializing trivial automatic stack variables if the 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'๐ฑ-funified-ltoโ use the unified LTO pipeline ๐-funique-basic-block-section-namesโ use unique names for basic block sections (ELF only) ๐ท๏ธ-funique-internal-linkage-namesโ uniqueify internal linkage symbol names by appending the MD5 hash of the module path #๏ธโฃ-funique-source-file-identifier=<value>โ specify the source file identifier for-funique-source-file-names; it uses the source file path if you don't specify one ๐-funique-source-file-namesโ allow the compiler to assume that each translation unit has a unique source file identifier (see-funique-source-file-identifier) at link time ๐งฌ-funroll-loopsโ turn on the loop unroller ๐-funsafe-math-optimizationsโ allow unsafe floating-point math optimizations, which may decrease precision. unsafe, babe, it says it right there โ ๏ธ-fuse-cuid=<value>โ the method used to generate ID's for compilation units for the single source offloading languages CUDA and HIP:'hash'(ID's generated by hashing the file path and command line options) |'random'(ID's generated as random numbers) |'none'(disabled). Default is'hash'. Heads up: this option will be overridden by the option'-cuid=[ID]'if it's specified ๐-fuse-line-directivesโ use#linein preprocessed output ๐-fvalidate-ast-input-files-contentโ compute and store the hash of input files used to build an AST. Files with mismatching mtime's are considered valid if both contents is identical ๐งพ-fveclib=<value>โ use the given vector functions library. Note:-fveclib={ArmPL,SLEEF,libmvec}implies-fno-math-errno. Note:-fveclib=libmvecon AArch64 requires GLIBC 2.40 or newer ๐งฎ-fvectorizeโ enable the loop vectorization passes ๐๏ธ-fverbose-asmโ generate verbose assembly output ๐ฃ๏ธ-fverify-intermediate-codeโ enable verification of LLVM IR โ-fvirtual-function-eliminationโ enables dead virtual function elimination optimization. Requires-flto=full๐-fvisibility-dllexport=<value>โ the visibility for dllexport definitions. IfKeepis specified the visibility is not adjusted [-fvisibility-from-dllstorageclass] ๐๏ธ-fvisibility-externs-dllimport=<value>โ the visibility for dllimport external declarations. IfKeepis specified the visibility is not adjusted [-fvisibility-from-dllstorageclass] ๐๏ธ-fvisibility-externs-nodllstorageclass=<value>โ the visibility for external declarations without an explicit DLL storage class. IfKeepis specified the visibility is not adjusted [-fvisibility-from-dllstorageclass] ๐๏ธ-fvisibility-from-dllstorageclassโ override the visibility of globals based on their final DLL storage class ๐-fvisibility-global-new-delete-hiddenโ give global C++operator newanddeletedeclarations hidden visibility ๐-fvisibility-global-new-delete=<value>โ the visibility for global C++operator newanddeletedeclarations. If'source'is specified the visibility is not adjusted ๐๏ธ-fvisibility-inlines-hidden-static-local-varโ when-fvisibility-inlines-hiddenis enabled, static variables in inline C++ member functions will also be given hidden visibility by default ๐ซฅ-fvisibility-inlines-hiddenโ give inline C++ member functions hidden visibility by default ๐ซฅ-fvisibility-ms-compatโ give global types'default'visibility and global functions and variables'hidden'visibility by default ๐ค-fvisibility-nodllstorageclass=<value>โ the visibility for definitions without an explicit DLL storage class. IfKeepis specified the visibility is not adjusted [-fvisibility-from-dllstorageclass] ๐๏ธ-fvisibility=<value>โ set the default symbol visibility for all global definitions ๐-fwasm-exceptionsโ use WebAssembly style exceptions ๐งฑ-fwhole-program-vtablesโ enables whole-program vtable optimization. Requires-flto๐-fwinx64-eh-unwindv2=<value>โ generate unwind v2 (epilog) information for x64 Windows ๐ช-fwrapv-pointerโ treat pointer overflow as two's complement ๐-fwrapvโ treat signed integer overflow as two's complement ๐-fwritable-stringsโ store string literals as writable data โ๏ธ-fxl-pragma-packโ enable IBM XL#pragma packhandling ๐-fxray-always-emit-customeventsโ always emit__xray_customevent(...)calls, even if the containing function is not always instrumented ๐ข-fxray-always-emit-typedeventsโ always emit__xray_typedevent(...)calls, even if the containing function is not always instrumented ๐ข-fxray-always-instrument=<value>โ DEPRECATED: filename defining the whitelist for imbuing the'always instrument'XRay attribute ๐ซ-fxray-attr-list=<value>โ filename defining the list of functions/types for imbuing XRay attributes ๐-fxray-function-groups=<value>โ only instrument 1 of N groups ๐ฒ-fxray-ignore-loopsโ don't instrument functions with loops unless they also meet the minimum function size โฐ-fxray-instruction-threshold=<value>โ sets the minimum function size to instrument with XRay ๐-fxray-instrumentation-bundle=<value>โ select which XRay instrumentation points to emit. Options:all,none,function-entry,function-exit,function,custom. Default is'all'. Note that'function'includes both'function-entry'and'function-exit'๐-fxray-instrumentโ generate XRay instrumentation sleds on function entry and exit ๐ท-fxray-link-depsโ link the XRay runtime library when-fxray-instrumentis specified (this is the default) ๐งฒ-fxray-modes=<value>โ list of modes to link in by default into XRay instrumented binaries ๐๏ธ-fxray-never-instrument=<value>โ DEPRECATED: filename defining the whitelist for imbuing the'never instrument'XRay attribute ๐ซ
-fxray-selected-function-group=<value>โ bestie this one only makes sense if you're already using-fxray-function-groups, and it picks which group of functions gets instrumented. Valid range is 0 tofxray-function-groups - 1. that's it, that's the whole thought ๐-fxray-sharedโ turn on shared library instrumentation with XRay โจ-fzero-call-used-regs=<value>โ clear the call-used registers when a function returns (AArch64/x86 only, so if you're on something elseโฆ not for you bb ๐ซถ)-fzos-extensionsโ accept some non-standard constructs that the z/OS compiler happens to support-fzvectorโ enable the System z vector language extension โญ-F <value>โ add a directory to the framework include search path ๐-gcall-site-infoโ enable call site debug info--gcc-install-dir=<value>โ use the GCC installation sitting in the directory you name. The directory ends with path components likelib{,32,64}/gcc{,-cross}/$triple/$version. > heads up bestie: executables (likeld) that the compiler uses are not overridden by the selected GCC installation. no cap, that's the fine print ๐--gcc-toolchain=<value>โ point Clang at a directory where it can findincludeandlib{,32,64}/gcc{,-cross}/$triple/$version. Clang will pick the GCC installation with the largest version ๐--gcc-triple=<value>โ search for the GCC installation using the triple you specify-gcodeview-command-lineโ emit the compiler path and command line straight into CodeView debug information-gcodeview-ghashโ emit type record hashes into a.debug$Hsection-gcodeviewโ generate CodeView debug information-gdwarf-2โ generate source-level debug info with DWARF version 2-gdwarf-3โ generate source-level debug info with DWARF version 3-gdwarf-4โ generate source-level debug info with DWARF version 4-gdwarf-5โ generate source-level debug info with DWARF version 5-gdwarf-6โ generate source-level debug info with DWARF version 6 ๐ฆ-gdwarf32โ enables DWARF32 format for ELF binaries, but only if debug information emission is enabled in the first place-gdwarf64โ enables DWARF64 format for ELF binaries, again only if debug information emission is enabled-gdwarfโ generate source-level debug info with the default DWARF version-gembed-sourceโ embed the source text inside DWARF debug sections ๐ธ-gen-reproducer=<value>โ emit a reproducer, and the options are:off,crash(that's the default bb),error,always-gkey-instructionsโ enable Key Instructions, which makes debug stepping in optimized C/C++ code less jumpy in some debuggers. DWARF only โจ-gline-directives-onlyโ emit debug line info directives only-gline-tables-onlyโ emit debug line number tables only-gmodulesโ generate debug info with external references to clang modules or precompiled headers-gno-call-site-infoโ disable call site debug info (the anti--gcall-site-info, iconic honestly)-gno-codeview-command-lineโ don't emit the compiler path and command line into CodeView debug information-gno-embed-sourceโ restore the default behavior of not embedding source text in DWARF debug sections-gno-inline-line-tablesโ don't emit inline line tables. periodt.--gpu-bundle-outputโ bundle the output files of HIP device compilation ๐--gpu-instrument-lib=<value>โ instrument device library for HIP, which is an LLVM bitcode containing__cyg_profile_func_enterand__cyg_profile_func_exit--gpu-max-threads-per-block=<value>โ the default max threads per block for kernel launch bounds for HIP-gpulibcโ link the LLVM C Library for GPUs ๐-gsplit-dwarf=<value>โ set the DWARF fission mode-gstrict-dwarfโ restrict DWARF features to only the ones defined in the specified version, so you don't sneak in features from later versions. no gatecrashing ๐-gstructor-decl-linkage-namesโ attach linkage names to C++ constructor/destructor declarations in DWARF-gz=<value>โ the compression type for DWARF debug sections-G <size>โ put objects of at most size bytes into the small data section (MIPS / Hexagon)-gโ generate source-level debug information. the classic. the blueprint. ๐--help-hiddenโ display help for hidden options (yes bestie, the secret menu ๐)-helpโ display available options--hip-device-lib=<value>โ HIP device library--hip-linkโ linkclang-offload-bundlerbundles for HIP ๐ฅ--hip-path=<value>โ the HIP runtime installation path, used for finding the HIP version and adding the HIP include path--hip-version=<value>โ HIP version in the format ofmajor.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 withhipManagedMalloc/hipFreeequivalents--hipstdpar-path=<value>โ HIP Standard Parallel Algorithm Acceleration library path, used for finding and implicitly including the library header--hipstdpar-prim-path=<value>โrocPrimpath, required by the HIP Standard Parallel Algorithm Acceleration library, used to implicitly include therocPrimlibrary--hipstdpar-thrust-path=<value>โrocThrustpath, required by the HIP Standard Parallel Algorithm Acceleration library, used to implicitly include therocThrustlibrary--hipstdparโ enable HIP acceleration for standard parallel algorithms ๐-Hโ show header includes and nesting depth-I-โ restrict all prior-Iflags to double-quoted inclusion, and remove the current directory from the include path-iapinotes-modules <directory>โ add a directory to the API notes search path, referenced by module name-ibuiltinincโ enable builtin#includedirectories even when-nostdincis used before or after-ibuiltininc. Using-nobuiltinincafter this option disables it ๐-idirafter <value>โ add a directory to the AFTER include search path-iframeworkwithsysroot <directory>โ add a directory to the SYSTEM framework search path; absolute paths are relative to-isysroot-iframework <value>โ add a directory to the SYSTEM framework search path-ignore-pchโ disable precompiled headers; this overrides-emit-pchand-include-pch๐-imacros <file>โ include macros from file before parsing-include-pch <file>โ include a precompiled header file-include <file>โ include file before parsing-iprefix <dir>โ set the-iwithprefix/-iwithprefixbeforeprefix-iquote <directory>โ add a directory to the QUOTE include search path-isysroot <dir>โ set the system root directory (usually/) ๐ธ-isystem-after <directory>โ add a directory to the end of the SYSTEM include search path-isystem <directory>โ add a directory to the SYSTEM include search path-ivfsoverlay <value>โ overlay the virtual filesystem described by file on top of the real file system ๐ฆ-iwithprefixbefore <dir>โ set a directory to the include search path with prefix-iwithprefix <dir>โ set a directory to the SYSTEM include search path with prefix-iwithsysroot <directory>โ add a directory to the SYSTEM include search path; absolute paths are relative to-isysroot-I <dir>โ add a directory to the end of the list of include search paths--libclc-lib=<value>โ namespec of the libclc OpenCL bitcode library to link--libomptarget-amdgcn-bc-path=<value>โ path to thelibomptarget-amdgcnbitcode library--libomptarget-amdgpu-bc-path=<value>โ path to thelibomptarget-amdgcnbitcode library (yes bestie, same description as the one above, I'm just telling you what the page says ๐)--libomptarget-nvptx-bc-path=<value>โ path to thelibomptarget-nvptxbitcode library--libomptarget-spirv-bc-path=<value>โ path to thelibomptarget-spirvbitcode library-L <dir>โ add a directory to the library search path-mabi=quadword-atomicsโ enable quadword atomics ABI on AIX (AIX PPC64 only). Useslqarx/stqcx.instructions โก-mabicallsโ enable SVR4-style position-independent code (Mips only)-maix-shared-lib-tls-model-optโ for a shared library loaded with the main program, change local-dynamic access(es) to initial-exec access(es) at the function level (AIX 64-bit only)-maix-small-local-dynamic-tlsโ produce a faster access sequence for local-dynamic TLS variables where the offset from the TLS base is encoded as an immediate operand (AIX 64-bit only). > this access sequence is not used for variables larger than 32KB, so don't come crying to me about your giant variable ๐-maix-small-local-exec-tlsโ produce a faster access sequence for local-exec TLS variables where the offset from the TLS base is encoded as an immediate operand (AIX 64-bit only). > same deal: not used for variables larger than 32KB-maix-struct-returnโ return all structs in memory (PPC32 only)-malign-branch-boundary=<value>โ specify the boundary's size for aligning branches-malign-branch=<value>โ specify which types of branches to align-malign-doubleโ align doubles to two words in structs (x86 only)-maltivecโ enable AltiVec vector initializer syntax โจ-mamdgpu-expand-waitcnt-profilingโ expands_waitcntinstructions to help PC-sampling profilers spot memory stalls. Instead of a singlewaitcnt(target), it emitswaitcnt(N-1),waitcnt(N-2), โฆ,waitcnt(target). (AMDGPU 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) โ that's a big deal, bestie, don't do it casually ๐ญ-mamdgpu-precise-memory-opโ enable precise memory mode (AMDGPU only)-mannotate-tablejumpโ enable the annotate table jump instruction so it can be correlated with the jump table-mapx-features=<value>โ enable features of APX-mapx-inline-asm-use-gpr32โ enable use ofGPR32in 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 a 32-byte boundary-mcabacโ enable CABAC instructions ๐
-mcf-branch-label-scheme=<value>โ pick the label scheme for branch control-flow architecture protection โจ bestie choose your fighter-mcmseโ allow use of CMSE (Armv8-M Security Extensions) ๐ secure the bag-mcode-object-version=<value>โ specify code object ABI version. Defaults to6. (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'๐ฆ literally just ask for help-mcrbitsโ control the CR-bit tracking feature on PowerPC.-mcrbits(the enablement of CR-bit tracking support) is the default forPOWER8and above, as well as for all other CPUs when optimization is applied (-O2and above). ๐ฅ-mcrcโ allow use of CRC instructions (ARM/Mips only) ๐ธ-mcumodeโ specify CU wavefront execution mode (AMDGPU 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โ usediv.w[u]andmod.w[u]instructions with input not sign-extended. ๐ง-mdouble=<nโ force double to be<n>bits ๐ yes the flag is missing its closing>bestie we don't touch it-MDโ write a depfile containing user and system headers ๐-meabi <value>โ set EABI type. Default depends on triple) ๐ stray)is canon-membedded-dataโ place constants in the.rodatasection instead of the.sdatasection even if they meet the-G <size>threshold (MIPS) ๐-menable-experimental-extensionsโ enable use of experimental RISC-V extensions. ๐ฆ-mexec-model=<value>โ execution model (WebAssembly only) โญ-mexecute-onlyโ disallow generation of data access to code sections (AArch64/ARM only) ๐ฅ-mextern-sdataโ assume that externally defined data is in the small data if it meets the-G <size>threshold (MIPS) ๐-mfentryโ insert calls tofentryat function entry (x86/SystemZ only) ๐-mfix-cmse-cve-2021-35465โ work around VLLDM erratum CVE-2021-35465 (ARM only) ๐-mfix-cortex-a53-835769โ work around Cortex-A53 erratum 835769 (AArch64 only) ๐-mfix-cortex-a53-843419โ work around Cortex-A53 erratum 843419 (AArch64 only) ๐ธ-mfix-cortex-a57-aes-1742098โ work around Cortex-A57 Erratum 1742098 (ARM only) ๐-mfix-cortex-a72-aes-1655431โ work around Cortex-A72 Erratum 1655431 (ARM only) โจ-mfix-gr712rcโ enable workarounds for GR712RC errata ๐ง-mfix-ut700โ enable workarounds for UT700 errata ๐ฆ-mfp32โ use 32-bit floating point registers (MIPS only) โญ-mfp64โ use 64-bit floating point registers (MIPS only) ๐-mframe-chain=<value>โ select the frame chain model used to emit frame records (Arm only). ๐-mfrecipeโ enablefrecipe.{s/d}andfrsqrte.{s/d}๐ฅ-mfunction-return=<value>โ replace returns with jumps to__x86_return_thunk(x86 only, error otherwise) ๐-MF <file>โ write depfile output from-MMD,-MD,-MM, or-Mto<file>๐-mgeneral-regs-onlyโ generate code which only uses the general purpose registers (AArch64/x86 only) ๐-mglobal-mergeโ enable merging of globals ๐-mgpoptโ use GP relative accesses for symbols known to be in a small data section (MIPS) ๐ธ-mguard=<value>โ enable or disable Control Flow Guard checks and guard tables emission โจ-MGโ add missing headers to depfile ๐ง-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)๐-mhvx-ieee-fpโ enable Hexagon HVX IEEE floating-point ๐ฆ-mhvx-length=<value>โ set Hexagon Vector Length โญ-mhvx-qfloatโ enable Hexagon HVX QFloat instructions ๐-mhvx=<value>โ enable Hexagon Vector eXtensions ๐ฅ-mhvxโ enable Hexagon Vector eXtensions ๐-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 ๐-mimplicit-floatโ generate implicit floating point or vector instructions ๐-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 โจ-mindirect-jump=<value>โ change indirect jump instructions to inhibit speculation ๐ง-mios-version-min=<value>โ set iOS deployment target ๐ฆ-MJ <value>โ write a compilation database entry per input โญ-mlam-bhโ enableamswap[_db].{b/h}andamadd[_db].{b/h}๐-mlamcasโ enableamcas[_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 ๐-mlocal-sdataโ extend the-Gbehaviour to object local data (MIPS) ๐ธ-mlong-callsโ generate branches with extended addressability, usually via indirect jumps. โจ-mlong-double-128โ force long double to be 128 bits ๐ง-mlong-double-64โ force long double to be 64 bits ๐ฆ-mlong-double-80โ force long double to be 80 bits, padded to 128 bits for storage โญ-mlr-for-calls-onlyโ do not allocate the LR register for general purpose usage, only for calls. (AArch64 only) ๐-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 ๐-mmadd4โ enable the generation of 4-operandmadd.s,madd.dand related instructions. ๐-mmark-bti-propertyโ add.note.gnu.propertywith BTI to assembly files (AArch64 only) ๐-MMDโ write a depfile containing user headers ๐ธ-mmemopsโ enable generation of memop instructions โจ-mmlir <value>โ additional arguments to forward to MLIR's option processing ๐ง-mms-bitfieldsโ set the default structure layout to be compatible with the Microsoft compiler standard ๐ฆ-mmsaโ enable MSA ASE (MIPS only) โญ-mmtโ enable MT ASE (MIPS only) ๐-MMโ like-MMD, but also implies-Eand writes to stdout by default ๐ฅ-mno-abicallsโ disable SVR4-style position-independent code (Mips only) ๐-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-bti-at-return-twiceโ do not add a BTI instruction after asetjmpor other return-twice construct (Arm/AArch64 only) ๐-mno-constructor-aliasesโ disable emitting complete constructors and destructors as aliases when possible ๐ธ-mno-crcโ disallow use of CRC instructions (Mips only) โจ-mno-cumodeโ specify WGP wavefront execution mode (AMDGPU only) ๐ง-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 usediv.w[u]andmod.w[u]instructions with input not sign-extended. โญ-mno-embedded-dataโ do not place constants in the.rodatasection instead of the.sdataif they meet the-G <size>threshold (MIPS) ๐-mno-execute-onlyโ allow generation of data access to code sections (AArch64/ARM only) ๐ฅ-mno-extern-sdataโ do not assume that externally defined data is in the small data if it meets the-G <size>threshold (MIPS) ๐-mno-fix-cmse-cve-2021-35465โ don't work around VLLDM erratum CVE-2021-35465 (ARM only) ๐-mno-fix-cortex-a53-835769โ don't work around Cortex-A53 erratum 835769 (AArch64 only) ๐-mno-fix-cortex-a53-843419โ don't work around Cortex-A53 erratum 843419 (AArch64 only) ๐-mno-fix-cortex-a57-aes-1742098โ don't work around Cortex-A57 Erratum 1742098 (ARM only) ๐-mno-fix-cortex-a72-aes-1655431โ don't work around Cortex-A72 Erratum 1655431 (ARM only) ๐ธ-mno-fmvโ disable function multiversioning โจ-mno-frecipeโ disablefrecipe.{s/d}andfrsqrte.{s/d}๐ง-mno-gatherโ disable generation of gather instructions in auto-vectorization(x86 only) ๐ฆ-mno-global-mergeโ disable merging of globals โญ-mno-gpoptโ do not use GP relative accesses for symbols known to be in a small data section (MIPS) ๐-mno-hvx-ieee-fpโ disable Hexagon HVX IEEE floating-point ๐ฅ-mno-hvx-qfloatโ disable Hexagon HVX QFloat instructions ๐-mno-hvxโ disable Hexagon Vector eXtensions ๐-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โ disableamswap[_db].{b/h}andamadd[_db].{b/h}๐-mno-lamcasโ disableamcas[_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-local-sdataโ do not extend the-Gbehaviour to object local data (MIPS) ๐ฆ-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-madd4โ disable the generation of 4-operandmadd.s,madd.dand related instructions. ๐-mno-memopsโ disable generation of memop instructions ๐-mno-movtโ disallow use ofmovt/movwpairs (ARM only) ๐-mno-ms-bitfieldsโ nope, do not set the default struct layout to be Microsoft-compiler-compatible. Bye to that whole situation ๐-mno-msaโ kill the MSA ASE (MIPS only)-mno-mtโ kill the MT ASE (MIPS only)-mno-neg-immediatesโ not allowed: converting instructions that carry negative immediates into their negation or inversion. Sorry bestie ๐-mno-nvjโ turn off generation of new-value jumps-mno-nvsโ turn off generation of new-value stores-mno-outline-atomicsโ don't generate local calls to out-of-line atomic operations-mno-outlineโ disable function outlining (AArch64 only)-mno-packetsโ disable generation of instruction packets-mno-pic-data-is-text-relativeโ don't just assume data segments are relative to the text segment, ok? ๐ซถ-mno-regnamesโ when writing assembly output, use only register numbers-mno-relaxโ disable linker relaxation-mno-restrict-itโ allow generation of complex IT blocks-mno-save-restoreโ disable using library calls for save and restore-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 thesc.qinstruction-mno-sesesโ disable speculative execution side effect suppression (SESES)-mno-stack-arg-probeโ disable stack probes, which btw are enabled by default-mno-strict-alignโ allow memory accesses to be unaligned (AArch64/LoongArch/RISC-V only)-mno-tgsplitโ disable threadgroup split execution mode (AMDGPU 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 one 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-v8plusโ disable V8+ mode-mno-vector-strict-alignโ allow vector memory accesses to be unaligned (RISC-V only)-mno-wavefrontsize64โ specify wavefront size 32 mode (AMDGPU only)-mnocrcโ disallow use of CRC instructions (ARM only)-mnop-mcountโ generatemcount/__fentry__calls as nops. To activate they need to be patched in ๐ง-mnvjโ yes actually, enable generation of new-value jumps-mnvsโ enable generation of new-value stores-module-dependency-dir <value>โ directory to dump module dependencies to-module-file-infoโ spill the tea on a particular module file โ-momit-leaf-frame-pointerโ omit frame pointer setup for leaf functions-moutline-atomicsโ generate local calls to out-of-line atomic operations-moutlineโ enable function outlining (AArch64 only)-mpacked-stackโ use packed stack layout (SystemZ only)-mpacketsโ enable generation of instruction packets-mpad-max-prefix-size=<value>โ specify the 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 the preferred vector width for auto-vectorization. Defaults to'none', which lets the target make its own decisions โจ-mprintf-kind=<value>โ specify the printf lowering scheme (AMDGPU only), and the allowed values are"hostcall"(printing happens during kernel execution โ this scheme relies on hostcalls which require the 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)-MPโ create a phony target for each dependency (other than the main file)-mqdsp6-compatโ enable hexagon-qdsp6 backward compatibility-MQ <value>โ specify the name of the main file output to quote in the depfile-mrecip=<value>โ control use of approximate reciprocal and reciprocal square root instructions followed by<n>iterations of Newton-Raphson refinement. The grammar, fr fr:
<value> = ( ['!'] ['vec-'] ('rcp'|'sqrt') [('h'|'s'|'d')] [':'<n>] ) | 'all' | 'default' | 'none'
-mrecipโ equivalent to-mrecip=all, periodt-mrecord-mcountโ generate a__mcount_locsection 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-mreserve-frame-pointer-regโ reserve the frame pointer register even if the function doesn't have a frame ๐-mrestrict-itโ disallow generation of complex IT blocks. It is off by default.-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-msave-restoreโ enable using library calls for save and restore-mscalar-strict-alignโ force all scalar memory accesses to be aligned (RISC-V only)-mscqโ enable thesc.qinstruction-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', or'lasx'-mskip-rax-setupโ skip setting up the 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 the 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)-msve-streaming-vector-bits=<value>โ specify the size in bits of an SVE vector register in streaming mode. Defaults to the vector length agnostic value of"scalable". (AArch64 only) ๐-msve-vector-bits=<value>โ specify the size in bits of an SVE vector register. Defaults to the vector length agnostic value of"scalable". (AArch64 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-mtgsplitโ enable threadgroup split execution mode (AMDGPU only)-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 (this one's the 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 ๐-mtp=<value>โ thread pointer access method. For AArch32:'soft'uses a function call, or'tpidrurw','tpidruro'or'tpidrprw'use the three CP15 registers.'cp15'is an alias for'tpidruro'. For AArch64:'tpidr_el0','tpidr_el1','tpidr_el2','tpidr_el3'or'tpidrro_el0'use the five system registers.'elN'is an alias for'tpidr_elN'.-mtune=<value>โ only supported on AArch64, PowerPC, RISC-V, SPARC, SystemZ, and X86-MT <value>โ specify the name of the main file output in the depfile-multi-lib-config=<file>โ path to the YAML configuration file to be used for multilib selection-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)-mv8plusโ enable V8+ mode, allowing use of 64-bit V9 instructions in 32-bit code-mvector-strict-alignโ force all vector memory accesses to be aligned (RISC-V only)-mvevpuโ emit VPU instructions for VE-MVโ use NMake/Jom format for the depfile-mwavefrontsize64โ specify wavefront size 64 mode (AMDGPU only)-mxcoff-build-id=<0xHEXSTRING>โ on AIX, request creation of a build-id string,"0xHEXSTRING", in the string table of the loader section inside the linked binary-mxcoff-roptrโ place constant objects with relocatable address values in the RO data section and add-bforceimprwto the linker flags (AIX only)-mzos-hlq-clang=<ClangHLQ>โ high level qualifier for z/OS C++RT side deck datasets-mzos-hlq-csslib=<CsslibHLQ>โ high level qualifier for z/OS CSSLIB dataset-mzos-hlq-le=<LeHLQ>โ high level qualifier for z/OS Language Environment datasets-mzos-sys-include=<SysInclude>โ path to system headers on z/OS-mzos-target=<value>โ set the z/OS release of the runtime environment-Mโ like-MD, but it also implies-Eand writes to stdout by default ๐--no-cuda-include-ptx=<value>โ okay so this is you telling clang "bestie, do not include PTX for this GPU architecture" โ you pass a value likesm_35, or literally just'all'if you're feeling chaotic ๐ May be specified more than once, so stack 'em if you got 'em.--no-cuda-version-checkโ normally if the CUDA install you've got is too low a version for the CUDA gpu architecture you asked for, clang errors out and ruins your day. This flag says "no, don't do that" and skips the error ๐--no-default-configโ disables loading the default configuration files. they simply do not load. โจ--no-gpu-bundle-outputโ do not bundle the output files of HIP device compilation.-no-hip-rtโ do not link against the HIP runtime libraries.--no-offload-arch=<value>โ removes a CUDA/HIP offloading device architecture (e.g.sm_35,gfx906) from the list of devices to compile for. Pass'all'and it resets the whole list back to its default value ๐--no-offload-incโ no include paths for CUDA/HIP, and no including the default CUDA/HIP wrapper headers either.--no-offload-new-driverโ don't Use the new driver for offloading compilation.--no-offloadlibโ do not link the device library for CUDA/HIP/SYCL device compilation.--no-system-header-prefix=<prefix>โ every#includepath that starts with<prefix>gets treated as not including a system header.--no-wasm-optโ disables the wasm-opt optimizer. gone. ๐ซ-nobuiltinincโ disables the builtin#includedirectories only.-nohipwrapperincโ does not include the default HIP wrapper headers, and not the include paths either.-nolibsyclโ do not link the SYCL runtime library.-nostdinc++โ disables the standard#includedirectories for the C++ standard library.-nostdincโ disables both the standard system#includedirectories and the builtin#includedirectories. everything. all at once. ๐-nostdlibincโ disables the standard system#includedirectories only.-ObjC++โ treat source input files as Objective-C++ inputs ๐-ObjCโ treat source input files as Objective-C inputs.-object-file-name=<file>โ sets the output<file>for debug infos.-Ofast<value>โ deprecated! the elders say use'-O3 -ffast-math'for the exact same behavior, or just'-O3'if you want only the conforming optimizations. no cap.--offload-arch-tool=<value>โ the 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). Pass'native'and the compiler will detect the locally installed architectures for you, so iconic. 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 and SYCL only).--offload-device-onlyโ only compile for the offloading device.--offload-host-deviceโ compile for both the offloading host and device. this one's the default btw ๐ซถ--offload-host-onlyโ only compile for the offloading host.--offload-incโ add include paths for CUDA/HIP and include the default CUDA/HIP wrapper headers. also the default ๐--offload-jobs=<value>โ specify the number of threads to use for device offloading tasks during compilation. can be a positive integer, or the string'jobserver'to use the make-style jobserver from the environment. multitasking queen.--offload-linkโ use the new offloading linker to perform the link job.--offload-new-driverโ use the new driver for offloading compilation.--offload-targets=<value>โ specify a list of target architectures to use for offloading.--offload=<value>โ specify a comma-separated list of offloading target triples (CUDA and HIP only).--offloadlibโ link device libraries for GPU device compilation.-o <file>โ write output to<file>.-pedanticโ warn on language extensions. no extensions. be normal. ๐ญ-pgโ enable mcount instrumentation.-pipeโ use pipes between commands, when possible.--precompileโ only precompile the input.--pretty-sgfโ emit pretty printed symbol graphs. pretty!!! ๐-print-diagnostic-optionsโ print all of Clang's warning options. all of them.-print-effective-tripleโ print the effective target triple.-print-enabled-extensionsโ print the extensions enabled by the given target and-march/-mcpuoptions. (AArch64 and RISC-V only)-print-file-name=<file>โ print the full library path of<file>.-print-ivar-layoutโ enable Objective-C Ivar layout bitmap print trace.-print-libgcc-file-nameโ print the library path for the compiler runtime library currently in use ("libgcc.a"or"libclang_rt.builtins.*.a").-print-library-module-manifest-pathโ print the path for the C++ Standard library module manifest.-print-multi-flags-experimentalโ print the flags used for selecting multilibs (experimental ๐).-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 the 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 the target isn't specified, it will print the supported cpus for the default target).-print-supported-extensionsโ print supported-marchextensions (RISC-V, AArch64 and ARM only).-print-target-tripleโ print the normalized target triple.-print-targetsโ print the registered targets.-pthreadโ support POSIX threads in generated code.--ptxas-path=<value>โ path toptxas(used for compiling CUDA code).
-Pโ disable linemarker output in-Emode.-pโ enable mcount instrumentation with prof.-Qnโ do not emit metadata containing the compiler name and version.-Qunused-argumentsโ don't emit a warning for unused driver arguments. mind your business, driver.-Qyโ emit metadata containing the compiler name and version.-regcall4โ set__regcall4as a default calling convention to respect__regcallABI v.4.-relocatable-pchโ whether to build a relocatable precompiled header.-resource-dir <value>โ the directory which holds the compiler resource files.-rewrite-legacy-objcโ rewrite Legacy Objective-C source to C++.-rewrite-objcโ rewrite Objective-C source to C++.--rocm-device-lib-path=<value>โ ROCm device library path. Alternative torocm-path.--rocm-path=<value>โ ROCm installation path, used for finding and automatically linking required bitcode libraries.-Rpass-analysis=<value>โ report transformation analysis from optimization passes whose name matches the given POSIX regular expression.-Rpass-missed=<value>โ report missed transformations by optimization passes whose name matches the given POSIX regular expression.-Rpass=<value>โ report transformations performed by optimization passes whose name matches the given POSIX regular expression.-rtlib=<value>โ compiler runtime library to use.-R<remark>โ enable the specified remark.-save-offload-code=<value>โ save offload code generated during compilation into the user provided directory.-save-stats=<value>โ save llvm statistics.-save-statsโ save llvm statistics.-save-temps=<value>โ save intermediate compilation results.<arg>can be set to'cwd'for current working directory, or'obj'which will save temporary files in the same directory as the final output file.-save-tempsโ alias for--save-temps=cwd.-serialize-diagnostics <value>โ serialize compiler diagnostics to a file.-shared-libsanโ dynamically link the sanitizer runtime.--start-no-unused-argumentsโ don't emit warnings about unused arguments for the following arguments. (a little "shhh" for everything after it ๐ซถ)-static-libclosureโ generate code for statically linking libclosure (BlocksRuntime).-static-libsanโ statically link the sanitizer runtime (Not supported for ASan, TSan or UBSan on darwin).-static-openmpโ use the static host OpenMP runtime while linking.-std=<value>โ language standard to compile for.-stdlib++-isystem <directory>โ use directory as the C++ standard library include path.-stdlib=<value>โ C++ standard library to use.-sycl-std=<value>โ SYCL language standard to compile for.--symbol-graph-dir=<value>โ directory in which to emit symbol graphs.--system-header-prefix=<prefix>โ treat all#includepaths starting with<prefix>as including a system header.-Sโ only run preprocess and compilation steps.--target=<value>โ generate code for the given target.-timeโ time individual commands. clock it, bestie โฑ๏ธ-traditional-cppโ enable some traditional CPP emulation.-trigraphsโ process trigraph sequences.-T <script>โ specify<script>as linker script.-undefโ undef all system defines.-unwindlib=<value>โ unwind library to use.-U <macro>โ undefine macro<macro>.--verify-debug-infoโ verify the binary representation of debug output.-verify-pchโ load and verify that a pre-compiled header file is not stale. get that PCH a vibe check ๐ฆ--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.-vโ show commands to run and use verbose output.-Wa,<arg>โ pass the comma separated arguments in<arg>to the assembler.--warning-suppression-mappings=<value>โ file containing diagnostic suppression mappings. See user manual for file format.--wasm-optโ enable the wasm-opt optimizer (default).-Wl,<arg>โ pass the comma separated arguments in<arg>to the linker.-working-directory <value>โ resolve file paths relative to the specified directory.-Wp,<arg>โ pass the comma separated arguments in<arg>to the preprocessor.-W<warning>โ enable the specified warning.-wโ suppress all warnings. shhh. ๐คซ-Xanalyzer <arg>โ pass<arg>to the static analyzer.-Xarch_device <arg>โ pass<arg>to device compilation in the offloading toolchain.-Xarch_host <arg>โ pass<arg>to host compilation in the offloading toolchain.-Xarch_<arch> <arg>โ if the target matches <arch>, then boom, <arg> goes straight to the compilation. Conditional bestie behavior โจ-Xassembler <arg>โ hands <arg> over to the assembler-Xclang=<arg>โ just an alias for-Xclang. that's it, that's the whole job ๐-Xclangas=<arg>โ alias for-Xclangas, same vibe-Xclangas <arg>โ passes <arg> toclang -cc1as-Xclang <arg>โ passes <arg> toclang -cc1-Xcuda-fatbinary <arg>โ passes <arg> into the fatbinary invocation-Xcuda-ptxas <arg>โ passes <arg> to the ptxas assembler-Xlinker <arg>โ passes <arg> to the linker-Xoffload-linker<triple> <arg>โ passes <arg> to the offload linkers, or specifically to the ones identified by-<triple>-Xopenmp-target=<triple> <arg>โ passes <arg> to the target offloading toolchain that <triple> points at.-Xopenmp-target <arg>โ passes <arg> to the target offloading toolchain. no triple needed, it just goes ๐ซถ-Xpreprocessor <arg>โ passes <arg> to the preprocessor-Xsycl-target-backend=<triple> <arg>โ passes <arg> to the SYCL based backend that <triple> identifies.-Xsycl-target-backend <arg>โ passes <arg> to the SYCL based target backend.-Xsycl-target-frontend=<triple> <arg>โ passes <arg> to the SYCL based target frontend that <triple> identifies.-Xsycl-target-frontend <arg>โ passes <arg> to the SYCL based target frontend.-Xsycl-target-linker=<triple> <arg>โ passes <arg> to the SYCL based target linker that <triple> identifies.-Xsycl-target-linker <arg>โ passes <arg> to the SYCL based target linker.-Xs <arg>โ passes <arg> to the offline compiler.-Xs<arg>โ passes <arg> to the offline compiler, except it also slaps the option specifier-onto the front of <arg> first. sneaky but iconic ๐-Xthinlto-distributor=<arg>โ passes <arg> to the ThinLTO distributor process. you can drop this one multiple times, or comma-separate the values, whichever fits your vibe.-x <language>โ treats every input file after this point as being type <language>-z <arg>โ passes-z <arg>to the linker
๐ dxc compatibility options ๐
okay so these next ones are the let's move from DXC to Clang squad, bestie ๐
--dxv-path=<value>โ DXIL validator installation path-fdx-rootsignature-define=<value>โ overrides the entry function root signature with the root signature sitting at the given macro name.-fdx-rootsignature-version=<value>โ Root Signature Version-fspv-extension=<value>โ tells it which SPIR-V extensions are available. if you don't pass this one at all, then all extensions are available (greedy, love that for us). if you passKHR, then all theKHRextensions are available. and if you passDXC, then all the extensions implemented by theDirectX Shader compilerbecome available. this one is literally the move if you're migrating from DXC over to Clang.-fspv-target-env=<value>โ specifies the target environment/hlsl-all-resources-boundโ enables agressive flattening-hlsl-entry <value>โ entry point name for hlsl
๐ SEE ALSO ๐
the whole entire full documentation for clang-22 lives as a Texinfo manual. so if the info program and the clang-22 program are both properly installed on your machine, this command
info clang-22
is gonna hand you the complete manual. go get it, it's giving encyclopedia but make it cute ๐ฆ
and that's a wrap on the whole page, bestie!! no cap, you read all of it ๐
this beauty comes to you from clang-22 7.0.1-0ubuntu2, dated September 2026, and it answers to the name CLANG-22(1) ๐ mwah, go compile something iconic ๐โจ
๐ฆ where this page comes from
- ubuntu stonking: dpclang-7 7.0.1-0ubuntu2 ยท APACHE-2-LLVM-EXCEPTIONS
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms