CLANG-21(1)
๐ CLANG-21(1) ๐
User Commands
okay so bestie, you know how we need a compiler for oneAPI? This is clang-21, the LLVM compiler. It's giving main character energy for real. Let me walk you through it. ๐ซถ
NAME
clang-21 โ clang LLVM compiler for oneAPI
DESCRIPTION
OVERVIEW: clang LLVM compiler
USAGE:
clang-21 [options] file...
โจ OPTIONS โจ
Now the options, bestie. There are a LOT. But don't worry, I got you. ๐
-###โ Print (but do not run) the commands to run for this compilation. It's like a little sneak peek, but it doesn't actually do anything. Just shows you the vibes. ๐--amdgpu-arch-tool=<value>โ Tool used for detecting AMD GPU arch in the system.--analyzer-output <value>โ Static analyzer report output format (html|plist|plist-multi-file|plist-html|sarif|sarif-html|text).--analyzeโ Run the static analyzer.-B <prefix>โ Search$prefix$filefor executables, libraries, and data files. If$prefixis a directory, search$prefix/$file.-b <arg>โ Pass-b <arg>to the linker on AIX.-CCโ Include comments from within macros in preprocessed output.-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.-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.--config=<file>โ Specify configuration file.--cuda-compile-host-deviceโ Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.--cuda-device-onlyโ Compile CUDA code for device only.--cuda-feature=<value>โ Manually specify the CUDA feature to use.--cuda-host-onlyโ Compile CUDA code for host only. Has no effect on non-CUDA compilations.--cuda-include-ptx=<value>โ Include PTX for the following GPU architecture (e.g.sm_35) or'all'. May be specified more than once.--cuda-noopt-device-debugโ Enable device-side debug info generation. Disables ptxas optimizations.--cuda-path-ignore-envโ Ignore environment variables to detect CUDA installation.--cuda-path=<value>โ CUDA installation path.-cuid=<value>โ An ID for compilation unit, which should be the same for the same compilation unit but different for different compilation units. It is used to externalize device-side static variables for single source offloading languages CUDA and HIP so that they can be accessed by the host code of the same compilation unit.-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.-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.-fallow-editor-placeholdersโ Treat editor placeholders as valid source code.-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.-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.-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).-fcall-saved-x13โ Make thex13register call-saved (AArch64 only).-fcall-saved-x14โ Make thex14register call-saved (AArch64 only).-fcall-saved-x15โ Make thex15register call-saved (AArch64 only).-fcall-saved-x18โ Make thex18register call-saved (AArch64 only).-fcall-saved-x8โ Make thex8register call-saved (AArch64 only).-fcall-saved-x9โ Make thex9register call-saved (AArch64 only).-fcaret-diagnostics-max-lines=<value>โ Set the maximum number of source lines to show in a caret diagnostic (0= no limit).-fcf-protection=<value>โ Instrument control-flow architecture protection.-fcf-protectionโ Enable cf-protection in 'full' mode. ๐-fchar8_tโ Enable the C++ builtin typechar8_t. โจ-fcheck-newโ Do not assume C++operator newmay not returnNULL. ๐ซถ-fclang-abi-compat=<version>โ Attempt to match the ABI of Clang<version>. ๐-fclangirโ Use the ClangIR pipeline to compile. ๐ฅ-fcodegen-data-generate=<path>โ Emit codegen data into the object file. LLD for MachO (currently) merges them into the specified<path>. ๐พ-fcodegen-data-generateโ Emit codegen data into the object file. LLD for MachO (currently) merges them intodefault.cgdata. ๐พ-fcodegen-data-use=<path>โ Use codegen data read from the specified<path>. ๐-fcodegen-data-useโ Use codegen data read fromdefault.cgdatato optimize the binary. ๐-fcolor-diagnosticsโ Enable colors in diagnostics. ๐-fcomment-block-commands=<arg>โ Treat each comma separated argument in<arg>as a documentation comment block command. ๐-fcommonโ Place uninitialized global variables in a common block. ๐งฑ-fcomplete-member-pointersโ Require member pointer base types to be complete if they would be significant under the Microsoft ABI. ๐ช-fconstexpr-backtrace-limit=<value>โ Set the maximum number of entries to print in a constexpr evaluation backtrace (0= no limit). ๐-fconstexpr-depth=<value>โ Set the maximum depth of recursive constexpr function calls. ๐ช-fconstexpr-steps=<value>โ Set the maximum number of steps in constexpr function evaluation. ๐ฃ-fconvergent-functionsโ Assume all functions may be convergent. ๐ซง-fcoro-aligned-allocationโ Prefer aligned allocation for C++ Coroutines. ๐ฏ-fcoroutinesโ Enable support for the C++ Coroutines. ๐งต-fcoverage-compilation-dir=<value>โ The compilation directory to embed in the coverage mapping. ๐บ๏ธ-fcoverage-mappingโ Generate coverage mapping to enable code coverage analysis. ๐-fcoverage-mcdcโ Enable MC/DC criteria when generating code coverage. ๐งช-fcoverage-prefix-map=<old>=<new>โ Remap file source paths<old>to<new>in coverage mapping. If there are multiple options, prefix replacement is applied in reverse order starting from the last one. ๐-fcrash-diagnostics-dir=<dir>โ Put crash-report files in<dir>. ๐ฅ-fcrash-diagnostics=<value>โ Set level of crash diagnostic reporting, (option:off,compiler,all). ๐จ-fcrash-diagnosticsโ Enable crash diagnostic reporting (default). ๐จ-fcs-profile-generate=<directory>โ Generate instrumented code to collect context sensitive execution counts into<directory>/default.profraw(overridden byLLVM_PROFILE_FILEenv var). ๐-fcs-profile-generateโ Generate instrumented code to collect context sensitive execution counts intodefault.profraw(overridden byLLVM_PROFILE_FILEenv var). ๐-fcuda-prec-sqrtโ Specify thatsqrtis correctly rounded (for CUDA devices). ๐งฎ-fcuda-short-ptrโ Use 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โ Enable C++ exceptions. ๐จ-fcxx-modulesโ Enable modules for C++. ๐ฆ-fdata-sectionsโ Place each data in its own section. ๐๏ธ-fdebug-compilation-dir=<value>โ The compilation directory</...> to embed in the debug info. ๐-fdebug-default-version=<value>โ Default DWARF version to use, if a-goption caused DWARF debug info to be produced. ๐ท๏ธ-fdebug-info-for-profilingโ Emit extra debug info to make sample profile more accurate. ๐ฏ-fdebug-macroโ Emit macro debug information. ๐ช-fdebug-prefix-map=<old>=<new>โ For paths in debug info, remap directory<old>to<new>. If multiple options match a path, the last option wins. ๐ฅ-fdebug-ranges-base-addressโ Use DWARF base address selection entries in.debug_ranges. ๐-fdebug-types-sectionโ Place debug types in their own section (ELF Only). ๐งฌ-fdeclspecโ Allow__declspecas a keyword. ๐-fdefine-target-os-macrosโ Enable predefined target OS macros. ๐ฅ๏ธ-fdelayed-template-parsingโ Parse templated function definitions at the end of the translation unit. โณ-fdelete-null-pointer-checksโ Treat usage of null pointers as undefined behavior (default). ๐-fdiagnostics-absolute-pathsโ Print absolute paths in diagnostics. ๐งญ-fdiagnostics-color=<value>โ When to use colors in diagnostics. ๐จ-fdiagnostics-hotness-threshold=<value>โ Prevent optimization remarks</...> from being output if they do not have at least this profile count. Use'auto'to apply the threshold from profile summary. ๐ก๏ธ-fdiagnostics-misexpect-tolerance=<value>โ Prevent misexpect diagnostics from being output if the profile counts are within N% of the expected. ๐-fdiagnostics-parseable-fixitsโ Print fix-its in machine parseable form. ๐ค-fdiagnostics-print-source-range-infoโ Print source range spans in numeric form. ๐ข-fdiagnostics-show-hotnessโ Enable profile hotness information in diagnostic line. ๐ฅ-fdiagnostics-show-note-include-stackโ Display include stacks for diagnostic notes. ๐ฅ-fdiagnostics-show-optionโ Print option name with mappable diagnostics. ๐ท๏ธ-fdiagnostics-show-template-treeโ Print a template comparison tree for differing templates. ๐ณ-fdigraphsโ Enable alternative token representations'<:', ':>', '<%', '%>', '%:', '%:%:'(default). ๐ช-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โ Discard value names in LLVM IR. ๐๏ธ-fdollars-in-identifiersโ Allow'$'in identifiers. ๐ฒ-fdriver-onlyโ Only run the driver. ๐-fdwarf-exceptionsโ Use DWARF style exceptions. ๐ง-feliminate-unused-debug-typesโ Do not emit debug info for defined but unused types. ๐งน-fembed-bitcode-markerโ Embed placeholder LLVM IR data as a marker. ๐-fembed-bitcode=<option>โ Embed LLVM bitcode. ๐ง-fembed-bitcodeโ Embed LLVM IR bitcode as data. ๐ง-fembed-offload-object=<value>โ Embed Offloading device-side binary</...> into host object file as a section. ๐ฆ-femit-all-declsโ Emit all declarations, even if unused. ๐ข-femit-compact-unwind-non-canonicalโ Try emitting Compact-Unwind for non-canonical entries. Maybe overridden by other constraints. ๐ช-femit-dwarf-unwind=<value>โ When to emit DWARF unwind (EH frame) info. ๐งต-femulated-tlsโ Use emutls functions to access thread_local variables. ๐งต-fenable-matrixโ Enable matrix data type and related builtin functions. ๐ข-fexceptionsโ Enable support for exception handling. ๐จ-fexcess-precision=<value>โ Allows control over excess precision on targets where native support for the precision types is not available. By default, excess precision is used to calculate intermediate results following the rules specified in ISO C99. ๐งฎ-fexperimental-late-parse-attributesโ Enable experimental late parsing of attributes. ๐งช-fexperimental-libraryโ Control whether unstable and experimental library features are enabled. This option enables various library features that are either experimental (also known as TSes), or have been but are not stable yet in the selected Standard Library implementation. It is not recommended to use this option in production code, since neither ABI nor API stability are guaranteed. This is intended to provide a preview of features that will ship in the future for experimentation purposes. ๐ฎ-fexperimental-new-constant-interpreterโ Enable 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โ Use the experimental C++ class ABI for classes with virtual tables. ๐งช-fexperimental-sanitize-metadata-ignorelist=<value>โ Disable sanitizer metadata for modules and functions that match the provided special case list. ๐ก๏ธ-fexperimental-sanitize-metadata=<value>โ Specify the type of metadata to emit for binary analysis sanitizers. ๐ก๏ธ-fexperimental-strict-floating-pointโ Enables the use of non-default rounding modes and non-default exception handling on targets that are not currently ready. ๐งช-fextend-arguments=<value>โ Controls how scalar integer arguments are extended in calls to unprototyped and varargs functions. ๐-fextend-variable-liveness=<value>โ Extend 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โ Allow aggressive, lossy floating-point optimizations. โก-ffat-lto-objectsโ Enable fat LTO object support. ๐ง-ffile-compilation-dir=<value>โ The compilation directory</...> to embed in the debug info and coverage mapping. ๐-ffile-prefix-map=<value>โ Remap file source paths in debug info, coverage mapping, predefined preprocessor macros and__builtin_FILE(). Implies-ffile-reproducible. ๐-ffile-reproducibleโ Use the target's platform-specific path separator character when expanding the__FILE__macro. ๐๏ธ-ffine-grained-bitfield-accessesโ Use separate accesses for consecutive bitfield runs with legal widths and alignments. ๐งฉ-ffinite-loopsโ Assume all non-trivial loops are finite. โพ๏ธ-ffinite-math-onlyโ Allow floating-point optimizations</...> that assume arguments and results are not NaNs or +-inf. This defines the__FINITE_MATH_ONLY__preprocessor macro. ๐งฎ-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โ bestie, this locks down thea5register so the compiler won't touch it (M68k only) ๐-ffixed-a6โ same vibe, but fora6(M68k only) โจ-ffixed-d0โ reserving thed0register, hands off (M68k only) ๐-ffixed-d1โd1is taken, no touchy (M68k only) ๐-ffixed-d2โ you guessed it:d2is reserved (M68k only) โจ-ffixed-d3โd3stays untouched, periodt (M68k only) ๐-ffixed-d4โ reservingd4like it's the last slice of cake (M68k only) ๐-ffixed-d5โd5is officially off-limits (M68k only) ๐-ffixed-d6โd6reserved, the compiler said "not me" (M68k only) ๐-ffixed-d7โ reservingd7and that's on that (M68k only) ๐-ffixed-g1โ theG1register is reserved (SPARC only) ๐-ffixed-g2โG2stays in its lane (SPARC only) โจ-ffixed-g3โG3reserved, don't even think about it (SPARC only) ๐-ffixed-g4โG4is booked and busy (SPARC only) ๐-ffixed-g5โ reservingG5, no cap (SPARC only) ๐-ffixed-g6โG6off the table (SPARC only) ๐ธ-ffixed-g7โG7reserved, final answer (SPARC only) โจ-ffixed-i0โI0register reserved (SPARC only) ๐-ffixed-i1โI1stays untouched (SPARC only) ๐-ffixed-i2โI2is not for the compiler today (SPARC only) ๐-ffixed-i3โ reservingI3(SPARC only) ๐-ffixed-i4โI4reserved, deal with it (SPARC only) ๐-ffixed-i5โI5hands off (SPARC only) โจ-ffixed-l0โL0register reserved (SPARC only) ๐-ffixed-l1โL1stays yours (SPARC only) ๐-ffixed-l2โ reservingL2(SPARC only) ๐-ffixed-l3โL3is protected (SPARC only) ๐ฆ-ffixed-l4โL4reserved, iykyk (SPARC only) โจ-ffixed-l5โL5not up for grabs (SPARC only) ๐-ffixed-l6โ reservingL6(SPARC only) ๐ธ-ffixed-l7โL7reserved, iconic (SPARC only) ๐-ffixed-o0โO0register reserved (SPARC only) ๐-ffixed-o1โO1stays safe (SPARC only) ๐-ffixed-o2โ reservingO2(SPARC only) โจ-ffixed-o3โO3off-limits (SPARC only) ๐-ffixed-o4โO4reserved (SPARC only) ๐-ffixed-o5โO5reserved too, obviously (SPARC only) ๐-ffixed-pointโ turns on fixed point types โจ-ffixed-r19โ reserve registerr19(Hexagon only) ๐-ffixed-r9โ reserve ther9register (ARM only) ๐-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) ๐
-fforce-check-cxx20-modules-input-filesโ makes it check the input source files from C++20 modules explicitly ๐-fforce-dwarf-frameโ always emit a debug frame section, no skipping ๐-fforce-emit-vtablesโ emits more virtual tables so devirtualization gets better ๐ฅ-fforce-enable-int128โ turns on support for theint128_ttype ๐ช-ffp-accuracy=<value>โ tells it exactly how accurate floating-point operations and library calls need to be ๐ฏ-ffp-contract=<value>โ forms fused FP ops (like FMAs) ๐งฌ-ffp-eval-method=<value>โ picks the evaluation method used for floating-point arithmetic โจ-ffp-exception-behavior=<value>โ sets the exception behavior of floating-point operations ๐จ-ffp-model=<value>โ controls the semantics of floating-point calculations, aka the whole vibe of your FP math ๐-ffreestandingโ asserts that the compilation takes place in a freestanding environment ๐ง-ffuchsia-api-level=<value>โ set the Fuchsia API level ๐-ffunction-sectionsโ puts each and every function in its own section, so organized bestie ๐๏ธ-fglobal-iselโ enables the global instruction selector ๐-fgnu-keywordsโ allows GNU-extension keywords no matter what the language standard says ๐-fgnu-runtimeโ generates output compatible with the standard GNU Objective-C runtime ๐-fgnu89-inlineโ uses thegnu89inline semantics โจ-fgnuc-version=<value>โ sets various macros to claim compatibility with the given GCC version (default is4.2.1) ๐ญ-fgpu-allow-device-initโ allow device side init function in HIP (experimental) ๐งช-fgpu-approx-transcendentalsโ use approximate transcendental functions ๐-fgpu-default-stream=<value>โ specify the default stream. The default value is'legacy'. (CUDA/HIP only) ๐ซ-fgpu-defer-diagโ defers host/device related diagnostic messages for CUDA/HIP ๐คซ-fgpu-flush-denormals-to-zeroโ flushes denormal floating point values to zero in CUDA/HIP device mode ๐งน-fgpu-rdcโ generates relocatable device code, also known as separate compilation mode ๐ฆ-fgpu-sanitizeโ enables sanitizer for supported offloading devices ๐งผ-fheinous-gnu-extensionsโ (Deprecated) controls whether-Winvalid-gnu-asm-castdefaults to an error or a warning โ ๏ธ-fhip-emit-relocatableโ compile HIP source to relocatable ๐-fhip-fp32-correctly-rounded-divide-sqrtโ specifies that single precision floating-point divide and sqrt used in the program source are correctly rounded (HIP device compilation only) ๐ฏ-fhip-kernel-arg-nameโ specifies that kernel argument names are preserved (HIP only) ๐ท๏ธ-fhip-new-launch-apiโ uses the new kernel launching API for HIP ๐-fhlsl-strict-availabilityโ enables strict availability diagnostic mode for HLSL built-in functions ๐-fhonor-infinitiesโ says floating-point optimizations are not allowed if they assume arguments and results aren'tยฑinfโพ๏ธ-fhonor-nansโ same energy but for NANs: no optimizations that assume args and results aren't NANs ๐-fignore-exceptionsโ enables support for ignoring exception handling constructs ๐ค-fimplicit-module-mapsโ implicitly searches the file system for module map files ๐-fincremental-extensionsโ enables incremental processing extensions, like processing statements on the global scope ๐งฉ-finit-global-zeroโ zero initialize globals without default initialization (this is the default) 0๏ธโฃ-finline-functionsโ inlines suitable functions ๐-finline-hint-functionsโ inlines functions which are (explicitly or implicitly) marked inline ๐ซถ-finline-max-stacksize=<value>โ suppresses inlining of functions whose stack size exceeds the given value ๐ง-finput-charset=<value>โ specify the default character set for source files ๐ค-finstrument-function-entry-bareโ instruments function entry only, after inlining, with no arguments to the instrumentation call ๐ฏ-finstrument-functions-after-inliningโ like-finstrument-functions, but inserts the calls after inlining ๐ช-finstrument-functionsโ generates calls to instrument function entry and exit ๐ฌ-fintegrated-asโ enables the integrated assembler ๐ ๏ธ-fintegrated-cc1โ runscc1in-process ๐-fintegrated-objemitterโ use internal machine object code emitter ๐ญ-fjmcโ enables just-my-code debugging ๐ต๏ธ-fjump-tablesโ uses jump tables for lowering switches ๐ช-fkeep-persistent-storage-variablesโ enables keeping all variables that have a persistent storage duration โ including global, static and thread-local variables โ so they're guaranteed to be directly addressable ๐-fkeep-static-constsโ keeps static const variables even if they're unused ๐พ-fkeep-system-includesโ instead of expanding system headers when emitting preprocessor output, preserves the#includedirective. Useful when producing preprocessed output for test case reduction. May produce incorrect output if preprocessor symbols that control the included content (e.g._XOPEN_SOURCE) are defined in the including source file. The portability of the resulting source to other compilation environments is not guaranteed. ๐ฅ
Only valid with -E. ๐ like, only, bestie
-flax-vector-conversions=<value>โ enables implicit vector bit-casts ๐-flink-huge-device-codeโ generates and uses a custom linker script for huge device code sections ๐-flto-jobs=<value>โ controls the backend parallelism of-flto=thin(the default of0means the number of threads will be derived from the number of CPUs detected) โ๏ธ-flto=autoโ enables LTO in'full'mode ๐-flto=jobserverโ enables LTO in'full'mode ๐ซก-flto=<value>โ set LTO mode ๐๏ธ-fltoโ enables LTO in'full'mode ๐-fmacro-backtrace-limit=<value>โ caps how many entries get printed in a macro expansion backtrace, bestie. Set it to0and there's no limit at all, go feral ๐-fmacro-prefix-map=<value>โ remaps file source paths inside the predefined preprocessor macros and__builtin_FILE(). Lowkey implies-ffile-reproducible, so it's doing two things at once, icon behavior โจ-fmath-errnoโ makes math functions report errors by settingerrno. Old school, but she shows up ๐-fmax-tokens=<value>โ the max total number of preprocessed tokens for-Wmax-tokens. Yes, there's a token limit, this is the token limit ๐-fmax-type-align=<value>โ sets the maximum alignment to enforce on pointers that don't have an explicit alignment. Boundaries, but for pointers ๐-fmemory-profile-use=<pathname>โ uses a memory profile for profile-guided memory optimization. Feeding her her own diary so she optimizes better ๐ฆ-fmemory-profile=<directory>โ turns on heap memory profiling and dumps the results into<directory>๐-fmemory-profileโ turns on heap memory profiling, no directory, no thoughts, just vibes ๐ธ-fmerge-all-constantsโ allows merging of constants. They become one ๐ญ-fmessage-length=<value>โ formats message diagnostics so they fit within N columns. Terminal-width girlies, this one's for you โจ-fminimize-whitespaceโ ignores whitespace from the input file when emitting preprocessor output. The output only contains whitespace when it's necessary, like keeping two minus signs from merging into an increment operator. Super useful with the-Poption to normalize whitespace so that two files with only formatting changes come out equal. Only valid with-Eon C-like inputs, and incompatible with-traditional-cpp. No cap, read that twice ๐-fmodule-file=[<name>=]<file>โ maps a module name to a precompiled module file, or just loads a module file if you leave the name off. Choose your own adventure ๐ง-fmodule-header=<kind>โ builds a C++20 Header Unit from a header that should live in the user (fmodule-header=user) or system (fmodule-header=system) search path ๐-fmodule-headerโ builds a C++20 Header Unit from a header. Short and sweet, periodt ๐-fmodule-map-file=<file>โ loads this module map file ๐บ๏ธ-fmodule-name=<name>โ tells her the name of the module to build, bestie, names matter ๐-fmodule-output=<value>โ saves intermediate module file results when compiling a standard C++ module unit ๐พ-fmodule-outputโ same thing, no value: saves intermediate module file results when compiling a standard C++ module unit ๐พ-fmodulemap-allow-subdirectory-searchโ lets her search for module maps in subdirectories of search paths. She's thorough like that ๐ฆ-fmodules-cache-path=<directory>โ specifies where the module cache lives ๐-fmodules-decluseโ requires declaration of the modules used within a module. Papers, please ๐-fmodules-disable-diagnostic-validationโ disables validation of the diagnostic options when loading the module. Trust fall ๐-fmodules-embed-all-files<value>โ embeds the contents of all files read by this compilation right into the produced module file. Packed lunch, everything inside ๐-fmodules-ignore-macro=<value>โ ignores the definition of the given macro when building and loading modules. Not today, macro ๐-fmodules-prune-after=<seconds>โ sets the interval (in seconds) after which a module file is considered unused. Inactivity timeout โณ-fmodules-prune-interval=<seconds>โ sets the interval (in seconds) between attempts to prune the module cache. She checks in regularly, unlike some people ๐ญ-fmodules-reduced-bmiโ generates the reduced BMI. Slay, smaller, faster, iconic โจ-fmodules-search-allโ searches even non-imported modules to resolve references. She'll look everywhere, she has no shame and I love her ๐-fmodules-strict-decluseโ like-fmodules-decluse, except it requires all headers to be in modules. Stricter than your group chat's rules ๐ฅ-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. Not just vibes โ actual content check ๐ง-fmodules-validate-once-per-build-sessionโ doesn't verify input files for the modules if the module was already successfully validated or loaded during this build session. One vibe check per session, we don't do repeats ๐-fmodules-validate-system-headersโ validates the system headers that a module depends on when loading the module ๐-fmodulesโ enables the'modules'language feature. That's it, that's the tweet ๐-fms-compatibility-version=<value>โ a dot-separated value that's the Microsoft compiler version number reported in_MSC_VER. Set it to0and she doesn't define it at all (that's the default) ๐-fms-compatibilityโ enables full Microsoft Visual C++ compatibility. The whole thing, not a crumb ๐-fms-define-stdcโ defines'__STDC__'to'1'when you're in MSVC Compatibility mode ๐ฉต-fms-extensionsโ accepts some non-standard constructs that the Microsoft compiler supports. She's flexible, she contains multitudes โจ-fms-hotpatchโ makes sure all functions can be hotpatched at runtime. Livin' on the edge ๐ฅ-fms-runtime-lib=<value>โ selects the Windows run-time library ๐ช-fms-volatileโ volatile loads and stores have acquire and release semantics. Memory model drama, but make it Microsoft ๐-fmsc-version=<value>โ the Microsoft compiler version number reported in_MSC_VER.0means don't define it at all (default) ๐-fnew-alignment=<align>โ specifies the largest alignment guaranteed by'::operator new(size_t)'๐-fnew-infallibleโ enables treating throwing global C++ operator new as always returning valid memory (it annotates with__attribute__((returns_nonnull))andthrow()). This is detectable in source, so heads up ๐ซถ-fno-aapcs-bitfield-widthโ does not follow the AAPCS standard requirement that volatile bit-field width is dictated by the field container type. ARM only, bestie ๐ฉน-fno-access-controlโ disables C++ access control. Private? Don't know her ๐-fno-addrsigโ doesn't emit an address-significance table. No receipts ๐-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 global operator new can't alias any pointer. Suspicious girl era ๐ง-fno-assume-unique-vtablesโ disables optimizations based on vtable pointer identity. Twins exist and she respects that ๐ฏ-fno-assumptionsโ disables codegen and compile-time checks for C++23's[[assume]]attribute. Never assume, bestie ๐-fno-auto-importโ MinGW specific. Disables support for automaticdllimportin code generation and linking ๐ช-fno-autolinkโ disables generation of linker directives for automatic library linking. She's not gonna auto-add anything for you ๐ซ-fno-builtin-<value>โ disables implicit builtin knowledge of one specific function ๐ฏ-fno-builtinโ disables implicit builtin knowledge of functions. All of them. Every last one ๐-fno-bundle-offload-archโ tells the offload bundler it should not identify a bundle with a specific arch. 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. No cleanup on the way out, we leave a mess ๐ญ-fno-char8_tโ disables the C++ builtin typechar8_t๐ซ-fno-clangirโ uses the AST -> LLVM pipeline to compile. Classic route, still hits ๐ธ-fno-color-diagnosticsโ disables colors in diagnostics. Monochrome sadness ๐ค-fno-commonโ compiles common globals like normal definitions. No special treatment ๐-fno-complete-member-pointersโ doesn't require member pointer base types to be complete if they'd 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 during a clang crash. When she falls, she falls quietly ๐-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. (Yep, "involving are", that's the original's whole sentence, I'm just the messenger ๐) ๐-fno-cxx-modulesโ disables modules for C++ ๐ซ-fno-debug-macroโ doesn't emit macro debug information ๐-fno-declspecโ disallows__declspecas a keyword โ-fno-define-target-os-macrosโ disables predefined target OS macros ๐ซ-fno-delayed-template-parsingโ disables delayed template parsing. Right now, no waiting ๐-fno-delete-null-pointer-checksโ doesn't treat usage of null pointers as undefined behavior. Danger, bestie, that's UB and she's telling you straight ๐ญ-fno-diagnostics-fixit-infoโ doesn't include fixit information in diagnostics. No little helpful patch, figure it out ๐งต-fno-diagnostics-show-line-numbersโ shows line numbers in diagnostic code snippets. Yes, this "no" flag shows them โ that's literally what it says, I don't make the rules ๐-fno-digraphsโ disallows the alternative token representations'<:',':>','<%','%>','%:','%:%:'๐ซ-fno-direct-access-external-dataโ uses GOT indirection to reference external data symbols ๐-fno-disable-block-signature-stringโ doesn't disable the block signature string (yes, it ends with a stray), iconic, we keep it verbatim) ๐ง-fno-discard-value-namesโ doesn't discard value names in LLVM IR. Names have meaning, we're keeping them ๐ท๏ธ-fno-dollars-in-identifiersโ disallows'$'in identifiers. No cash money in my names ๐ธ-fno-elide-constructorsโ disables C++ copy constructor elision ๐ซ-fno-elide-typeโ doesn't elide types when printing diagnostics. Full and complete, no shortening, she's verbose and proud ๐ฃ๏ธ-fno-eliminate-unused-debug-typesโ emits debug info for defined but unused types. (Two spaces after "Emit" in the original, it's that girl's signature look ๐ ) ๐-fno-exceptionsโ disables support for exception handling ๐ซ-fno-experimental-late-parse-attributesโ disables experimental late parsing of attributes ๐งช-fno-experimental-relative-c++-abi-vtablesโ doesn't use the experimental C++ class ABI for classes with virtual tables ๐งช-fno-experimental-sanitize-metadata=<value>โ disables emitting metadata for binary analysis sanitizers ๐งช-fno-fat-lto-objectsโ disables fat LTO object support. Slim, not thick ๐ฆ-fno-file-reproducibleโ uses the host's platform-specific path separator character when expanding the__FILE__macro ๐ค๏ธ-fno-fine-grained-bitfield-accessesโ uses large-integer access for consecutive bitfield runs ๐ข-fno-finite-loopsโ doesn't assume that any loop is finite. Respectfully terrifying, she could loop forever and that's on purpose ๐ญ-fno-fixed-pointโ disables fixed point types ๐ซ-fno-force-enable-int128โ disables support for theint128_ttype ๐ซ-fno-global-iselโ disables the global instruction selector ๐ซ-fno-gnu-inline-asmโ disables GNU style inline asm ๐ซ-fno-gpu-allow-device-initโ doesn't allow a device side init function in HIP (experimental) ๐งช-fno-gpu-approx-transcendentalsโ doesn't use approximate transcendental functions. Exact only, she's a perfectionist ๐-fno-gpu-defer-diagโ doesn't defer host/device related diagnostic messages for CUDA/HIP ๐ข-fno-hip-emit-relocatableโ does not override the toolchain to compile HIP source to relocatable ๐ซ
-fno-hip-fp32-correctly-rounded-divide-sqrtโ bestie this one is HIP device compilation only, and it says nope to promising that single precision floating-point divide and sqrt used in the program source are correctly rounded ๐-fno-hip-kernel-arg-nameโ don't specify that kernel argument names are preserved (HIP only, so if you're not doing HIP this is just a stranger in your mentions ๐ซฅ)-fno-hip-new-launch-apiโ don't use the new kernel launching API for HIP, we're keeping it old school โจ-fno-init-global-zeroโ do not zero initialize globals that don't have default initialization. Not everything needs a fresh start, iykyk ๐-fno-integrated-asโ disables the integrated assembler, so clang stops doing the assembly itself and hands it off ๐-fno-integrated-cc1โ spawns a separate process for eachcc1. More processes, more drama, more isolation ๐ธ-fno-integrated-objemitterโ use an external machine object code emitter instead of the built-in one ๐-fno-jump-tablesโ do not use jump tables for lowering switches. Straight if-else energy, no shortcuts ๐-fno-keep-persistent-storage-variablesโ disables keeping all variables that have a persistent storage duration (that's global, static and thread-local variables, the whole friend group) so they can be directly addressed. Turning this off means no more guarantee they're directly addressable ๐ญ-fno-keep-static-constsโ don't keep static const variables even if they're unused. If they're not showing up, they're not staying ๐ง-fno-knr-functionsโ disables support for K&R C function declarations. Grandpa syntax, we're respectfully declining ๐-fno-link-huge-device-codeโ do not generate or use a custom linker script for huge device code sections. Fun fact: this is the default โจ-fno-ltoโ disables LTO mode. Also the default, lowkey iconic for just vibing ๐ฅ-fno-memory-profileโ disables heap memory profiling. We are choosing to not look at the receipts ๐-fno-merge-all-constantsโ disallows merging of constants. Everyone keeps their own identity, periodt ๐-fno-modules-check-relocated<value>โ skips checks for relocated modules when loadingPCMfiles ๐ฆ-fno-modules-validate-textual-header-includesโ does not enforce-fmodules-decluseand private header restrictions for textual headers.
Heads up bestie: this flag will be removed in a future Clang release. Don't get attached ๐
-fno-ms-tls-guardsโ do not emit code to perform on-demand initialization of thread-local variables ๐-fno-new-infallibleโ disables treating the throwing global C++operator newas always returning valid memory (it annotates with__attribute__((returns_nonnull))andthrow()). And yes, this is detectable in source, so it's not a secret ๐-fno-objc-avoid-heapify-local-blocksโ don't try to avoid heapifying local blocks. Let them live on the heap, they'll be fine ๐ซถ-fno-objc-infer-related-result-typeโ do not infer Objective-C related result type based on method family ๐ธ
-fno-offload-fp32-prec-divโfdivoperations in offload device code are not required to return correctly rounded results. Sloppy on purpose, and that's the point ๐-fno-offload-fp32-prec-sqrtโ same deal but forsqrtoperations in offload device code: not required to return correctly rounded results โญ-fno-offload-ltoโ disables LTO mode for offload compilation. And yep, that's the default ๐-fno-offload-uniform-blockโ don't assume that kernels are launched with uniform block sizes. Cute detail: the default here is true for CUDA/HIP and false otherwise โ so it's a whole different vibe per target ๐-fno-offload-via-llvmโ don't useLLVM/Offloadas the portable offloading runtime ๐ฆ-fno-openmp-extensionsโ disables all Clang extensions for OpenMP directives and clauses. Back to standard, no extras, no sprinkles ๐-fno-operator-namesโ do not treat C++ operator name keywords as synonyms for operators.and,or,notโ we're not doing the alias thing today ๐-fno-optimize-sibling-callsโ disables tail call optimization, which keeps the call stack accurate. Great for debugging, less great for speed, but accuracy ate ๐-fno-pch-codegenโ do not generate code for uses of this PCH that assumes an explicit object file will be built for the PCH ๐ง-fno-pch-debuginfoโ do not generate debug info for types in an object file built from this PCH, and do not generate them anywhere else either. Nowhere. Not even the group chat ๐ธ-fno-pltโ use GOT indirection instead of PLT to make external function calls.x86only, bestie, don't try this anywhere else ๐-fno-preserve-as-commentsโ do not preserve comments in inline assembly. Your little asm love notes get deleted ๐ญ-fno-profile-generateโ disables generation of profile instrumentation. Periodt.-fno-profile-instr-generateโ also disables generation of profile instrumentation. Yes it's basically the same sentence twice, no I'm not skipping it, every one of these flags is getting its moment โจ-fno-profile-instr-useโ disables using instrumentation data for profile-guided optimization ๐-fno-pseudo-probe-for-profilingโ do not emit pseudo probes for sample profiling ๐ฆ-fno-raw-string-literalsโ disables raw string literals. No moreR"( )", we're back to escaping everything like it's 2009 ๐-fno-register-global-dtors-with-atexitโ don't useatexitor__cxa_atexitto register global destructors ๐ธ-fno-rtlib-add-rpathโ do not add-rpathwith the architecture-specific resource directory to the linker flags. And extra detail for the HIP girlies: when--hip-linkis specified, do not add-rpathwith the HIP runtime library directory to the linker flags either ๐-fno-rtlib-defaultlibโ on Windows, do not emit/defaultlib:directives to link compiler-rt libraries ๐ชโจ-fno-rtti-dataโ disables generation of RTTI data (just the data, bestie, read carefully) ๐-fno-rttiโ disables generation of rtti information. All of it. Gone ๐ซฅ-fno-sanitize-address-globals-dead-strippingโ disables linker dead stripping of globals in AddressSanitizer ๐-fno-sanitize-address-outline-instrumentationโ use the default code inlining logic for the address sanitizer ๐-fno-sanitize-address-poison-custom-array-cookieโ disables poisoning array cookies when using customoperator new[]in AddressSanitizer ๐-fno-sanitize-address-use-after-scopeโ disables use-after-scope detection in AddressSanitizer. So your scope mistakes stay uncaught, live your truth I guess ๐-fno-sanitize-address-use-odr-indicatorโ disables ODR indicator globals ๐ธ-fno-sanitize-cfi-canonical-jump-tablesโ do not make the jump table addresses canonical in the symbol table ๐ง-fno-sanitize-cfi-cross-dsoโ disables control flow integrity (CFI) checks for cross-DSO calls ๐-fno-sanitize-coverage=<value>โ disables features of coverage instrumentation for Sanitizers. Note the<value>, bestie, it takes an argument ๐-fno-sanitize-hwaddress-experimental-aliasingโ disables aliasing mode in HWAddressSanitizer ๐-fno-sanitize-ignorelistโ don't use an ignorelist file for sanitizers. Nobody's getting excused today ๐ฅ-fno-sanitize-memory-param-retvalโ disables detection of uninitialized parameters and return values ๐ญ-fno-sanitize-memory-track-originsโ disables origins tracking in MemorySanitizer. You'll get the sin but not the backstory ๐-fno-sanitize-memory-use-after-dtorโ disables use-after-destroy detection in MemorySanitizer ๐-fno-sanitize-merge=<value>โ do not allow the compiler to merge handlers for the specified sanitizers ๐-fno-sanitize-mergeโ do not allow the compiler to merge handlers for any sanitizers. Everyone gets their own handler, no sharing ๐ซถ-fno-sanitize-recover=<value>โ disables recovery for the specified sanitizers ๐ฆ-fno-sanitize-stable-abiโ conventional ABI instrumentation for the sanitizer runtime. The default here is Conventional โจ-fno-sanitize-statsโ disables sanitizer statistics gathering ๐ธ-fno-sanitize-thread-atomicsโ disables atomic operations instrumentation in ThreadSanitizer ๐-fno-sanitize-thread-func-entry-exitโ disables function entry/exit instrumentation in ThreadSanitizer ๐ง-fno-sanitize-thread-memory-accessโ disables memory access instrumentation in ThreadSanitizer ๐-fno-sanitize-trap=<value>โ disables trapping for the specified sanitizers ๐-fno-sanitize-trapโ disables trapping for all the sanitizers ๐-fno-short-wcharโ forcewchar_tto be an unsignedint๐-fno-show-columnโ do not include the column number on diagnostics. We're keeping it vague โจ-fno-show-source-locationโ do not include source location information with diagnostics. Even vaguer. Maximum mystery ๐-fno-signed-charโcharis unsigned. That's it, that's the whole vibe ๐ธ-fno-signed-zerosโ allow optimizations that ignore the sign of floating point zeros.-0.0and+0.0stop being distinguishable, lowkey sad but speed is speed ๐ฆ-fno-skip-odr-check-in-gmfโ perform ODR checks for decls in the global module fragment ๐ง-fno-spell-checkingโ disables spell-checking. Your typos are your business now ๐-fno-split-machine-functionsโ disables late function splitting using profile information. Applies tox86andaarch64ELF only ๐-fno-split-stackโ quote unquote "wouldn't use segmented stack" ๐ซฅ (that's genuinely what the manpage says bestie, I'm just delivering it with love)-fno-stack-clash-protectionโ disables stack clash protection ๐-fno-stack-protectorโ disables the use of stack protectors. Your stack, your problem, your consequences ๐ญ-fno-standalone-debugโ limit the debug information produced to reduce the size of the debug binary. Less info, smaller binary, that's the trade ๐-fno-strict-aliasingโ disables optimizations based on strict aliasing rules ๐-fno-strict-float-cast-overflowโ relaxes language rules and tries to match the behavior of the target's native float-to-int conversion instructions ๐-fno-strict-returnโ don't treat control flow paths that fall off the end of a non-void function as unreachable. They are reachable, bestie, and they will be witnessed ๐
And now we've arrived at the SYCL section ๐ buckle up, this is a whole saga:
-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: please use-fno-sycl-allow-device-image-dependenciesinstead. It's giving "old name, new name, pick the new one" ๐ฆ-fno-sycl-allow-device-image-dependenciesโ do not allow dependencies between device code images. And yes, that's the default โจ-fno-sycl-dead-args-optimizationโ disables elimination of DPC++ dead kernel arguments ๐-fno-sycl-decompose-functorโ do not decompose SYCL functor if possible. Marked experimental, CUDA only, so heads up ๐-fno-sycl-device-code-split-esimdโ do not split ESIMD and SYCL device code into separate device binary images. Only has an effect for SPIR-based targets, and it's experimental ๐ธ-fno-sycl-device-lib-jit-linkโ disables sycl device library jit link. Experimental, iykyk ๐ง-fno-sycl-device-lib=<value>โ controls exclusion of device libraries from device binary linkage. The valid arguments arelibc,libm-fp32,libm-fp64,all๐-fno-sycl-early-optimizationsโ disables the standard optimization pipeline for the SYCL device compiler ๐-fno-sycl-esimd-force-stateless-memโ do not enforce using stateless memory accesses ๐ฆ-fno-sycl-explicit-simdโ disables the SYCL explicit SIMD extension. It's marked (deprecated), so, you know, be aware โจ-fno-sycl-force-inline-kernel-lambdaโ disallow force inline SYCL kernels lambda in the entry point ๐-fno-sycl-id-queries-fit-in-intโ do not assume that SYCL ID queries fit withinMAX_INT๐ธ-fno-sycl-instrument-device-codeโ do 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 ๐
โจ OPTIONS (continued) โจ
-fno-sycl-rdcโ Generates relocatable device code while you're compiling a SYCL offload target. If you pair-fno-sycl-rdcwith-c, you get final device binaries tucked inside the fat object it spits out. Heads up though bestie, every single kernel has to be completely self-contained inside its own translation unit (so like, the source file), which meansSYCL_EXTERNALis straight up not allowed when this is on. No cap.-fno-sycl-remove-unused-external-funcsโ Stops the compiler from yeeting unusedSYCL_EXTERNALfunctions. Protect them at all costs ๐-fno-sycl-unnamed-lambdaโ Unnamed SYCL lambda kernels? Not today. This disallows them entirely.-fno-sycl-use-bitcodeโ Says "use SPIR-V instead of LLVM bitcode in fat objects." It's giving deprecated energy, so don't get too attached ๐ฅ-fno-sycl-use-footerโ Turns off usage of the integration footer during SYCL-enabled compilations.-fno-syclโ Disables those SYCL C++ extensions. Bye bestie ๐-fno-system-debugโ No debug info for declarations sitting in system headers. Not their moment.-fno-temp-fileโ Creates compilation output files directly instead of the temp-file dance. โ ๏ธ Warning bestie: this may lead to incorrect incremental builds if the compiler crashes. Risky business, proceed with caution.-fno-threadsafe-staticsโ Don't emit code to make initialization of local statics thread safe. Living dangerously, I see.-fno-trigraphsโ Do not process trigraph sequences. Trigra-what? Yeah, we're skipping them.-fno-unified-ltoโ Uses distinct LTO pipelines. Separate vibes for separate pipelines, periodt.-fno-unique-section-namesโ Doesn't use unique names for text and data sections. Basic names only, no creative flair.-fno-unroll-loopsโ Turns off the loop unroller. The loops stay smol. No unrolling today ๐-fno-use-cxa-atexitโ Don't use__cxa_atexitfor calling destructors. We're doing it a different way.-fno-use-init-arrayโ Uses.ctors/.dtorsinstead of.init_array/.fini_array. Old school, lowkey.-fno-verify-intermediate-codeโ Disables verification of LLVM IR. The compiler just... trusts itself ๐-fno-visibility-inlines-hidden-static-local-varโ Disables-fvisibility-inlines-hidden-static-local-var. Fun fact: this is already the default on non-darwin targets, so it's giving "extra".-fno-xray-function-indexโ Omits the function index section. The trade-off? Single-function patching performance takes a hit. Nothing's free bestie ๐ญ-fno-zero-initialized-in-bssโ Don't place zero initialized data in BSS. It goes somewhere else, I guess.-fno-zos-extensionsโ Does not accept the non-standard constructs that the z/OS compiler supports. Keep it standard, keep it clean.-fobjc-arc-exceptionsโ Uses EH-safe code when synthesizing retains and releases in-fobjc-arc. Exception-safe and thriving โจ-fobjc-arcโ Synthesizes retain and release calls for Objective-C pointers. Automatic reference counting said "I got you" ๐ซถ-fobjc-avoid-heapify-local-blocksโ Tries to avoid heapifying local blocks. Keep them stack-y, keep them local.-fobjc-disable-direct-methods-for-testingโ Ignores the attributeobjc_directso that direct methods can actually be tested. Testing era, so valid.-fobjc-encode-cxx-class-template-specโ Fully encodes c++ class template specialization. Fully. No half measures.-fobjc-exceptionsโ Enables Objective-C exceptions. Let them cook ๐ณ-fobjc-runtime=<value>โ Specify the target Objective-C runtime kind and version. You pick the vibe.-fobjc-weakโ Enables ARC-style weak references in Objective-C. Weak but make it intentional ๐-foffload-fp32-prec-divโfdivoperations in offload device code are required to return correctly rounded results. Precision is the moment.-foffload-fp32-prec-sqrtโsqrtoperations in offload device code are required to return correctly rounded results. Same energy, but for square roots ๐-foffload-implicit-host-device-templatesโ Template functions or specializations that don't have host, device and global attributes get implicit host device attributes. CUDA/HIP only, so don't try this everywhere.-foffload-lto=<value>โ Set LTO mode for offload compilation. You choose the mode, bestie.-foffload-ltoโ Enables LTO in'full'mode for offload compilation. The whole thing, no crumbs.-foffload-uniform-blockโ Assumes kernels are launched with uniform block sizes. Default istruefor CUDA/HIP andfalseotherwise. Depends on your target, iykyk.-foffload-via-llvmโ Uses LLVM/Offload as the portable offloading runtime. Portable and proud ๐-fomit-frame-pointerโ Omits the frame pointer from functions that don't need it. Some stack unwinding cases โ profilers and sanitizers, for example โ might prefer you pass-fno-omit-frame-pointerinstead. On many targets,-O1and higher omit the frame pointer by default. Also,-m[no-]omit-leaf-frame-pointertakes precedence for leaf functions, so keep that in mind.-fopenaccโ Enables OpenACC. Let's go ๐-fopenmp-extensionsโ Enables all Clang extensions for OpenMP directives and clauses. All of them. Every last one.-fopenmp-force-usmโ Forces the behavior as if the user specifiedpragma omp requires unified_shared_memory. You didn't ask but here it is.-fopenmp-offload-mandatoryโ Does not create a host fallback if offloading to the device fails. It's offload or nothing. Periodt.-fopenmp-simdโ Emits OpenMP code only for SIMD-based constructs. SIMD-only zone.-fopenmp-target-debugโ Enables debugging in the OpenMP offloading device RTL. Debug era, we love to see it ๐ฅ-fopenmp-target-jitโ Emits code that can be JIT compiled for OpenMP offloading. Also implies-foffload-lto=full, so it's bringing a friend.-fopenmp-targets=<value>โ Specify a comma-separated list of triples for OpenMP offloading targets to be supported. Comma girlies rise ๐ธ-fopenmp-version=<value>โ Set the OpenMP version. Like45for OpenMP 4.5, or51for OpenMP 5.1. Default value is51for Clang.-fopenmpโ Parses OpenMP pragmas and generates parallel code. The classic. The icon.-foperator-arrow-depth=<value>โ Maximum number of'operator->'s to call for a member access. Don't go too deep, bestie.-foptimization-record-file=<file>โ Specify 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. No mixing, sorry.-foptimization-record-passes=<regex>โ Only includes passes that match a specified regular expression in the generated optimization record. By default, it includes all passes.-forder-file-instrumentationโ Generates instrumented code to collect order file intodefault.profrawfile (overridden by the'='form of option or theLLVM_PROFILE_FILEenv var). Deprecated, please use-ftemporal-profileinstead. We're moving on ๐-fpack-struct=<value>โ Specify the default maximum struct packing alignment. Keep your structs tight.-fpascal-stringsโ Recognizes and constructs Pascal-style string literals. Retro moment ๐-fpass-plugin=<dsopath>โ Load pass plugin from a dynamic shared object file. Only works with the new pass manager, so know which one you're on.-fpatchable-function-entry=<N,M>โ GeneratesMNOPs before function entry andN-MNOPs after function entry. NOP NOP NOP โจ-fpcc-struct-returnโ Overrides the default ABI to return all structs on the stack. Every single one.-fpch-codegenโ Generates code for uses of this PCH that assumes an explicit object file will be built for the PCH. Assuming era.-fpch-debuginfoโ Generates debug info for types in an object file built from this PCH, and does not generate them elsewhere. One place only, exclusive ๐ซถ-fpch-instantiate-templatesโ Instantiates templates already while building a PCH. Get ahead of it, bestie.-fpch-validate-input-files-contentโ Validates PCH input files based on content ifmtimediffers. Content over timestamps, we love that.-fplugin-arg-<name>-<arg>โ Passes<arg>to plugin<name>. Say it with your chest.-fplugin=<dsopath>โ Loads the named plugin (a dynamic shared object). Plug it in ๐-fprebuilt-implicit-modulesโ Looks up implicit modules in the prebuilt module path. Already prebuilt, already iconic.-fprebuilt-module-path=<directory>โ Specify the prebuilt module path. Tell it where to look.-fpreview-breaking-changesโ When specified, it informs the compiler driver and compilation phases that it's allowed to break backward compatibility. When this option is specified, the compiler will also set the macro__INTEL_PREVIEW_BREAKING_CHANGES. And when you use this in conjunction with-fsycl, the driver will link against an alternate form oflibsycl,libsycl-preview. Breaking changes? In this economy? ๐-fproc-stat-report=<value>โ Saves subprocess statistics to the given file. Receipts ๐-fproc-stat-report<value>โ Prints subprocess statistics. Just say it out loud, no file needed.-fprofile-arcsโ Instruments code to produce gcov data files (*.gcda). Coverage girlies, this one's for you.-fprofile-exclude-files=<value>โ Instruments only functions from files where names don't match all the regexes separated by a semi-colon. Excluding with precision.-fprofile-filter-files=<value>โ Instruments only functions from files where names match any regex separated by a semi-colon. Including with precision.-fprofile-function-groups=<N>โ Partitions functions intoNgroups and selects only functions in groupito be instrumented using-fprofile-selected-function-group. Divide and conquer.-fprofile-generate-cold-function-coverage=<directory>โ Generates instrumented code to collect coverage info for cold functions into<directory>/default.profraw(overridden by theLLVM_PROFILE_FILEenv var). Cold functions need love too โ๏ธ-fprofile-generate-cold-function-coverageโ Generates instrumented code to collect coverage info for cold functions into thedefault.profrawfile (overridden by the'='form of option or theLLVM_PROFILE_FILEenv var). Same energy, default location.-fprofile-generate=<directory>โ Generates instrumented code to collect execution counts into<directory>/default.profraw(overridden by theLLVM_PROFILE_FILEenv var). Counts went up ๐-fprofile-generateโ Generates instrumented code to collect execution counts intodefault.profraw(overridden by theLLVM_PROFILE_FILEenv var). Default file, default vibes.-fprofile-instr-generate=<file>โ Generates instrumented code to collect execution counts into<file>(overridden by theLLVM_PROFILE_FILEenv var). You name it, it goes there.-fprofile-instr-generateโ Generates instrumented code to collect execution counts into thedefault.profrawfile (overridden by the'='form of option or theLLVM_PROFILE_FILEenv var). The classic combo.-fprofile-instr-use=<value>โ Uses instrumentation data for profile-guided optimization. Data girlies, assemble.-fprofile-list=<value>โ Filename defining the list of functions/files to instrument. The file uses the sanitizer special case list format. Very specific, very slay.-fprofile-remapping-file=<file>โ Uses the remappings described in<file>to match the profile data against names in the program. Match made in heaven ๐-fprofile-sample-accurateโ Specifies that the sample profile is accurate. Accurate era, no notes.-fprofile-sample-use=<value>โ Enables sample-based profile guided optimizations. Samples said optimize.-fprofile-selected-function-group=<i>โ Partitions functions intoNgroups using-fprofile-function-groupsand selects only functions in groupito be instrumented. The valid range is0toN-1inclusive. Stay in your lane (literally).-fprofile-update=<method>โ Set the update method of profile counters. You choose the method, bestie.-fprofile-use=<pathname>โ Uses instrumentation data for profile-guided optimization. Ifpathnameis a directory, it reads from<pathname>/default.profdata. Otherwise, it reads from file<pathname>. Two paths, one option.-fprotect-parensโ Determines whether the optimizer honors parentheses when floating-point expressions are evaluated. Respect the parentheses, they're there for a reason ๐-fpseudo-probe-for-profilingโ emit pseudo probes so you can do sample profiling, bestie ๐-fptrauth-auth-trapsโ turns on traps when authentication fails (so a bad auth doesn't silently slide through, it catches it) ๐ชค-fptrauth-callsโ signs and authenticates literally all indirect calls, no cap ๐-fptrauth-elf-gotโ enables authentication of pointers coming from the GOT. ELF only, so don't try this on your Mach-O bestie ๐-fptrauth-function-pointer-type-discriminationโ turns on type discrimination for C function pointers ๐ฏ-fptrauth-indirect-gotosโ signs and authenticates indirectgototargets (yes, the chaos jump is getting protected too) ๐ฆ-fptrauth-init-fini-address-discriminationโ enables address discrimination of function pointers ininit/finiarrays ๐-fptrauth-init-finiโ enables signing of the function pointers ininit/finiarrays โ๏ธ-fptrauth-intrinsicsโ turns on pointer authentication intrinsics ๐งฌ-fptrauth-returnsโ signs and authenticates return addresses. your stack is protected, periodt ๐ก๏ธ-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 that holds 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โ turns on raw string literals โจ-freciprocal-mathโ lets division operations get reassociated (math go brrr, but like, carefully) โ-freg-struct-returnโ overrides the default ABI so small structs get returned in registers instead ๐ฆ-fregister-global-dtors-with-atexitโ usesatexitor__cxa_atexitto register global destructors ๐งน-fropiโ generate read-only position independent code. ARM only, so check your arch first ๐ช-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 one's the default ๐ช-frwpiโ generate read-write position independent code. ARM only again ๐ฆพ-fsafe-buffer-usage-suggestionsโ shows you suggestions to update code that's associated with-Wunsafe-buffer-usagewarnings. it's literally just trying to help ๐ญ-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 viadlclose()) ๐งผ-fsanitize-address-field-padding=<value>โ sets 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, no shortcuts ๐-fsanitize-address-poison-custom-array-cookieโ enables poisoning array cookies when you're using customoperator new[]in AddressSanitizer โ ๏ธ-fsanitize-address-use-after-return=<mode>โ selects the mode for 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 so you avoid false ODR violation reports in partially sanitized programs โ the tradeoff being an increase in binary size โ๏ธ-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 the modules and functions that match the provided special case list โ except the blocked ones ๐ง-fsanitize-coverage-ignorelist=<value>โ disables sanitizer coverage instrumentation for the modules and functions that match the provided special case list โ even the allowed ones ๐-fsanitize-coverage=<value>โ specifies the type of coverage instrumentation for Sanitizers ๐-fsanitize-hwaddress-abi=<value>โ selects the HWAddressSanitizer ABI to target, eitherinterceptororplatform, defaultinterceptor. Heads up: 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-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โ same vibe, no value: enables origins tracking in MemorySanitizer ๐ต๏ธโ๏ธ-fsanitize-memory-use-after-dtorโ enables use-after-destroy detection in MemorySanitizer ๐ฅ-fsanitize-memtag-mode=<value>โ sets the default MTE mode to'sync'(that's the default) or'async'โฑ๏ธ-fsanitize-merge=<value>โ lets the compiler merge handlers for the sanitizers you specify ๐ค-fsanitize-mergeโ lets the compiler merge handlers for all sanitizers ๐ค๐ค-fsanitize-recover=<value>โ enables recovery for the sanitizers you specify ๐ฉน-fsanitize-skip-hot-cutoff=<value>โ excludes sanitization for the top hottest code responsible for the given fraction of PGO counters (0.0[default] = skip none;1.0= skip all). The argument format is:
<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 (default) โ๏ธ-fsanitize-thread-func-entry-exitโ enables function entry/exit instrumentation in ThreadSanitizer (default) ๐ช-fsanitize-thread-memory-accessโ enables memory access instrumentation in ThreadSanitizer (default) ๐ง-fsanitize-trap=<value>โ enables trapping for the sanitizers you specify ๐ชค-fsanitize-trapโ enables trapping for all sanitizers ๐ชค๐ชค-fsanitize-undefined-ignore-overflow-pattern=<value>โ specifies the overflow patterns to exclude from arithmetic sanitizer instrumentation ๐ซ-fsanitize-undefined-strip-path-components=<number>โ strips (or, if negative, keeps only) a given number of path components when emitting check metadata โ๏ธ-fsanitize=<check>โ turns on runtime checks for various forms of undefined or suspicious behavior. Peep the user manual for the available checks (iykyk) ๐-fsave-optimization-record=<format>โ generates an optimization record file in the specific format you pick ๐๏ธ-fsave-optimization-recordโ generates a YAML optimization record file ๐๏ธ-fseh-exceptionsโ use SEH style exceptions ๐ช-fseparate-named-sectionsโ use separate unique sections for named sections. ELF Only ๐งฉ-fshort-enumsโ allocate to an enum type only as many bytes as it needs for the declared range of possible values ๐-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โ shows skipped includes in-Houtput ๐๏ธ-fsigned-charโcharis signed โ๏ธ-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>โ sets the max number of times to spell check unrecognized identifiers (0= no limit) ๐ค-fsplit-dwarf-inliningโ provides minimal debug info in the object/executable to make online symbolication/stack traces possible in the absence of.dwo/.dwpfiles when you're using Split DWARF ๐ช-fsplit-lto-unitโ enables splitting of the LTO unit ๐ช-fsplit-machine-functionsโ enables late function splitting using profile information (x86 and aarch64 ELF) ๐ฐ-fsplit-stackโ use segmented stack ๐ฅ-fstack-clash-protectionโ enables stack clash protection ๐ก๏ธ-fstack-protector-allโ enables stack protectors for all functions, absolutely everyone gets one ๐-fstack-protector-strongโ enables stack protectors for some functions vulnerable to stack smashing. Compared to-fstack-protector, this 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โ enables stack protectors for some functions vulnerable to stack smashing. This uses a loose heuristic that 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:8bytes). 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 ๐ก๏ธ-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โ enables optimizations based on strict aliasing rules โก-fstrict-enumsโ enables optimizations based on the strict definition of an enum's value range ๐ฏ-fstrict-flex-arrays=<n>โ okay so this one turns on optimizations that are based on the strict definition of flexible arrays โจ it's giving "trust the rules" energy, fr fr.-fstrict-float-cast-overflowโ lowkey assume that overflowing float-to-int casts are undefined, no cap ๐ and yes, that's the default.-fstrict-vtable-pointersโ turns on optimizations based on the strict rules for overwriting polymorphic C++ objects ๐ main character energy.-fswift-async-fp=<option>โ controls the emission of Swift async extended frame info ๐ฆ.-fsycl-add-default-spec-consts-imageโ generates a copy of every device image that uses a specialization constant and replaces all usages of that 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, periodt. this option is only useful if used in conjunction with Ahead of Time Compilation (-fsycl-targetcommand line option) ๐ .-fsycl-allow-device-dependenciesโ deprecated, bestie ๐ญ please use-fsycl-allow-device-image-dependenciesinstead.-fsycl-allow-device-image-dependenciesโ slay, allow dependencies between device code images ๐.-fsycl-dead-args-optimizationโ enables elimination of DPC++ dead kernel arguments ๐ฅ it's giving cleanup era.-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 (this is the default) ๐. has effect only for SPIR-based targets. (experimental) ๐.-fsycl-device-code-split=<value>โ perform SYCL device code split: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-lib-jit-linkโ enables sycl device library jit link (experimental) ๐ฆ.-fsycl-device-lib=<value>โ control inclusion of device libraries into device binary linkage. valid arguments arelibc,libm-fp32,libm-fp64,libimf-fp32,libimf-fp64,libimf-bf16,all๐ .-fsycl-device-obj=<value>โ specify format of device code stored in the resulting object. valid values are:spirv,llvmir(default) โจ.-fsycl-device-onlyโ compile SYCL kernels for device ๐ฅ.-fsycl-disable-range-roundingโ deprecated, bestie ๐ญ please use-fsycl-range-rounding=disableinstead.-fsycl-dump-device-code=<value>โ dump device code into the user provided directory. ๐-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-point sqrt is 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,fpga,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 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โ assume that SYCL ID queries fit withinMAX_INT. ๐ฅ.-fsycl-instrument-device-codeโ add Instrumentation and Tracing Technology (ITT) instrumentation intrinsics calls (experimental) ๐ง.-fsycl-libspirv-path=<value>โ path to libspirv library ๐ฆ.-fsycl-linkโ generate partially linked device object to be used with the host link ๐ .-fsycl-max-parallel-link-jobs=<value>โ controls the maximum parallelism of actions performed on SYCL device code post-link, i.e. the generation of SPIR-V device images or AOT compilation of each device image. (experimental) โจ.-fsycl-optimize-non-user-codeโ option used in conjunction with-O0to optimize SYCL framework utility functions and leave user's kernel code unoptimized. (experimental) ๐.-fsycl-range-rounding=<value>โ 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). default is'on'๐.-fsycl-remove-unused-external-funcsโ allow removal of unusedSYCL_EXTERNALfunctions (default) ๐ฅ.-fsycl-targets=<value>โ specify comma-separated list of triples SYCL offloading targets to be supported ๐.-fsycl-unnamed-lambdaโ allow unnamed SYCL lambda kernels ๐.-fsycl-use-bitcodeโ use LLVM bitcode instead of SPIR-V in fat objects (deprecated) ๐.-fsyclโ enable SYCL C++ extensions โจ.-fsyntax-onlyโ run the preprocessor, parser and semantic analysis stages ๐.-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 potential runtime performance trade-off. ๐ง.-ftarget-export-symbolsโ expose exported symbols in a generated target library to allow for visibilty 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) ๐.-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-index=<value>โ perform ThinLTO importing using 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 time profiler ๐.-ftime-trace-verbose<value>โ make time trace capture verbose event details (e.g. source filenames). this can increase the size of the output by 2-3 times ๐.-ftime-trace=<value>โ similar to-ftime-trace. specify the JSON file or a directory which will contain the JSON file ๐ฅ.-ftime-traceโ turn on time profiler. generates JSON file based on output filename. ๐.-ftrap-function=<value>โ issue call to specified function rather than a trap instruction ๐ง.-ftrapv-handler=<function name>โ specify the function to be called on overflow ๐ .-ftrapvโ trap on integer overflow โจ.-ftrigraphsโ process trigraph sequences ๐.-ftrivial-auto-var-init-max-size=<value>โ stop initializing trivial automatic stack variables if var size exceeds the specified number of instances (in bytes) ๐.-ftrivial-auto-var-init-stop-after=<value>โ stop initializing trivial automatic stack variables after the specified number of instances ๐ฅ.-ftrivial-auto-var-init=<value>โ initialize trivial automatic stack variables. defaults to'uninitialized'๐.-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 โจ.-funroll-loopsโ turn on loop unroller ๐.-funsafe-math-optimizationsโ allow unsafe floating-point math optimizations which may decrease precision ๐.-fuse-cuid=<value>โ method to generate ID's for compilation units for single source offloading languages CUDA and HIP:'hash'(ID's generated by hashing file path and command line options) |'random'(ID's generated as random numbers) |'none'(disabled). default is'hash'. this option will be overridden by option'-cuid=[ID]'if it is specified. ๐ฅ.-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}implies-fno-math-errno๐ .-fvectorizeโ enable the loop vectorization passes โจ.-fverbose-asmโ generate verbose assembly output ๐.-fverify-intermediate-codeโ enable verification of LLVM IR ๐.-fvirtual-function-eliminationโ turns on the dead virtual function elimination glow-up optimization โจ but bestie it needs-flto=fullto work, no cap.-fvisibility-dllexport=<value>โ sets the visibility fordllexportdefinitions ๐ . If you passKeep, the visibility justโฆ stays exactly as it was, untouched, unbothered. Pairs with[-fvisibility-from-dllstorageclass].-fvisibility-externs-dllimport=<value>โ the visibility fordllimportexternal declarations ๐ซถ. Same deal:Keepmeans the visibility is not adjusted. Tied to[-fvisibility-from-dllstorageclass].-fvisibility-externs-nodllstorageclass=<value>โ visibility for external declarations that have no explicit DLL storage class at all ๐. PassKeepand nothing gets adjusted. Also[-fvisibility-from-dllstorageclass].-fvisibility-from-dllstorageclassโ overrides the visibility of globals based on whatever their final DLL storage class ends up being ๐ฅ.-fvisibility-global-new-delete-hiddenโ gives the global C++operator newanddeletedeclarations hidden visibility ๐-fvisibility-global-new-delete=<value>โ the visibility for global C++operator newanddeletedeclarations. If you say'source', the visibility is not adjusted, periodt.-fvisibility-inlines-hidden-static-local-varโ when-fvisibility-inlines-hiddenis enabled, static variables inside inline C++ member functions also get hidden visibility by default โจ-fvisibility-inlines-hiddenโ inline C++ member functions get hidden visibility by default ๐-fvisibility-ms-compatโ global types get'default'visibility while global functions and variables get'hidden'visibility by default. It's giving "I contain multitudes" ๐.-fvisibility-nodllstorageclass=<value>โ the visibility for definitions without an explicit DLL storage class.Keep= don't touch it ๐ซถ. Works with[-fvisibility-from-dllstorageclass].-fvisibility=<value>โ set the default symbol visibility for all global definitions. The main character of visibility flags, honestly ๐.-fwasm-exceptionsโ use WebAssembly style exceptions ๐ธ-fwhole-program-vtablesโ enables whole-program vtable optimization. Requires-fltoor it simply will not โจ-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 when the function they live in isn't always instrumented ๐ฅ-fxray-always-emit-typedeventsโ always emit__xray_typedevent(...)calls, even if the containing function isn't always instrumented ๐ฅ-fxray-always-instrument=<value>โ DEPRECATED babe, it's done ๐ญ: a filename defining the whitelist for imbuing the'always instrument'XRay attribute.-fxray-attr-list=<value>โ a 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>โ pick which XRay instrumentation points to emit. Options:all,none,function-entry,function-exit,function,custom. Default is'all'. Fun fact bestie:'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 ๐ญ: a filename defining the whitelist for imbuing the'never instrument'XRay attribute.-fxray-selected-function-group=<value>โ when you're using-fxray-function-groups, this picks which group of functions to instrument. Valid range is0tofxray-function-groups - 1๐ฏ-fxray-sharedโ enable shared library instrumentation with XRay ๐ฆ-fzero-call-used-regs=<value>โ clear call-used registers upon function return. Heads up: AArch64/x86 only โ ๏ธ-fzos-extensionsโ accept some non-standard constructs that the z/OS compiler supports ๐-fzvectorโ enable the System z vector language extension ๐ช-F <value>โ add directory to the framework include search path ๐--gcc-install-dir=<value>โ use the GCC installation living in the specified directory. That directory ends with path components like'lib{,32,64}/gcc{,-cross}/$triple/$version'. โ ๏ธ Note: executables (e.g.ld) used by the compiler are not overridden by the selected GCC installation, so don't @ me.--gcc-toolchain=<value>โ specify a directory where Clang can find'include'and'lib{,32,64}/gcc{,-cross}/$triple/$version'. Clang will pick the GCC installation with the largest version ๐--gcc-triple=<value>โ search for the GCC installation with the specified triple ๐-gcodeview-command-lineโ emit the compiler path and command line into CodeView debug information ๐-gcodeview-ghashโ emit type record hashes in a.debug$Hsection ๐งฎ-gcodeviewโ generate CodeView debug information ๐-gdwarf-2โ generate source-level debug information with dwarf version 2 ๐ฑ-gdwarf-3โ generate source-level debug information with dwarf version 3 ๐ฟ-gdwarf-4โ generate source-level debug information with dwarf version 4 ๐ณ-gdwarf-5โ generate source-level debug information with dwarf version 5 ๐ฒ-gdwarf32โ enables the DWARF32 format for ELF binaries, if debug information emission is enabled โจ-gdwarf64โ enables the DWARF64 format for ELF binaries, if debug information emission is enabled โจ-gdwarfโ generate source-level debug information with the default dwarf version ๐-gembed-sourceโ embed the source text right into the DWARF debug sections ๐ซถ-gen-reproducer=<value>โ emit a reproducer on (option:off,crash(default),error,always) ๐ฌ-gline-directives-onlyโ emit debug line info directives only, nothing more ๐-gline-tables-onlyโ emit debug line number tables only ๐-gmodulesโ generate debug info with external references to clang modules or precompiled headers ๐-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. That's it, that's the tweet ๐ซ--gpu-bundle-outputโ bundle 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>โ default max threads per block for kernel launch bounds for HIP ๐งต-gpulibcโ link the LLVM C Library for GPUs ๐ฎ-gsplit-dwarf=<value>โ set DWARF fission mode โ๏ธ-gstrict-dwarfโ restrict DWARF features to only those defined in the specified version, avoiding features from later versions ๐ โ๏ธ-gz=<value>โ DWARF debug sections compression type ๐๏ธ-G <size>โ put objects of at most<size>bytes into the small data section (MIPS / Hexagon) ๐-gโ generate source-level debug information. The OG ๐--help-hiddenโ display help for hidden options ๐-helpโ display available options ๐
--hip-device-lib=<value>โ HIP device library ๐--hip-linkโ linkclang-offload-bundlerbundles for HIP ๐--hip-path=<value>โ HIP runtime installation path, used for finding the HIP version and adding the HIP include path ๐ฃ๏ธ--hip-version=<value>โ HIP version in the formatmajor.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>โ rocPrim path, required by the HIP Standard Parallel Algorithm Acceleration library, used to implicitly include the rocPrim library ๐ธ--hipstdpar-thrust-path=<value>โ rocThrust path, required by the HIP Standard Parallel Algorithm Acceleration library, used to implicitly include the rocThrust library ๐ฆ--hipstdparโ enable HIP acceleration for standard parallel algorithms ๐-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 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 the option disables it โฉ๏ธ-idirafter <value>โ add directory to the AFTER include search path โญ๏ธ-iframeworkwithsysroot <directory>โ add directory to the SYSTEM framework search path; absolute paths are relative to-isysroot๐-iframework <value>โ add directory to the SYSTEM framework search path ๐-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 directory to the QUOTE include search path โ-isysroot <dir>โ set the system root directory (usually/) ๐-isystem-after <directory>โ add directory to the end of the SYSTEM include search path โญ๏ธ-isystem <directory>โ add directory to the SYSTEM include search path ๐ฅ๏ธ-ivfsoverlay <value>โ overlay the virtual filesystem described by file over the real file system ๐ช-iwithprefixbefore <dir>โ set directory to the include search path with prefix ๐ท๏ธ-iwithprefix <dir>โ set directory to the SYSTEM include search path with prefix ๐ท๏ธ-iwithsysroot <directory>โ drops directory into the SYSTEM include search path, bestie. And heads up: any absolute paths you give are relative to-isysroot๐-I <dir>โ adds dir to the end of the list of include search paths. Not the front. The end. Respect the queue โจ--libomptarget-amdgcn-bc-path=<value>โ the path to thelibomptarget-amdgcnbitcode library ๐--libomptarget-amdgpu-bc-path=<value>โ the path to thelibomptarget-amdgcnbitcode library (yes, it says amdgcn again, that's literally what the page says, no I'm not fixing it, that's not my job ๐)--libomptarget-nvptx-bc-path=<value>โ the path to thelibomptarget-nvptxbitcode library ๐--libomptarget-spirv-bc-path=<value>โ the path to thelibomptarget-spirvbitcode library ๐ธ-L <dir>โ adds dir to the library search path, so the linker knows where to go looking ๐-mabi=quadword-atomicsโ turns on the quadword atomics ABI on AIX (that's AIX PPC64 only, babes). Useslqarx/stqcx.instructions ๐ฅ-mabicallsโ enables SVR4-style position-independent code (Mips only) โจ-maix-shared-lib-tls-model-optโ for a shared library loaded with the main program, this swaps local-dynamic access(es) over to initial-exec access(es), at the function level (AIX 64-bit only) ๐-maix-small-local-dynamic-tlsโ produces 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, ok?? ๐ญ-maix-small-local-exec-tlsโ same energy but for local-exec TLS variables: faster access sequence when the offset from the TLS base is encoded as an immediate operand (AIX 64-bit only). Also not used for variables larger than 32KB ๐ซถ-maix-struct-returnโ returns all structs in memory (PPC32 only) ๐-malign-branch-boundary=<value>โ tells it the boundary's size, for aligning branches โจ-malign-branch=<value>โ says which types of branches to align ๐-malign-doubleโ aligns doubles to two words in structs (x86 only) ๐-maltivecโ enables AltiVec vector initializer syntax ๐-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. โ ๏ธ Heads up bestie: this option changes the ABI. (AMDGPU only)-mamdgpu-precise-memory-opโ enables precise memory mode (AMDGPU only) ๐ฆ-mannotate-tablejumpโ enables the annotate table jump instruction so it can be correlated with the jump table ๐ฅ-mapx-features=<value>โ enables features of APX ๐-mapx-inline-asm-use-gpr32โ enables use of GPR32 in inline assembly for APX ๐-march=<value>โ for a list of the available architectures for the target, use'-mcpu=help'๐-marm64x<value>โ links as a hybrid ARM64X image โจ-mbackchainโ links stack frames through the backchain on System Z ๐-mbranch-protection=<value>โ enforces targets of indirect branches and function returns ๐-mbranches-within-32B-boundariesโ aligns selected branches (fused, jcc, jmp) within a 32-byte boundary ๐ธ-mcabacโ enables CABAC instructions ๐ฅ-mcf-branch-label-scheme=<value>โ picks the label scheme for branch control-flow architecture protection ๐ซถ-mcmseโ allow use of CMSE (Armv8-M Security Extensions) ๐-mcode-object-version=<value>โ specify the code object ABI version. Defaults to5. (AMDGPU only) โญ-mconstructor-aliasesโ enables emitting complete constructors and destructors as aliases when possible ๐-mcpu=<value>โ for a list of the available CPUs for the target, use'-mcpu=help'๐-mcrbitsโ controls the CR-bit tracking feature on PowerPC.`-mcrbits`(the enablement of CR-bit tracking support) is the default for POWER8 and above, and also 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 sets 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>โ the mapping between default visibility and export ๐-mdiv32โ usediv.w[u]andmod.w[u]instructions with input not sign-extended ๐ธ-mdouble=<nโ forces double to be <n> bits (yes the page literally renders it like that,<nand all, we keep it exact, no cap ๐)-MDโ writes a depfile containing user and system headers ๐-meabi <value>โ sets the EABI type. The default depends on triple) โ that trailing paren is in the original, keeping it fr fr ๐-membedded-dataโ places constants in the.rodatasection instead of the.sdatasection, even if they meet the-G <size>threshold (MIPS) โจ-menable-experimental-extensionsโ enables use of experimental RISC-V extensions. (Experimental! You've been warned, bestie ๐ญ)-mexec-model=<value>โ execution model (WebAssembly only) ๐ฆ-mexecute-onlyโ disallows generation of data access to code sections (ARM only) ๐ฅ-mextern-sdataโ assumes that externally defined data is in the small data if it meets the-G <size>threshold (MIPS) ๐-mfentryโ inserts calls to fentry at function entry (x86/SystemZ only) ๐-mfix-cmse-cve-2021-35465โ works around the VLLDM erratum CVE-2021-35465 (ARM only) ๐ ๏ธ-mfix-cortex-a53-835769โ workaround for Cortex-A53 erratum 835769 (AArch64 only) ๐ ๏ธ-mfix-cortex-a57-aes-1742098โ works around Cortex-A57 Erratum 1742098 (ARM only) ๐ ๏ธ-mfix-cortex-a72-aes-1655431โ works around Cortex-A72 Erratum 1655431 (ARM only) ๐ ๏ธ-mfix-gr712rcโ enables workarounds for GR712RC errata ๐ ๏ธ-mfix-ut700โ enables 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>โ selects the frame chain model used to emit frame records (Arm only) ๐-mfrecipeโ enablesfrecipe.{s/d}andfrsqrte.{s/d}๐ฅ-mfunction-return=<value>โ replaces returns with jumps to`__x86_return_thunk`(x86 only, error otherwise) โ ๏ธ-MF <file>โ writes depfile output from-MMD,-MD,-MM, or-Mto <file> ๐-mgeneral-regs-onlyโ generates code which only uses the general purpose registers (AArch64/x86 only) ๐-mglobal-mergeโ enables merging of globals ๐-mgpoptโ uses 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โ adds missing headers to the depfile ๐-mharden-sls=<value>โ selects the 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โ enables Hexagon HVX IEEE floating-point โจ-mhvx-length=<value>โ sets Hexagon Vector Length ๐ฆ-mhvx-qfloatโ enables Hexagon HVX QFloat instructions ๐ฅ-mhvx=<value>โ enables Hexagon Vector eXtensions ๐-mhvxโ enables Hexagon Vector eXtensions (same thing, shorter form, we love a duo) ๐ซถ-miamcuโ use Intel MCU ABI ๐-mignore-xcoff-visibilityโ doesn't emit the visibility attribute for asm in AIX OS, or gives all symbols'unspecified'visibility in the XCOFF object file ๐-mincremental-linker-compatibleโ (integrated-as) emit an object file which can be used with an incremental linker โจ-mindirect-branch-cs-prefixโ adds the cs prefix to call and jmp to indirect thunk ๐ก๏ธ-mindirect-jump=<value>โ change indirect jump instructions to inhibit speculation ๐ก๏ธ-mios-version-min=<value>โ sets the iOS deployment target ๐-MJ <value>โ writes a compilation database entry per input ๐-mlam-bhโ enablesamswap[_db].{b/h}andamadd[_db].{b/h}๐ฅ-mlamcasโ enablesamcas[_db].{b/h/w/d}๐ฅ-mlasxโ enables Loongson Advanced SIMD Extension (LASX) โจ-mld-seq-saโ does not generate load-load barrier instructions (dbar 0x700) ๐-mlink-builtin-bitcode-postoptโ links builtin bitcodes after the optimization pipeline ๐-mllvm=<arg>โ alias for-mllvm๐-mllvm <value>โ additional arguments to forward to LLVM's option processing ๐-mlocal-sdataโ extends the-Gbehaviour to object local data (MIPS) โจ-mlong-callsโ generates branches with extended addressability, usually via indirect jumps ๐-mlong-double-128โ forceslong doubleto be 128 bits ๐-mlong-double-64โ forceslong doubleto be 64 bits ๐-mlong-double-80โ forceslong doubleto be 80 bits, padded to 128 bits for storage ๐-mlr-for-calls-onlyโ doesn't allocate the LR register for general purpose usage, only for calls (AArch64 only) ๐ซถ-mlsxโ enables Loongson SIMD Extension (LSX) โจ-mlvi-cfiโ enables only control-flow mitigations for Load Value Injection (LVI) ๐ก๏ธ-mlvi-hardeningโ enables all mitigations for Load Value Injection (LVI) ๐ก๏ธ-mmacos-version-min=<value>โ sets the macOS deployment target ๐-mmadd4โ enables the generation of 4-operandmadd.s,madd.dand related instructions ๐ฅ-mmark-bti-propertyโ adds.note.gnu.propertywith BTI to assembly files (AArch64 only) ๐-MMDโ writes a depfile containing user headers ๐-mmemopsโ enables generation of memop instructions โจ-mmlir <value>โ additional arguments to forward to MLIR's option processing ๐-mms-bitfieldsโ sets 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 it also implies-Eand writes to stdout by default ๐-mno-abicallsโ disables SVR4-style position-independent code (Mips only) โจ-mno-amdgpu-precise-memory-opโ disables precise memory mode (AMDGPU only) ๐ฆ-mno-annotate-tablejumpโ disables the annotate table jump instruction that correlates it with the jump table ๐ฅ-mno-apx-features=<value>โ disables 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โ disables emitting complete constructors and destructors as aliases when possible ๐-mno-crcโ disallows 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โ bestie no โ do not usediv.w[u]andmod.w[u]instructions with input that isn't sign-extended. ๐ซ๐-mno-embedded-dataโ do not place constants in the.rodatasection instead of the.sdataif they meet the-G <size>threshold (MIPS). fr fr. ๐ โ๏ธ-mno-execute-onlyโ allow generation of data access to code sections (ARM only). lowkey spicy ๐-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 workaround Cortex-A53 erratum 835769 (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 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โ do not set the default structure layout to be compatible with the Microsoft compiler standard. ๐ช-mno-msaโ disable MSA ASE (MIPS only). ๐ซ-mno-mtโ disable MT ASE (MIPS only). ๐ซ-mno-neg-immediatesโ disallow converting instructions with negative immediates to their negation or inversion. ๐-mno-nvjโ disable generation of new-value jumps. ๐ฆ-mno-nvsโ disable 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 assume data segments are relative to text segment. ๐ง-mno-regnamesโ use only register numbers when writing assembly output. ๐ข-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โ disablesc.qinstruction. ๐ซ-mno-sesesโ disable speculative execution side effect suppression (SESES). ๐ก๏ธ-mno-stack-arg-probeโ disable stack probes which are enabled by default. ๐-mno-strict-alignโ allow memory accesses to be unaligned (AArch64/LoongArch/RISC-V only). ๐-mno-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 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โ 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โ provide information about 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 maximum number of prefixes to use for padding. ๐งท-mpic-data-is-text-relativeโ assume data segments are relative to text segment. ๐ง-mprefer-vector-width=<value>โ specifies preferred vector width for auto-vectorization. Defaults to'none'which allows target specific decisions. ๐-mprintf-kind=<value>โ specify the printf lowering scheme (AMDGPU only), allowed values are"hostcall"(printing happens during kernel execution, this scheme relies on hostcalls which require system to support pcie atomics) and"buffered"(printing happens after all kernel threads exit, this uses a printf buffer and does not rely on pcie atomic support). ๐จ๏ธ-MPโ create phony target for each dependency (other than main file). ๐ป-mqdsp6-compatโ enable hexagon-qdsp6 backward compatibility. ๐ฆ-MQ <value>โ specify name of main file output to quote in depfile. ๐-mrecip=<value>โ control use of approximate reciprocal and reciprocal square root instructions followed by<n>iterations of Newton-Raphson refinement.<value> = ( ['!'] ['vec-'] ('rcp'|'sqrt') [('h'|'s'|'d')] [':'<n>] ) | 'all' | 'default' | 'none'. ๐งฎ-mrecipโ equivalent to'-mrecip=all'. ๐-mrecord-mcountโ generate a__mcount_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. ๐งโ๏ธ-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โ enablesc.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','lasx'. ๐๏ธ-mskip-rax-setupโ skip setting up RAX register when passing variable arguments (x86 only). ๐ฆ-msmall-data-limit=<value>โ put global and static data smaller than the limit into a special section. ๐ฆ-msoft-floatโ use software floating point. ๐งฎ-msse2avxโ specify that the assembler should encode SSE instructions with VEX prefix. ๐ค-mstack-alignment=<value>โ set the stack alignment. ๐-mstack-arg-probeโ enable stack probes. ๐-mstack-probe-size=<value>โ set the stack probe size. ๐-mstack-protector-guard-offset=<value>โ use the given offset for addressing the stack-protector guard. ๐ก๏ธ-mstack-protector-guard-reg=<value>โ use the given reg for addressing the stack-protector guard. ๐ก๏ธ-mstack-protector-guard-symbol=<value>โ use the given symbol for addressing the stack-protector guard. ๐ก๏ธ-mstack-protector-guard=<value>โ use the given guard (global, tls) for addressing the stack-protector guard. ๐ก๏ธ-mstackrealignโ force realign the stack at entry to every function. ๐-mstrict-alignโ force all memory accesses to be aligned (AArch64/LoongArch/RISC-V only). ๐-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 (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). ๐
okay continuing the option dump, we're deep in the sauce now, stay with me bestie ๐
-mtocdata=<value>โ names a whole list of variables that the TOC data transformation gets applied to ๐-mtocdataโ no list, no problem: every suitable variable gets the TOC data transformation โจ-mtp=<value>โ which thread pointer access method we're using. For AArch32:'soft'does a function call, or'tpidrurw','tpidruro'or'tpidrprw'use the three CP15 registers, and'cp15'is just an alias for'tpidruro'. For AArch64:'tpidr_el0','tpidr_el1','tpidr_el2','tpidr_el3'or'tpidrro_el0'use the five system registers, and'elN'is an alias for'tpidr_elN'๐ง-mtune=<value>โ only supported on AArch64, PowerPC, RISC-V, SPARC, SystemZ, and X86, so if ur on something else, sorry babe ๐-MT <value>โ set the name of the main file output inside the depfile ๐-multi-lib-config=<file>โ path to the YAML configuration file used for multilib selection-munaligned-accessโ allow memory accesses to be unaligned (AArch32/MIPSr6 only)-munaligned-symbolsโ expect external char-aligned symbols to have no ABI alignment (SystemZ only) ๐-munsafe-fp-atomicsโ enables generation of unsafe floating point atomic instructions. may generate more efficient code, but it may not respect rounding and denormal modes, and may give incorrect results for certain memory destinations. (AMDGPU only) โ the name literally says unsafe, so like, believe it ๐ญ-mv8plusโ turn on V8+ mode, letting you use 64-bit V9 instructions inside 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, ask for a build-id string,"0xHEXSTRING", to be created 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 the 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 ๐ธ-Mโ like-MD, but it also implies-Eand writes to stdout by default--no-cuda-include-ptx=<value>โ don't include PTX for the following GPU architecture (e.g.sm_35) or'all'. can be specified more than once ๐--no-cuda-version-checkโ don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture, we're being chill about it today ๐--no-default-configโ disable loading default configuration files--no-gpu-bundle-outputโ do not bundle output files of HIP device compilation ๐งบ-no-hip-rtโ do not link against HIP runtime libraries--no-offload-arch=<value>โ remove a CUDA/HIP offloading device architecture (e.g.sm_35,gfx906) from the list of devices to compile for.'all'resets the list back to its default value โญ--no-offload-new-driverโ don't Use the new driver for offloading compilation (yes, capital U, that's what it says, iykyk ๐ )--no-system-header-prefix=<prefix>โ treat all#includepaths starting with <prefix> as not including a system header--no-wasm-optโ disable the wasm-opt optimizer ๐-nobuiltinincโ disable builtin#includedirectories only-nogpuincโ don't add include paths for CUDA/HIP and don't include the default CUDA/HIP wrapper headers-nogpulibโ do not link the device library for CUDA/HIP device compilation-nohipwrapperincโ don't include the default HIP wrapper headers and include paths-nolibsyclโ do not link the SYCL runtime library-nostdinc++โ disable standard#includedirectories for the C++ standard library ๐-nostdincโ disable both standard system#includedirectories and builtin#includedirectories โ the full sweep, nothing left ๐ค-nostdlibincโ disable standard system#includedirectories only--nvptx-arch-tool=<value>โ the tool used for detecting the NVIDIA GPU arch in the system ๐-ObjC++โ treat source input files as Objective-C++ inputs-ObjCโ treat source input files as Objective-C inputs-object-file-name=<file>โ set the output <file> for debug infos-Ofast<value>โ Deprecated; use'-O3 -ffast-math'for the same behavior, or'-O3'to enable only conforming optimizations. she's retired, let her rest ๐ซถ--offload-arch=<value>โ specify an offloading device architecture for CUDA, HIP, or OpenMP (e.g.sm_35). if'native'is used, the compiler will detect locally installed architectures. for HIP offloading, the device architecture can be followed by target ID features delimited by a colon (e.g.gfx908:xnack+:sramecc-). can be specified more than once ๐ฅ--offload-compressโ compress offload device binaries (HIP only) ๐๏ธ--offload-device-onlyโ only compile for the offloading device--offload-host-deviceโ compile for both the offloading host and device (this is the default)--offload-host-onlyโ only compile for the offloading host--offload-linkโ use the new offloading linker to perform the link job ๐--offload-new-driverโ use the new driver for offloading compilation--offload=<value>โ specify a comma-separated list of offloading target triples (CUDA and HIP only)-o <file>โ write output to <file> ๐พ-pedanticโ warn on language extensions. yes she will absolutely tell on you ๐ข-pgโ enable mcount instrumentation-pipeโ use pipes between commands, when possible ๐ช--precompileโ only precompile the input--pretty-sgfโ emit pretty printed symbol graphs โจ-print-diagnostic-optionsโ print all of Clang's warning options-print-effective-tripleโ print the effective target triple ๐ฏ-print-enabled-extensionsโ print the extensions enabled by the given target and-march/-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 currently used compiler runtime library ("libgcc.a"or"libclang_rt.builtins.*.a")-print-library-module-manifest-pathโ print the path for the C++ Standard library module manifest-print-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 a 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 compiler name and version ๐คซ-Qunused-argumentsโ don't emit a warning for unused driver arguments, live ur truth bestie-Qyโ emit metadata containing 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-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-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 (the chill zone starts here ๐)-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 โฑ๏ธ-traditional-cppโ enable some traditional CPP emulation ๐ฐ๏ธ-trigraphsโ bestie it literally processes trigraph sequences for you โจ-T<script>โ names<script>as your linker script, iconic behaviour honestly ๐-undefโ undef all system defines, just yeets them all out ๐ซถ-unwindlib=<value>โ picks which unwind library to use, no cap ๐ฅ-U<macro>โ undefines the macro<macro>, simple as that ๐--verify-debug-infoโ verifies the binary representation of debug output, it's giving quality control ๐-verify-pchโ loads a pre-compiled header file and checks it's not stale (so it's not out here lying to you ๐ญ)--versionโ prints version information, the classic ๐ธ-vfsoverlay<value>โ overlays the virtual filesystem described by the file on top of the real file system ๐ฆ. Plus, if the linker supports it, this overlay file gets passed along to the linker too โจ-vโ shows you the commands it's running and gives verbose output, aka main character transparency ๐-Wa,<arg>โ passes the comma separated arguments in<arg>straight to the assembler ๐--warning-suppression-mappings=<value>โ a file containing diagnostic suppresion mappings ๐. Go check the user manual for the file format, iykyk--wasm-optโ enables the wasm-opt optimizer (and yes it's the default, it's that girl) โญ-Wl,<arg>โ passes the comma separated arguments in<arg>to the linker ๐-working-directory<value>โ resolves file paths relative to the directory you specify, so tidy ๐ง-Wp,<arg>โ passes the comma separated arguments in<arg>to the preprocessor ๐ซ-W<warning>โ enables the specified warning, we love being told things ๐-wโ suppresses all warnings. every single one. silence, gorgeous ๐-Xanalyzer<arg>โ passes<arg>to the static analyzer ๐-Xarch_device<arg>โ passes<arg>to the CUDA/HIP device compilation ๐-Xarch_host<arg>โ passes<arg>to the CUDA/HIP host compilation ๐-Xassembler<arg>โ passes<arg>to the assembler โจ-Xclang=<arg>โ literally just an alias for-Xclang๐-Xclang<arg>โ passes<arg>toclang -cc1๐ซถ-Xcuda-fatbinary<arg>โ passes<arg>to 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 to the ones identified by-<triple>๐ฆ-Xopenmp-target=<triple><arg>โ passes<arg>to the target offloading toolchain identified by<triple>๐ธ-Xopenmp-target<arg>โ passes<arg>to the target offloading toolchain ๐-Xpreprocessor<arg>โ passes<arg>to the preprocessor ๐-Xsycl-target-backend=<triple><arg>โ passes<arg>to the SYCL based backend identified by<triple>โจ-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 identified by<triple>๐ซ-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 identified by<triple>๐-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, and adds the option specifier'-'onto the<arg>too, sneaky but slay ๐-x<language>โ treats every input file after this as having type<language>, from that point onward, periodt ๐ซถ-z<arg>โ passes-z <arg>through to the linker ๐
๐ dxc compatibility options ๐
ngl this little crew is here for the dxc girlies specifically:
--dxv-path=<value>โ the DXIL validator installation path ๐-fspv-target-env=<value>โ specifies the target environment ๐-hlsl-entry<value>โ the entry point name for hlsl โจ
๐ SEE ALSO ๐
okay so if you want the full, complete, deluxe documentation for clang-21, it lives as a Texinfo manual ๐. And if the info and clang-21 programs are properly installed at your site (fingers crossed bestie ๐ค), then this command
info clang-21
should hand you the entire manual on a silver platter ๐๐
and that's a wrap on the whole page, babe ๐
โจ this little masterpiece is clang-21 6.2.0-0ubuntu3, dated August 2026, and filed under CLANG-21(1) ๐ go compile something iconic ๐๐๐ฆ
๐ฆ where this page comes from
- ubuntu stonking: dpclang-6 6.2.0-0ubuntu3 ยท APACHE-2-LLVM-EXCEPTIONS
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms