CLANG-21(1)

๐Ÿ“ฆ version 6.2.0, in ubuntu resolute

๐ŸŽ€ CLANG-21 ๐ŸŽ€

okay bestie, sit down, hydrate, because we are reading the manual page for <pink>clang-21</pink> โ€” User Commands section 1 โ€” aka the clang LLVM compiler for oneAPI. She's long. She's iconic. She has โœจopinionsโœจ about your floating point math. Let's go ๐Ÿ’…


๐Ÿ’– NAME ๐Ÿ’–

clang-21 โ€” clang LLVM compiler for oneAPI ๐Ÿซถ


โœจ DESCRIPTION โœจ

The overview, verbatim, no notes:

OVERVIEW: clang LLVM compiler

and how you actually invoke her:

USAGE: clang-21 [options] file...

Yep. That's the whole vibe. Options first, then files, and there are so many options. Let's get into it ๐ŸŒธ


๐Ÿ”ฅ OPTIONS: ๐Ÿ”ฅ

Bestie there are a LOT of these. I'm giving you all of them, no skips, no summarising, because we do not gatekeep here. ๐Ÿ’œ

  • -### โ€” prints the commands it would run for this compilation, but does not actually run them. Window shopping, but for compilers ๐Ÿ›๏ธ
  • --amdgpu-arch-tool=<value> โ€” the tool used for detecting AMD GPU arch in the system.
  • --analyzer-output <value> โ€” the static analyzer's report output format. Pick your fighter: html, plist, plist-multi-file, plist-html, sarif, sarif-html, or text.
  • --analyze โ€” run the static analyzer. Go off, bestie, find those bugs ๐Ÿ”
  • -B <prefix> โ€” search $prefix$file for executables, libraries, and data files. And if $prefix is a directory? Then she searches $prefix/$file. ๐Ÿ’ซ
  • -b <arg> โ€” pass -b <arg> to the linker on AIX.
  • -CC โ€” include comments from within macros in the 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-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__. She's doing the most, and she's proud of it ๐Ÿ˜ค
  • -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. Says 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. (so this is the "turn off the good stuff" button ๐Ÿ™ˆ)
  • -cl-single-precision-constant โ€” OpenCL only. Treat double precision floating-point constant as single precision constant.
  • -cl-std=<value> โ€” the OpenCL language standard to compile for.
  • -cl-strict-aliasing โ€” OpenCL only. This option is added for compatibility with OpenCL 1.0.
  • -cl-uniform-work-group-size โ€” OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel.
  • -cl-unsafe-math-optimizations โ€” OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable. It's giving danger ๐Ÿ’€ but it's documented danger so we respect it.
  • --config=<file> โ€” specify configuration file.
  • --cuda-compile-host-device โ€” compile CUDA code for both host and device (this is the 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 a 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. (iykyk ๐Ÿซก)
  • -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. (no linking, we're being โœจselectiveโœจ)
  • -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 -E mode 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 -E mode in addition to normal output.
  • -dM โ€” print macro definitions in -E mode instead of normal output. (she's swapping the whole output out, okay? main character energy ๐Ÿ‘‘)
  • -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. (yes, the original really writes it <dumpfpx> in the description while the argument is <dumppfx> โ€” we do not fix typos in this house, we reproduce them ๐Ÿ’…)
  • -dumpmachine โ€” display the compiler's target processor.
  • -dumpversion โ€” display the version of the compiler.
  • -D <macro>=<value> โ€” define <macro> to <value> (or 1 if <value> is 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. (a lil bonus, as a treat ๐ŸŽ€)
  • --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 โ€” follows 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> โ€” N must be a power of two. Align loops to the boundary. (not a power of two? she said what she said ๐Ÿ™…)
  • -faligned-allocation โ€” enable C++17 aligned allocation functions.
  • -fallow-editor-placeholders โ€” treat editor placeholders as valid source code. (yes, the <<<HERE>>> things. she's being generous ๐Ÿ˜Œ)
  • -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. ๐ŸŒˆ pretty errors, slay
  • -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 pack handling.
  • -fapplication-extension โ€” restrict code to those available for App Extensions.
  • -fapprox-func โ€” allow certain math function calls to be replaced with an approximately equivalent calculation.
  • -fassume-nothrow-exception-dtor โ€” assume that exception objects' destructors are non-throwing.
  • -fasync-exceptions โ€” enable EH Asynchronous exceptions.
  • -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-as is specified, the generated assembly will consider GNU as support. none means that all ELF features can be used, regardless of binutils support. Defaults to 2.26.
  • -fblocks โ€” enable the blocks language feature.
  • -fborland-extensions โ€” accept non-standard constructs supported by the Borland compiler.
  • -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 the x10 register call-saved (AArch64 only).
  • -fcall-saved-x11 โ€” make the x11 register call-saved (AArch64 only).
  • -fcall-saved-x12 โ€” make the x12 register call-saved (AArch64 only).
  • -fcall-saved-x13 โ€” make the x13 register call-saved (AArch64 only).
  • -fcall-saved-x14 โ€” make the x14 register call-saved (AArch64 only).
  • -fcall-saved-x15 โ€” make the x15 register call-saved (AArch64 only).
  • -fcall-saved-x18 โ€” make the x18 register call-saved (AArch64 only).
  • -fcall-saved-x8 โ€” make the x8 register call-saved (AArch64 only).
  • -fcall-saved-x9 โ€” make the x9 register 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.

okay and that's where this part wraps bestie โ€” there's SO much more coming, don't you dare close the tab ๐Ÿ’–

โœจ OPTIONS โœจ

Okay bestie, buckle UP, because this is the big one. Every single flag, no skips, no cap. ๐Ÿ’…

  • -fcf-protection โ€” turns on cf-protection in 'full' mode.
  • -fchar8_t โ€” enables the C++ builtin type char8_t. slay, unicode girlies rise ๐Ÿฆ‹
  • -fcheck-new โ€” tells clang not to assume that C++ operator new might return NULL. (yes, the double negative is real and yes it's on purpose.)
  • -fclang-abi-compat=<version> โ€” tries to match the ABI of Clang <version>. time travel but make it linkage โœจ
  • -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 โ€” same vibe, no path given: emit codegen data into the object file, and LLD for MachO (currently) merges them into default.cgdata.
  • -fcodegen-data-use=<path> โ€” use codegen data read from the specified <path>.
  • -fcodegen-data-use โ€” use codegen data read from default.cgdata to optimize the binary.
  • -fcolor-diagnostics โ€” enable colors in diagnostics. rainbow error messages, we love to see it ๐ŸŒˆ
  • -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 max number of entries to print in a constexpr evaluation backtrace (0 = no limit).
  • -fconstexpr-depth=<value> โ€” set the max depth of recursive constexpr function calls.
  • -fconstexpr-steps=<value> โ€” set the max 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. she's tracking everything, literally ๐Ÿ‘€
  • -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. (yes, reverse order, last one first, don't fight it.)
  • -fcrash-diagnostics-dir=<dir> โ€” put crash-report files in <dir>. ๐Ÿ˜ญ crash era
  • -fcrash-diagnostics=<value> โ€” set level of crash diagnostic reporting (option: off, compiler, all).
  • -fcrash-diagnostics โ€” enable crash diagnostic reporting (this is the default).
  • -fcs-profile-generate=<directory> โ€” generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by the LLVM_PROFILE_FILE env var).
  • -fcs-profile-generate โ€” generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by the LLVM_PROFILE_FILE env var).
  • -fcuda-prec-sqrt โ€” specify that sqrt is 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. every data item gets main character energy ๐Ÿ‘‘
  • -fdebug-compilation-dir=<value> โ€” the compilation directory to embed in the debug info.
  • -fdebug-default-version=<value> โ€” default DWARF version to use, if a -g option 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 __declspec as 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 (this is the default). ๐Ÿšจ like, actually undefined. not a vibe.
  • -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 '<:', ':>', '<%', '%>', '%:', '%:%:' (this is the 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. ๐Ÿ’ฐ iconic tbh
  • -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. (she's minimal, she's clean โœจ)
  • -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. ๐Ÿ™ˆ she tries her best
  • -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 _OPENACC macro 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. (they're not ready, bestie, be gentle ๐Ÿ’€)
  • -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. ๐ŸŽ๏ธ fast and loose, precision found dead
  • -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. ๐Ÿ” (bold assumption, but okay)
  • -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 the a0 register (M68k only).
  • -ffixed-a1 โ€” reserve the a1 register (M68k only).
  • -ffixed-a2 โ€” reserve the a2 register (M68k only).
  • -ffixed-a3 โ€” reserve the a3 register (M68k only).
  • -ffixed-a4 โ€” reserve the a4 register (M68k only).

okay bestie, deep breath ๐Ÿ’– we have entered the register reservation district, and it is long, but every single one of these does the exact same iconic thing: it tells clang hands off this register, she's booked. no cap. Let's go, one at a time, no skipping, because we don't do that here ๐Ÿซถ

  • -ffixed-a5 โ€” reserve the a5 register, so the compiler leaves it alone. M68k only โœจ
  • -ffixed-a6 โ€” reserve the a6 register. M68k only โœจ
  • -ffixed-d0 โ€” reserve the d0 register. M68k only โœจ
  • -ffixed-d1 โ€” reserve the d1 register. M68k only โœจ
  • -ffixed-d2 โ€” reserve the d2 register. M68k only โœจ
  • -ffixed-d3 โ€” reserve the d3 register. M68k only โœจ
  • -ffixed-d4 โ€” reserve the d4 register. M68k only โœจ
  • -ffixed-d5 โ€” reserve the d5 register. M68k only โœจ
  • -ffixed-d6 โ€” reserve the d6 register. M68k only โœจ
  • -ffixed-d7 โ€” reserve the d7 register. M68k only โœจ

now we're doing the SPARC set, and she is thorough ๐Ÿ’…

  • -ffixed-g1 โ€” reserve the G1 register. SPARC only ๐ŸŒธ
  • -ffixed-g2 โ€” reserve the G2 register. SPARC only ๐ŸŒธ
  • -ffixed-g3 โ€” reserve the G3 register. SPARC only ๐ŸŒธ
  • -ffixed-g4 โ€” reserve the G4 register. SPARC only ๐ŸŒธ
  • -ffixed-g5 โ€” reserve the G5 register. SPARC only ๐ŸŒธ
  • -ffixed-g6 โ€” reserve the G6 register. SPARC only ๐ŸŒธ
  • -ffixed-g7 โ€” reserve the G7 register. SPARC only ๐ŸŒธ
  • -ffixed-i0 โ€” reserve the I0 register. SPARC only ๐ŸŒธ
  • -ffixed-i1 โ€” reserve the I1 register. SPARC only ๐ŸŒธ
  • -ffixed-i2 โ€” reserve the I2 register. SPARC only ๐ŸŒธ
  • -ffixed-i3 โ€” reserve the I3 register. SPARC only ๐ŸŒธ
  • -ffixed-i4 โ€” reserve the I4 register. SPARC only ๐ŸŒธ
  • -ffixed-i5 โ€” reserve the I5 register. SPARC only ๐ŸŒธ
  • -ffixed-l0 โ€” reserve the L0 register. SPARC only ๐ŸŒธ
  • -ffixed-l1 โ€” reserve the L1 register. SPARC only ๐ŸŒธ
  • -ffixed-l2 โ€” reserve the L2 register. SPARC only ๐ŸŒธ
  • -ffixed-l3 โ€” reserve the L3 register. SPARC only ๐ŸŒธ
  • -ffixed-l4 โ€” reserve the L4 register. SPARC only ๐ŸŒธ
  • -ffixed-l5 โ€” reserve the L5 register. SPARC only ๐ŸŒธ
  • -ffixed-l6 โ€” reserve the L6 register. SPARC only ๐ŸŒธ
  • -ffixed-l7 โ€” reserve the L7 register. SPARC only ๐ŸŒธ
  • -ffixed-o0 โ€” reserve the O0 register. SPARC only ๐ŸŒธ
  • -ffixed-o1 โ€” reserve the O1 register. SPARC only ๐ŸŒธ
  • -ffixed-o2 โ€” reserve the O2 register. SPARC only ๐ŸŒธ
  • -ffixed-o3 โ€” reserve the O3 register. SPARC only ๐ŸŒธ
  • -ffixed-o4 โ€” reserve the O4 register. SPARC only ๐ŸŒธ
  • -ffixed-o5 โ€” reserve the O5 register. SPARC only ๐ŸŒธ

  • -ffixed-point โ€” turns on support for fixed point types โœจ (yes, she's sandwiched right in the middle of the register squad, alphabetisation said so, don't fight it)
  • -ffixed-r19 โ€” reserve register r19. Hexagon only ๐Ÿฆ‹
  • -ffixed-r9 โ€” reserve the r9 register. ARM only ๐Ÿฆ‹

AArch64 / RISC-V besties, this next block is literally all yours ๐ŸŒˆ (and yes, x1 shows up after x19 โ€” that's just how she alphabetised, we respect the choices ๐Ÿ‘‘)

  • -ffixed-x10 โ€” reserve the x10 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x11 โ€” reserve the x11 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x12 โ€” reserve the x12 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x13 โ€” reserve the x13 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x14 โ€” reserve the x14 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x15 โ€” reserve the x15 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x16 โ€” reserve the x16 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x17 โ€” reserve the x17 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x18 โ€” reserve the x18 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x19 โ€” reserve the x19 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x1 โ€” reserve the x1 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x20 โ€” reserve the x20 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x21 โ€” reserve the x21 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x22 โ€” reserve the x22 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x23 โ€” reserve the x23 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x24 โ€” reserve the x24 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x25 โ€” reserve the x25 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x26 โ€” reserve the x26 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x27 โ€” reserve the x27 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x28 โ€” reserve the x28 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x29 โ€” reserve the x29 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x2 โ€” reserve the x2 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x30 โ€” reserve the x30 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x31 โ€” reserve the x31 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x3 โ€” reserve the x3 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x4 โ€” reserve the x4 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x5 โ€” reserve the x5 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x6 โ€” reserve the x6 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x7 โ€” reserve the x7 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x8 โ€” reserve the x8 register. AArch64/RISC-V only ๐Ÿ’œ
  • -ffixed-x9 โ€” reserve the x9 register. AArch64/RISC-V only ๐Ÿ’œ

okay phew, registers are DONE, we survived, and now we get the fun miscellaneous f-flags ๐ŸŒธ

  • -fforce-check-cxx20-modules-input-files โ€” makes clang explicitly check the input source files coming from C++20 modules ๐Ÿ‘€ no sneaky unchecked inputs here
  • -fforce-dwarf-frame โ€” always emit a debug frame section, every time, no exceptions ๐Ÿ’…
  • -fforce-emit-vtables โ€” emits more virtual tables, all in the name of improving devirtualization ๐Ÿ”ฅ
  • -fforce-enable-int128 โ€” turns on support for the int128_t type ๐Ÿ‘‘
  • -ffp-accuracy=<value> โ€” tells clang exactly how much accuracy you need for floating-point operations and library calls ๐ŸŽฏ
  • -ffp-contract=<value> โ€” forms fused FP ops, like FMAs ๐Ÿงš
  • -ffp-eval-method=<value> โ€” picks which evaluation method gets 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 ๐ŸŒŠ
  • -ffreestanding โ€” asserts that this compilation is happening in a freestanding environment ๐Ÿ๏ธ
  • -ffuchsia-api-level=<value> โ€” set the Fuchsia API level ๐Ÿ“
  • -ffunction-sections โ€” every function gets its own section, main character energy, no sharing ๐Ÿ‘‘
  • -fglobal-isel โ€” enables the global instruction selector โš™๏ธ
  • -fgnu-keywords โ€” allow GNU-extension keywords no matter what language standard you picked ๐Ÿซถ
  • -fgnu-runtime โ€” generate output that's compatible with the standard GNU Objective-C runtime ๐ŸŽ€
  • -fgnu89-inline โ€” use the gnu89 inline semantics โœจ
  • -fgnuc-version=<value> โ€” sets a bunch of macros to claim compatibility with the given GCC version (the default is 4.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 โ€” defer host/device related diagnostic messages for CUDA/HIP ๐Ÿ™ˆ
  • -fgpu-flush-denormals-to-zero โ€” flush denormal floating point values to zero in CUDA/HIP device mode ๐Ÿ’€
  • -fgpu-rdc โ€” generate relocatable device code, also known as separate compilation mode ๐Ÿงฉ
  • -fgpu-sanitize โ€” enable sanitizer for supported offloading devices ๐Ÿงผ
  • -fheinous-gnu-extensions โ€” (Deprecated) controls whether -Winvalid-gnu-asm-cast defaults to an error or a warning โš ๏ธ
  • -fhip-emit-relocatable โ€” compile HIP source to relocatable ๐Ÿ“ฆ
  • -fhip-fp32-correctly-rounded-divide-sqrt โ€” specifies that the 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 โ€” use 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 to assume arguments and results aren't +-inf โ™พ๏ธ
  • -fhonor-nans โ€” same deal but for NANs: no optimizations that assume arguments and results aren't NANs ๐Ÿšซ
  • -fignore-exceptions โ€” enable support for ignoring exception handling constructs ๐Ÿ™ˆ
  • -fimplicit-module-maps โ€” implicitly search the file system for module map files ๐Ÿ”Ž
  • -fincremental-extensions โ€” enable incremental processing extensions, like processing statements at the global scope ๐Ÿ‘€
  • -finit-global-zero โ€” zero initialize globals that don't have default initialization. This is the default โœจ
  • -finline-functions โ€” inline the functions that are suitable for it ๐Ÿ’ซ
  • -finline-hint-functions โ€” inline functions which are (explicitly or implicitly) marked inline ๐Ÿซถ
  • -finline-max-stacksize=<value> โ€” suppresses inlining of any function whose stack size goes over the given value ๐Ÿ›‘
  • -finput-charset=<value> โ€” specify the default character set for source files ๐Ÿ”ค
  • -finstrument-function-entry-bare โ€” instrument function entry only, after inlining, with no arguments passed to the instrumentation call ๐ŸŽป
  • -finstrument-functions-after-inlining โ€” like -finstrument-functions, but the calls get inserted after inlining ๐Ÿช„
  • -finstrument-functions โ€” generate calls that instrument function entry and exit ๐Ÿ””
  • -fintegrated-as โ€” enable the integrated assembler ๐Ÿงฐ
  • -fintegrated-cc1 โ€” run cc1 in-process ๐Ÿƒ
  • -fintegrated-objemitter โ€” use the internal machine object code emitter โš™๏ธ
  • -fjmc โ€” enable just-my-code debugging ๐Ÿ›
  • -fjump-tables โ€” use jump tables for lowering switches ๐Ÿ•น๏ธ
  • -fkeep-persistent-storage-variables โ€” keeps all variables with a persistent storage duration โ€” global, static and thread-local included โ€” so you're guaranteed they can be directly addressed ๐Ÿ”’
  • -fkeep-static-consts โ€” keep static const variables even if they're unused ๐Ÿซถ
  • -fkeep-system-includes โ€” instead of expanding system headers while emitting preprocessor output, preserve the #include directive. Useful when you're producing preprocessed output for test case reduction. It may produce incorrect output if preprocessor symbols that control the included content (like _XOPEN_SOURCE) are defined in the including source file. And the portability of the resulting source to other compilation environments? Not guaranteed. ๐Ÿ’€
Only valid with -E. ๐Ÿ‘ˆ
  • -flax-vector-conversions=<value> โ€” enable implicit vector bit-casts ๐ŸŽญ
  • -flink-huge-device-code โ€” generate and use a custom linker script for huge device code sections ๐Ÿ—๏ธ
  • -flto-jobs=<value> โ€” controls the backend parallelism of -flto=thin (a default of 0 means the number of threads gets derived from the number of CPUs detected) ๐Ÿงต
  • -flto=auto โ€” enable LTO in 'full' mode ๐Ÿ”ฅ
  • -flto=jobserver โ€” enable LTO in 'full' mode ๐Ÿ”ฅ
  • -flto=<value> โ€” set the LTO mode ๐ŸŽ›๏ธ
  • -flto โ€” enable LTO in 'full' mode ๐Ÿ”ฅ
  • -fmacro-backtrace-limit=<value> โ€” bestie, this sets the max number of entries you'll see in a macro expansion backtrace. 0 = no limit, so go wild if you want. โœจ
  • -fmacro-prefix-map=<value> โ€” remap file source paths inside predefined preprocessor macros and __builtin_FILE(). Implies -ffile-reproducible. it's giving "make my build reproducible" energy. ๐Ÿ’…
  • -fmath-errno โ€” require math functions to signal errors by setting errno. no cap, they gotta tattle. ๐Ÿ“ข
  • -fmax-tokens=<value> โ€” the max total number of preprocessed tokens for -Wmax-tokens. keep it cute, keep it counted. ๐Ÿ”ข
  • -fmax-type-align=<value> โ€” specify the maximum alignment to enforce on pointers that don't have an explicit alignment. so specific. ๐ŸŽฏ
  • -fmemory-profile-use=<pathname> โ€” use a memory profile for profile-guided memory optimization. glow-up your memory game. ๐Ÿง โœจ
  • -fmemory-profile=<directory> โ€” enable heap memory profiling and dump the results into <directory>. detective mode: on. ๐Ÿ”
  • -fmemory-profile โ€” just enable heap memory profiling. simple. iconic. ๐Ÿ’…
  • -fmerge-all-constants โ€” allow merging of constants. two become one, slay. ๐Ÿ’ž
  • -fmessage-length=<value> โ€” format message diagnostics so they fit within N columns. keep it within the margins, bestie. ๐Ÿ“
  • -fminimize-whitespace โ€” ignore the whitespace from the input file when emitting preprocessor output. it will only contain whitespace when necessary, e.g. to keep two minus signs from merging into an increment operator. useful with the -P option to normalize whitespace such that two files with only formatting changes are equal.

Only valid with -E on C-like inputs and incompatible with -traditional-cpp. so don't try it anywhere else, okay? ๐Ÿšซ

  • -fmodule-file=[<name>=]<file> โ€” specify the mapping of module name to precompiled module file, or load a module file if name is omitted. mapping queen. ๐Ÿ‘‘
  • -fmodule-header=<kind> โ€” build a C++20 Header Unit from a header that should be found in the user (fmodule-header=user) or system (fmodule-header=system) search path. choose your fighter. ๐ŸฅŠ
  • -fmodule-header โ€” build a C++20 Header Unit from a header. no extras, just vibes. ๐Ÿฆ‹
  • -fmodule-map-file=<file> โ€” load this module map file. yes ma'am. ๐Ÿ“‚
  • -fmodule-name=<name> โ€” specify the name of the module to build. name it and claim it. ๐Ÿ’–
  • -fmodule-output=<value> โ€” save intermediate module file results when compiling a standard C++ module unit. keep the receipts. ๐Ÿงพ
  • -fmodule-output โ€” same thing but without a value: save intermediate module file results when compiling a standard C++ module unit. ๐Ÿ’พ
  • -fmodulemap-allow-subdirectory-search โ€” allow searching for module maps in subdirectories of search paths. go deeper. ๐Ÿ•ณ๏ธ
  • -fmodules-cache-path=<directory> โ€” specify the module cache path. where the modules live. ๐Ÿ 
  • -fmodules-decluse โ€” require declaration of modules used within a module. no sneaking around. ๐Ÿ‘€
  • -fmodules-disable-diagnostic-validation โ€” disable validation of the diagnostic options when loading the module. turn off the vibe check. ๐Ÿšซโœ…
  • -fmodules-embed-all-files<value> โ€” embed the contents of all files read by this compilation into the produced module file. pack it all in. ๐ŸŽ’
  • -fmodules-ignore-macro=<value> โ€” ignore the definition of the given macro when building and loading modules. not today, macro. ๐Ÿ™…โ€โ™€๏ธ
  • -fmodules-prune-after=<seconds> โ€” specify the interval (in seconds) after which a module file will be considered unused. bye felicia. ๐Ÿ‘‹
  • -fmodules-prune-interval=<seconds> โ€” specify the interval (in seconds) between attempts to prune the module cache. regular cleanup check. ๐Ÿงน
  • -fmodules-reduced-bmi โ€” generate the reduced BMI. slimmer, trimmer. โœจ
  • -fmodules-search-all โ€” search even non-imported modules to resolve references. nosy in a good way. ๐Ÿ”Ž
  • -fmodules-strict-decluse โ€” like -fmodules-decluse but requires all headers to be in modules. stricter than your mom. ๐Ÿ˜ค
  • -fmodules-user-build-path <directory> โ€” specify the module user build path. your personal module corner. ๐Ÿ›‹๏ธ
  • -fmodules-validate-input-files-content โ€” validate PCM input files based on content if mtime differs. don't just trust timestamps, bestie. โฐ
  • -fmodules-validate-once-per-build-session โ€” don't verify input files for the modules if the module has been successfully validated or loaded during this build session. once is enough. ๐Ÿ’…
  • -fmodules-validate-system-headers โ€” validate the system headers that a module depends on when loading the module. check the system's vibe. ๐Ÿ–ฅ๏ธ
  • -fmodules โ€” enable the 'modules' language feature. the main character arrives. ๐Ÿ‘‘
  • -fms-compatibility-version=<value> โ€” a dot-separated value representing the Microsoft compiler version number to report in _MSC_VER. 0 = don't define it (default). windows cosplay, but make it precise. ๐ŸชŸ
  • -fms-compatibility โ€” enable full Microsoft Visual C++ compatibility. full send. ๐Ÿš€
  • -fms-define-stdc โ€” define '__STDC__' to '1' in MSVC Compatibility mode. just a little define. ๐ŸŒฑ
  • -fms-extensions โ€” accept some non-standard constructs supported by the Microsoft compiler. chaotic but valid. ๐ŸŒ€
  • -fms-hotpatch โ€” ensure that all functions can be hotpatched at runtime. patch me up. ๐Ÿฉน
  • -fms-runtime-lib=<value> โ€” select Windows run-time library. pick your fighter, again. ๐ŸŽฎ
  • -fms-volatile โ€” volatile loads and stores have acquire and release semantics. memory ordering but make it ms. ๐Ÿงต
  • -fmsc-version=<value> โ€” Microsoft compiler version number to report in _MSC_VER. 0 = don't define it (default). same energy, different flag. ๐Ÿ“…
  • -fnew-alignment=<align> โ€” specifies the largest alignment guaranteed by '::operator new(size_t)'. alignment but for new. ๐Ÿ“
  • -fnew-infallible โ€” enable treating throwing global C++ operator new as always returning valid memory (annotates with __attribute__((returns_nonnull)) and throw()). this is detectable in source. no bad news please. ๐Ÿ™
  • -fno-aapcs-bitfield-width โ€” do not follow the AAPCS standard requirement stating that volatile bit-field width is dictated by the field container type. (ARM only). arm says no. ๐Ÿ’ช
  • -fno-access-control โ€” disable C++ access control. private? never heard of her. ๐Ÿ”“
  • -fno-addrsig โ€” don't emit an address-significance table. skip it. ๐Ÿšซ
  • -fno-apinotes-modules โ€” disable module-based external API notes support. not today. ๐Ÿ“
  • -fno-apinotes โ€” disable external API notes support. no notes. ๐Ÿ™ˆ
  • -fno-assume-sane-operator-new โ€” don't assume that C++'s global operator new can't alias any pointer. assume nothing. ๐Ÿคจ
  • -fno-assume-unique-vtables โ€” disable optimizations based on vtable pointer identity. vtables are not all the same, bestie. ๐ŸŽญ
  • -fno-assumptions โ€” disable codegen and compile-time checks for C++23's [[assume]] attribute. don't assume. ๐Ÿ’€
  • -fno-auto-import โ€” MinGW specific. disable support for automatic dllimport in code generation and linking. windows but make it mingw. ๐ŸชŸ
  • -fno-autolink โ€” disable generation of linker directives for automatic library linking. no auto-linking. ๐Ÿ”—
  • -fno-builtin-<value> โ€” disable implicit builtin knowledge of a specific function. forget that function specifically. ๐Ÿง 
  • -fno-builtin โ€” disable implicit builtin knowledge of functions. forget all of them. ๐Ÿคฏ
  • -fno-bundle-offload-arch โ€” specify that the offload bundler should not identify a bundle with specific arch. for example, the bundle for nvptx64-nvidia-cuda-sm_80 uses the bundle tag nvptx64-nvidia-cuda when used. this allows .o files to contain .bc bundles that are unspecific to a particular arch version. offload but keep it generic. ๐Ÿ“ฆ
  • -fno-c++-static-destructors โ€” disable C++ static destructor registration. no cleanup on the way out. ๐Ÿšช
  • -fno-char8_t โ€” disable C++ builtin type char8_t. sorry char8_t stans. ๐Ÿ˜ญ
  • -fno-clangir โ€” use the AST -> LLVM pipeline to compile. classic route, no clangir. ๐Ÿ›ฃ๏ธ
  • -fno-color-diagnostics โ€” disable colors in diagnostics. monochrome mood. ๐Ÿ–ค
  • -fno-common โ€” compile common globals like normal definitions. no common blocks. ๐Ÿงฑ
  • -fno-complete-member-pointers โ€” do not require member pointer base types to be complete if they would be significant under the Microsoft ABI. incomplete but valid. ๐Ÿงฉ
  • -fno-constant-cfstrings โ€” disable creation of CodeFoundation-type constant strings. no constant cfstrings. ๐Ÿšซ
  • -fno-coverage-mapping โ€” disable code coverage analysis. no coverage, no problem. ๐Ÿ“Š
  • -fno-coverage-mcdc โ€” disable MC/DC coverage criteria. mcdc? more like no thanks. ๐Ÿšซ
  • -fno-crash-diagnostics โ€” disable auto-generation of preprocessed source files and a script for reproduction during a clang crash. no crash receipts. ๐Ÿ’ฅ
  • -fno-cuda-prec-sqrt โ€” don't specify that sqrt is correctly rounded (for CUDA devices). cuda math but approximate. ๐ŸŽฒ
  • -fno-cx-fortran-rules โ€” range reduction is disabled for complex arithmetic operations. no fortran rules. ๐Ÿšซ
  • -fno-cx-limited-range โ€” basic algebraic expansions of complex arithmetic operations involving are disabled. note: the original says "involving are disabled" โ€” we keep it as is. complex math says no. ๐Ÿคฏ
  • -fno-cxx-modules โ€” disable modules for C++. c++ modules? not today. ๐Ÿšซ
  • -fno-debug-macro โ€” do not emit macro debug information. no macro debug info. ๐Ÿž
  • -fno-declspec โ€” disallow __declspec as a keyword. no declspec for you. ๐Ÿšซ
  • -fno-define-target-os-macros โ€” disable predefined target OS macros. no target OS macros. ๐ŸŽฏ
  • -fno-delayed-template-parsing โ€” disable delayed template parsing. parse it now. โณ
  • -fno-delete-null-pointer-checks โ€” do not treat usage of null pointers as undefined behavior. null pointer? not undefined, apparently. ๐Ÿคทโ€โ™€๏ธ
  • -fno-diagnostics-fixit-info โ€” do not include fixit information in diagnostics. no fix-it suggestions. ๐Ÿ› ๏ธ
  • -fno-diagnostics-show-line-numbers โ€” show line numbers in diagnostic code snippets. yes, even though it's -fno, that's literally what it says. make it make sense. ๐Ÿค”
  • -fno-digraphs โ€” disallow alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:'. no digraphs. ๐Ÿšซ
  • -fno-direct-access-external-data โ€” use GOT indirection to reference external data symbols. indirect but valid. ๐Ÿ”„
  • -fno-disable-block-signature-string โ€” don't disable block signature string. (there's a stray closing paren in the original, we keep the vibe.) ๐Ÿงฉ
  • -fno-discard-value-names โ€” do not discard value names in LLVM IR. keep the names. ๐Ÿท๏ธ
  • -fno-dollars-in-identifiers โ€” disallow '$' in identifiers. no dollar signs. ๐Ÿ’ธ
  • -fno-elide-constructors โ€” disable C++ copy constructor elision. no elision. ๐Ÿšซ
  • -fno-elide-type โ€” do not elide types when printing diagnostics. show the whole type. ๐Ÿ“
  • -fno-eliminate-unused-debug-types โ€” emit debug info for defined but unused types. unused but seen. ๐Ÿ‘€
  • -fno-exceptions โ€” disable support for exception handling. no exceptions. ๐Ÿšซ
  • -fno-experimental-late-parse-attributes โ€” disable experimental late parsing of attributes. no late parsing. โฐ
  • -fno-experimental-relative-c++-abi-vtables โ€” do not use the experimental C++ class ABI for classes with virtual tables. no experimental vtables. ๐Ÿงช
  • -fno-experimental-sanitize-metadata=<value> โ€” disable emitting metadata for binary analysis sanitizers. no metadata. ๐Ÿ“‰
  • -fno-fat-lto-objects โ€” disable fat LTO object support. slim LTO only. ๐Ÿ‹๏ธ
  • -fno-file-reproducible โ€” use the host's platform-specific path separator character when expanding the __FILE__ macro. platform-specific vibes. ๐Ÿ–ฅ๏ธ
  • -fno-fine-grained-bitfield-accesses โ€” use large-integer access for consecutive bitfield runs. big integer energy. ๐Ÿ”ข
  • -fno-finite-loops โ€” do not assume that any loop is finite. infinite loops are valid. โ™พ๏ธ
  • -fno-fixed-point โ€” disable fixed point types. no fixed point. ๐Ÿšซ
  • -fno-force-enable-int128 โ€” disable support for int128_t type. no int128_t. ๐Ÿšซ
  • -fno-global-isel โ€” disables the global instruction selector. no global isel. ๐Ÿšซ
  • -fno-gnu-inline-asm โ€” disable GNU style inline asm. no GNU inline asm. ๐Ÿšซ
  • -fno-gpu-allow-device-init โ€” don't allow device side init function in HIP (experimental). hip but no device init. ๐ŸŽ›๏ธ
  • -fno-gpu-approx-transcendentals โ€” don't use approximate transcendental functions. be exact. ๐ŸŽฏ
  • -fno-gpu-defer-diag โ€” don't defer host/device related diagnostic messages for CUDA/HIP. no deferring. ๐Ÿ“ข
  • -fno-hip-emit-relocatable โ€” do not override toolchain to compile HIP source to relocatable. no override. ๐Ÿšซ
  • -fno-hip-fp32-correctly-rounded-divide-sqrt โ€” okay so bestie, this one is giving don't specify that single precision floating-point divide and sqrt used in the program source are correctly rounded. (HIP device compilation only) ๐Ÿ’…
  • -fno-hip-kernel-arg-name โ€” not me telling you to not specify that kernel argument names are preserved. (HIP only) ๐Ÿซถ
  • -fno-hip-new-launch-api โ€” literally don't use new kernel launching API for HIP. periodt โœจ
  • -fno-init-global-zero โ€” do not zero initialize globals without default initialization. lowkey important ๐Ÿ’š
  • -fno-integrated-as โ€” disable the integrated assembler. it's giving external energy ๐ŸŽ€
  • -fno-integrated-cc1 โ€” spawn a separate process for each cc1. no cap ๐Ÿฆ‹
  • -fno-integrated-objemitter โ€” use external machine object code emitter. main character move ๐Ÿ’™
  • -fno-jump-tables โ€” do not use jump tables for lowering switches. simple as that ๐Ÿ’…
  • -fno-keep-persistent-storage-variables โ€” disable keeping all variables that have a persistent storage duration, including global, static and thread-local variables, to guarantee that they can be directly addressed. iykyk ๐Ÿ˜ญ
  • -fno-keep-static-consts โ€” don't keep static const variables even if unused. bye bestie ๐Ÿ“
  • -fno-knr-functions โ€” disable support for K&R C function declarations. old school but make it off ๐ŸŒธ
  • -fno-link-huge-device-code โ€” do not generate or use a custom linker script for huge device code sections. (default) ๐Ÿ’™
  • -fno-lto โ€” disable LTO mode. (default) โœจ
  • -fno-memory-profile โ€” disable heap memory profiling. no tracking today ๐ŸŽ€
  • -fno-merge-all-constants โ€” disallow merging of constants. they stay separate, periodt ๐Ÿ’š
  • -fno-modules-check-relocated<value> โ€” skip checks for relocated modules when loading PCM files. yes, with that <value> ๐Ÿ‘‘
  • -fno-modules-validate-textual-header-includes โ€” do not enforce -fmodules-decluse and private header restrictions for textual headers. This flag will be removed in a future Clang release. so don't get too attached ๐Ÿ˜ญ
  • -fno-ms-tls-guards โ€” do not emit code to perform on-demand initialization of thread-local variables. no guards, no problem ๐Ÿฆ‹
  • -fno-new-infallible โ€” disable treating throwing global C++ operator new as always returning valid memory โ€” annotates with __attribute__((returns_nonnull)) and throw(). This is detectable in source. fr fr ๐Ÿ’…
  • -fno-objc-avoid-heapify-local-blocks โ€” don't try to avoid heapifying local blocks. objc said not today ๐Ÿ“
  • -fno-objc-infer-related-result-type โ€” do not infer Objective-C related result type based on method family. no assumptions bestie ๐ŸŒธ
  • -fno-offload-fp32-prec-div โ€” fdiv operations in offload device code are not required to return correctly rounded results. relaxed vibes ๐Ÿ’š
  • -fno-offload-fp32-prec-sqrt โ€” sqrt operations in offload device code are not required to return correctly rounded results. same energy โœจ
  • -fno-offload-lto โ€” disable LTO mode (default) for offload compilation. offload but make it no LTO ๐Ÿ’™
  • -fno-offload-uniform-block โ€” don't assume that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise). vibe check passed ๐ŸŽ€
  • -fno-offload-via-llvm โ€” don't use LLVM/Offload as portable offloading runtime. not the move ๐Ÿฆ‹
  • -fno-openmp-extensions โ€” disable all Clang extensions for OpenMP directives and clauses. strictly OpenMP, no extras ๐Ÿ’…
  • -fno-operator-names โ€” do not treat C++ operator name keywords as synonyms for operators. keywords stay keywords ๐ŸŒˆ
  • -fno-optimize-sibling-calls โ€” disable tail call optimization, keeping the call stack accurate. stack said thank you ๐Ÿ˜ญ
  • -fno-pch-codegen โ€” do not generate code for uses of this PCH that assumes an explicit object file will be built for the PCH. pch but no assumptions โœจ
  • -fno-pch-debuginfo โ€” do not generate debug info for types in an object file built from this PCH and do not generate them elsewhere. debug info not invited ๐Ÿ’š
  • -fno-plt โ€” use GOT indirection instead of PLT to make external function calls (x86 only). GOT it ๐ŸŽ€
  • -fno-preserve-as-comments โ€” do not preserve comments in inline assembly. comments? gone ๐Ÿ’™
  • -fno-profile-generate โ€” disable generation of profile instrumentation. no instrumentation today ๐Ÿฆ‹
  • -fno-profile-instr-generate โ€” disable generation of profile instrumentation. same thing, different flag bestie ๐Ÿ’…
  • -fno-profile-instr-use โ€” disable using instrumentation data for profile-guided optimization. PGO said not now ๐Ÿ“
  • -fno-pseudo-probe-for-profiling โ€” do not emit pseudo probes for sample profiling. no probes, no problem โœจ
  • -fno-raw-string-literals โ€” disable raw string literals. raw? not here ๐ŸŒธ
  • -fno-register-global-dtors-with-atexit โ€” don't use atexit or __cxa_atexit to register global destructors. destructors doing their own thing ๐Ÿ’š
  • -fno-rtlib-add-rpath โ€” do not add -rpath with architecture-specific resource directory to the linker flags. When --hip-link is specified, do not add -rpath with HIP runtime library directory to the linker flags. linker said no rpath ๐Ÿ’…
  • -fno-rtlib-defaultlib โ€” on Windows, do not emit /defaultlib: directives to link compiler-rt libraries. Windows specific, bestie ๐ŸŽ€
  • -fno-rtti-data โ€” disable generation of RTTI data. RTTI data? not today ๐Ÿ’™
  • -fno-rtti โ€” disable generation of rtti information. rtti info? gone โœจ
  • -fno-sanitize-address-globals-dead-stripping โ€” disable linker dead stripping of globals in AddressSanitizer. globals stay alive ๐Ÿ˜ญ
  • -fno-sanitize-address-outline-instrumentation โ€” use default code inlining logic for the address sanitizer. default logic, periodt ๐Ÿ’š
  • -fno-sanitize-address-poison-custom-array-cookie โ€” disable poisoning array cookies when using custom operator new[] in AddressSanitizer. no poison in the cookie ๐Ÿ“
  • -fno-sanitize-address-use-after-scope โ€” disable use-after-scope detection in AddressSanitizer. scope said bye ๐ŸŒธ
  • -fno-sanitize-address-use-odr-indicator โ€” disable ODR indicator globals. no indicators โœจ
  • -fno-sanitize-cfi-canonical-jump-tables โ€” do not make the jump table addresses canonical in the symbol table. not canonical bestie ๐Ÿ’…
  • -fno-sanitize-cfi-cross-dso โ€” disable control flow integrity (CFI) checks for cross-DSO calls. CFI cross-DSO? off ๐Ÿฆ‹
  • -fno-sanitize-coverage=<value> โ€” disable features of coverage instrumentation for Sanitizers. with that <value> energy ๐ŸŽ€
  • -fno-sanitize-hwaddress-experimental-aliasing โ€” disable aliasing mode in HWAddressSanitizer. experimental aliasing? not now ๐Ÿ’™
  • -fno-sanitize-ignorelist โ€” don't use ignorelist file for sanitizers. no ignorelist, no filter ๐Ÿ˜ญ
  • -fno-sanitize-memory-param-retval โ€” disable detection of uninitialized parameters and return values. uninitialized? not detected โœจ
  • -fno-sanitize-memory-track-origins โ€” disable origins tracking in MemorySanitizer. origins? unknown ๐Ÿ’š
  • -fno-sanitize-memory-use-after-dtor โ€” disable use-after-destroy detection in MemorySanitizer. destroyed? not checked ๐Ÿ“
  • -fno-sanitize-merge=<value> โ€” do not allow compiler to merge handlers for specified sanitizers. specified only ๐ŸŒธ
  • -fno-sanitize-merge โ€” do not allow compiler to merge handlers for any sanitizers. none merged โœจ
  • -fno-sanitize-recover=<value> โ€” disable recovery for specified sanitizers. specified sanitizers said no recovery ๐Ÿ’…
  • -fno-sanitize-stable-abi โ€” conventional ABI instrumentation for sanitizer runtime. Default: Conventional ๐Ÿฆ‹
  • -fno-sanitize-stats โ€” disable sanitizer statistics gathering. no stats, no stress ๐ŸŽ€
  • -fno-sanitize-thread-atomics โ€” disable atomic operations instrumentation in ThreadSanitizer. atomics? not instrumented ๐Ÿ’™
  • -fno-sanitize-thread-func-entry-exit โ€” disable function entry/exit instrumentation in ThreadSanitizer. entry/exit said bye ๐Ÿ˜ญ
  • -fno-sanitize-thread-memory-access โ€” disable memory access instrumentation in ThreadSanitizer. memory access? not tracked โœจ
  • -fno-sanitize-trap=<value> โ€” disable trapping for specified sanitizers. specified sanitizers only ๐Ÿ’š
  • -fno-sanitize-trap โ€” disable trapping for all sanitizers. all of them ๐Ÿ“
  • -fno-short-wchar โ€” force wchar_t to be an unsigned int. unsigned int energy ๐ŸŒธ
  • -fno-show-column โ€” do not include column number on diagnostics. columns? hidden โœจ
  • -fno-show-source-location โ€” do not include source location information with diagnostics. source location? not shown ๐Ÿ’…
  • -fno-signed-char โ€” char is unsigned. periodt ๐Ÿฆ‹
  • -fno-signed-zeros โ€” allow optimizations that ignore the sign of floating point zeros. zero is zero bestie ๐ŸŽ€
  • -fno-skip-odr-check-in-gmf โ€” perform ODR checks for decls in the global module fragment. ODR checks? yes please ๐Ÿ’™
  • -fno-spell-checking โ€” disable spell-checking. typos? not checked ๐Ÿ˜ญ
  • -fno-split-machine-functions โ€” disable late function splitting using profile information (x86 and aarch64 ELF). no splitting โœจ
  • -fno-split-stack โ€” wouldn't use segmented stack. not the vibe ๐Ÿ’š
  • -fno-stack-clash-protection โ€” disable stack clash protection. clash protection? off ๐Ÿ“
  • -fno-stack-protector โ€” disable the use of stack protectors. no protectors ๐ŸŒธ
  • -fno-standalone-debug โ€” limit debug information produced to reduce size of debug binary. smaller debug binary โœจ
  • -fno-strict-aliasing โ€” disable optimizations based on strict aliasing rules. strict aliasing? relaxed ๐Ÿ’…
  • -fno-strict-float-cast-overflow โ€” relax language rules and try to match the behavior of the target's native float-to-int conversion instructions. native behavior said hi ๐Ÿฆ‹
  • -fno-strict-return โ€” don't treat control flow paths that fall off the end of a non-void function as unreachable. falling off is reachable, bestie ๐ŸŽ€
  • -fno-sycl-add-default-spec-consts-image โ€” turns off generation of device image where all specialization constant usages are replaced with default values. no default spec consts image ๐Ÿ’™
  • -fno-sycl-allow-device-dependencies โ€” Deprecated: please use -fno-sycl-allow-device-image-dependencies instead. so use the other one ๐Ÿ˜ญ
  • -fno-sycl-allow-device-image-dependencies โ€” do not allow dependencies between device code images (default). no dependencies โœจ
  • -fno-sycl-dead-args-optimization โ€” disables elimination of DPC++ dead kernel arguments. dead args stay ๐Ÿ“
  • -fno-sycl-decompose-functor โ€” do not decompose SYCL functor if possible (experimental, CUDA only). functor stays whole ๐ŸŒธ
  • -fno-sycl-device-code-split-esimd โ€” do not split ESIMD and SYCL device code into separate device binary images. Has effect only for SPIR-based targets. (experimental) ๐Ÿ’š
  • -fno-sycl-device-lib-jit-link โ€” disables sycl device library jit link (experimental). jit link? off โœจ
  • -fno-sycl-device-lib=<value> โ€” control exclusion of device libraries from device binary linkage. Valid arguments are libc, libm-fp32, libm-fp64, all. ๐Ÿ’™
  • -fno-sycl-early-optimizations โ€” disable standard optimization pipeline for SYCL device compiler. no early optimizations ๐ŸŽ€
  • -fno-sycl-esimd-force-stateless-mem โ€” do not enforce using stateless memory accesses. stateless memory? not forced ๐Ÿฆ‹
  • -fno-sycl-explicit-simd โ€” disable SYCL explicit SIMD extension. (deprecated) ๐Ÿ˜ญ
  • -fno-sycl-force-inline-kernel-lambda โ€” disallow force inline SYCL kernels lambda in entry point. lambda said no force ๐ŸŒธ
  • -fno-sycl-id-queries-fit-in-int โ€” do not assume that SYCL ID queries fit within MAX_INT. no assumptions bestie โœจ
  • -fno-sycl-instrument-device-code โ€” do not add Instrumentation and Tracing Technology (ITT) instrumentation intrinsics calls (experimental). ITT calls? not added ๐Ÿ’š
  • -fno-sycl-libspirv โ€” disable check for libspirv. libspirv? unchecked ๐Ÿ’…
  • -fno-sycl-link-spirv โ€” disable adding of the default (spir64) triple when discovered in user specified objects and archives. spir64? not added ๐ŸŽ€
  • -fno-sycl-rdc โ€” bestie this one generates relocatable device code during SYCL offload target compilation ๐Ÿฆ‹. Using -fno-sycl-rdc in combination with -c will produce final device binaries inside the generated fat object. When you've got this option on, every single kernel has to be self-contained inside its translation unit (source file), so the use of SYCL_EXTERNAL is disallowed when this option is enabled. no exceptions, it's giving strict ๐Ÿ’…
  • -fno-sycl-remove-unused-external-funcs โ€” prevents removal of unused SYCL_EXTERNAL functions. they stay. periodt โœจ
  • -fno-sycl-unnamed-lambda โ€” disallow unnamed SYCL lambda kernels. name your lambdas, they deserve it ๐ŸŽ€
  • -fno-sycl-use-bitcode โ€” use SPIR-V instead of LLVM bitcode in fat objects. (deprecated!) โš ๏ธ
  • -fno-sycl-use-footer โ€” disable usage of the integration footer during SYCL-enabled compilations.
  • -fno-sycl โ€” disable SYCL C++ extensions. that's it, that's the whole vibe ๐ŸŒธ
  • -fno-system-debug โ€” do not emit debug information for declarations in system headers.
  • -fno-temp-file โ€” directly create compilation output files. > heads up bestie: this may lead to incorrect incremental builds if the compiler crashes ๐Ÿ˜ญ so like, know what you're doing.
  • -fno-threadsafe-statics โ€” do not emit code to make initialization of local statics thread safe.
  • -fno-trigraphs โ€” do not process trigraph sequences.
  • -fno-unified-lto โ€” use distinct LTO pipelines.
  • -fno-unique-section-names โ€” don't use unique names for text and data sections.
  • -fno-unroll-loops โ€” turn off loop unroller. bye unrolling ๐Ÿ‘‹
  • -fno-use-cxa-atexit โ€” don't use __cxa_atexit for calling destructors.
  • -fno-use-init-array โ€” use .ctors/.dtors instead of .init_array/.fini_array.
  • -fno-verify-intermediate-code โ€” disable verification of LLVM IR. living dangerously fr fr ๐Ÿ’€
  • -fno-visibility-inlines-hidden-static-local-var โ€” disables -fvisibility-inlines-hidden-static-local-var (this is the default on non-darwin targets).
  • -fno-xray-function-index โ€” omit function index section at the expense of single-function patching performance. trade-off city ๐Ÿ”ฅ
  • -fno-zero-initialized-in-bss โ€” don't place zero initialized data in BSS.
  • -fno-zos-extensions โ€” do not accept non-standard constructs supported by the z/OS compiler.
  • -fobjc-arc-exceptions โ€” use EH-safe code when synthesizing retains and releases in -fobjc-arc.
  • -fobjc-arc โ€” synthesize retain and release calls for Objective-C pointers.
  • -fobjc-avoid-heapify-local-blocks โ€” try to avoid heapifying local blocks.
  • -fobjc-disable-direct-methods-for-testing โ€” ignore attribute objc_direct so that direct methods can be tested.
  • -fobjc-encode-cxx-class-template-spec โ€” fully encode c++ class template specialization.
  • -fobjc-exceptions โ€” enable Objective-C exceptions.
  • -fobjc-runtime=<value> โ€” specify the target Objective-C runtime kind and version.
  • -fobjc-weak โ€” enable ARC-style weak references in Objective-C.
  • -foffload-fp32-prec-div โ€” fdiv operations in offload device code are required to return correctly rounded results.
  • -foffload-fp32-prec-sqrt โ€” sqrt operations in offload device code are required to return correctly rounded results. rounding? correct. always ๐Ÿ’…
  • -foffload-implicit-host-device-templates โ€” template functions or specializations without host, device and global attributes have implicit host device attributes (CUDA/HIP only).
  • -foffload-lto=<value> โ€” set LTO mode for offload compilation.
  • -foffload-lto โ€” enable LTO in 'full' mode for offload compilation.
  • -foffload-uniform-block โ€” assume that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise).
  • -foffload-via-llvm โ€” use LLVM/Offload as portable offloading runtime.
  • -fomit-frame-pointer โ€” omit the frame pointer from functions that don't need it. some stack unwinding cases, like profilers and sanitizers, may prefer specifying -fno-omit-frame-pointer. on many targets, -O1 and higher omit the frame pointer by default. also, -m[no-]omit-leaf-frame-pointer takes precedence for leaf functions ๐Ÿ‘‘
  • -fopenacc โ€” enable OpenACC.
  • -fopenmp-extensions โ€” enable all Clang extensions for OpenMP directives and clauses.
  • -fopenmp-force-usm โ€” force behavior as if the user specified pragma omp requires unified_shared_memory.
  • -fopenmp-offload-mandatory โ€” do not create a host fallback if offloading to the device fails. it's device or nothing โœ‹
  • -fopenmp-simd โ€” emit OpenMP code only for SIMD-based constructs.
  • -fopenmp-target-debug โ€” enable debugging in the OpenMP offloading device RTL.
  • -fopenmp-target-jit โ€” emit code that can be JIT compiled for OpenMP offloading. implies -foffload-lto=full โœจ
  • -fopenmp-targets=<value> โ€” specify comma-separated list of triples OpenMP offloading targets to be supported.
  • -fopenmp-version=<value> โ€” set OpenMP version (e.g. 45 for OpenMP 4.5, 51 for OpenMP 5.1). default value is 51 for Clang.
  • -fopenmp โ€” parse OpenMP pragmas and generate parallel code. parallel girlboss era ๐Ÿซถ
  • -foperator-arrow-depth=<value> โ€” maximum number of operator->s to call for a member access.
  • -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.
  • -foptimization-record-passes=<regex> โ€” only include passes which match a specified regular expression in the generated optimization record (by default, include all passes).
  • -forder-file-instrumentation โ€” generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var). Deprecated, please use -ftemporal-profile โš ๏ธ
  • -fpack-struct=<value> โ€” specify the default maximum struct packing alignment.
  • -fpascal-strings โ€” recognize and construct Pascal-style string literals.
  • -fpass-plugin=<dsopath> โ€” load pass plugin from a dynamic shared object file (only with new pass manager).
  • -fpatchable-function-entry=<N,M> โ€” generate M NOPs before function entry and N-M NOPs after function entry.
  • -fpcc-struct-return โ€” override the default ABI to return all structs on the stack.
  • -fpch-codegen โ€” generate code for uses of this PCH that assumes an explicit object file will be built for the PCH.
  • -fpch-debuginfo โ€” generate debug info for types in an object file built from this PCH and do not generate them elsewhere.
  • -fpch-instantiate-templates โ€” instantiate templates already while building a PCH.
  • -fpch-validate-input-files-content โ€” validate PCH input files based on content if mtime differs.
  • -fplugin-arg-<name>-<arg> โ€” pass <arg> to plugin <name>.
  • -fplugin=<dsopath> โ€” load the named plugin (dynamic shared object).
  • -fprebuilt-implicit-modules โ€” look up implicit modules in the prebuilt module path.
  • -fprebuilt-module-path=<directory> โ€” specify the prebuilt module path.
  • -fpreview-breaking-changes โ€” when specified, it informs the compiler driver and compilation phases that it is allowed to break backward compatibility. when this option is specified the compiler will also set the macro __INTEL_PREVIEW_BREAKING_CHANGES. when this option is used in conjunction with -fsycl, the driver will link against an alternate form of libsycl, libsycl-preview. ๐Ÿ’… iconic behavior honestly
  • -fproc-stat-report=<value> โ€” save subprocess statistics to the given file.
  • -fproc-stat-report<value> โ€” print subprocess statistics. (yes, no = โ€” the lack of equals is the whole point ๐Ÿ“)
  • -fprofile-arcs โ€” instrument code to produce gcov data files (*.gcda).
  • -fprofile-exclude-files=<value> โ€” instrument only functions from files where names don't match all the regexes separated by a semi-colon.
  • -fprofile-filter-files=<value> โ€” instrument only functions from files where names match any regex separated by a semi-colon.
  • -fprofile-function-groups=<N> โ€” partition functions into N groups and select only functions in group i to be instrumented using -fprofile-selected-function-group.
  • -fprofile-generate-cold-function-coverage=<directory> โ€” generate instrumented code to collect coverage info for cold functions into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var).
  • -fprofile-generate-cold-function-coverage โ€” generate instrumented code to collect coverage info for cold functions into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var).
  • -fprofile-generate=<directory> โ€” generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var).
  • -fprofile-generate โ€” generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var).
  • -fprofile-instr-generate=<file> โ€” generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var).
  • -fprofile-instr-generate โ€” generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var).
  • -fprofile-instr-use=<value> โ€” use instrumentation data for profile-guided optimization.
  • -fprofile-list=<value> โ€” filename defining the list of functions/files to instrument. the file uses the sanitizer special case list format.
  • -fprofile-remapping-file=<file> โ€” use the remappings described in <file> to match the profile data against names in the program.
  • -fprofile-sample-accurate โ€” specifies that the sample profile is accurate.
  • -fprofile-sample-use=<value> โ€” enable sample-based profile guided optimizations.
  • -fprofile-selected-function-group=<i> โ€” partition functions into N groups using -fprofile-function-groups and select only functions in group i to be instrumented. the valid range is 0 to N-1 inclusive.
  • -fprofile-update=<method> โ€” set update method of profile counters.
  • -fprofile-use=<pathname> โ€” use instrumentation data for profile-guided optimization. if pathname is a directory, it reads from <pathname>/default.profdata. otherwise, it reads from file <pathname>.
  • -fprotect-parens โ€” determines whether the optimizer honors parentheses when floating-point expressions are evaluated. respect the parentheses bestie ๐Ÿซถ
  • -fpseudo-probe-for-profiling โ€” drops pseudo probes so you can do sample profiling โœจ
  • -fptrauth-auth-traps โ€” turns on traps whenever authentication fails (so, yk, when the auth check goes ๐Ÿ’€)
  • -fptrauth-calls โ€” signs AND authenticates literally every indirect call, no cap
  • -fptrauth-elf-got โ€” authenticates pointers that come from the GOT (ELF only bestie, not a universal thing)
  • -fptrauth-function-pointer-type-discrimination โ€” turns on type discrimination for C function pointers
  • -fptrauth-indirect-gotos โ€” signs and authenticates indirect goto targets ๐ŸŽฏ
  • -fptrauth-init-fini-address-discrimination โ€” turns on address discrimination of function pointers in init/fini arrays
  • -fptrauth-init-fini โ€” signs the function pointers in init/fini arrays
  • -fptrauth-intrinsics โ€” turns on pointer authentication intrinsics
  • -fptrauth-returns โ€” signs and authenticates return addresses, the classic ๐Ÿซถ
  • -fptrauth-type-info-vtable-pointer-discrimination โ€” turns on type and address discrimination of the vtable pointer of std::type_info
  • -fptrauth-vtable-pointer-address-discrimination โ€” turns on address discrimination of vtable pointers
  • -fptrauth-vtable-pointer-type-discrimination โ€” turns on 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 be reassociated
  • -freg-struct-return โ€” overrides the default ABI so small structs get returned in registers
  • -fregister-global-dtors-with-atexit โ€” uses atexit or __cxa_atexit to register global destructors
  • -fropi โ€” generates read-only position independent code (ARM only, so ARM girlies only ๐Ÿ’…)
  • -frtlib-add-rpath โ€” adds -rpath with the architecture-specific resource directory to the linker flags. And when --hip-link is specified, it also adds -rpath with the HIP runtime library directory to the linker flags
  • -frtlib-defaultlib โ€” on Windows, emits /defaultlib: directives to link compiler-rt libraries (this is the default btw)
  • -frwpi โ€” generates read-write position independent code (again, ARM only)
  • -fsafe-buffer-usage-suggestions โ€” shows suggestions for updating your code that's associated with -Wunsafe-buffer-usage warnings, so helpful ๐Ÿฅน
  • -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 via dlclose())
  • -fsanitize-address-field-padding=<value> โ€” sets the level of field padding for AddressSanitizer
  • -fsanitize-address-globals-dead-stripping โ€” turns on linker dead stripping of globals in AddressSanitizer
  • -fsanitize-address-outline-instrumentation โ€” always generates function calls for address sanitizer instrumentation
  • -fsanitize-address-poison-custom-array-cookie โ€” turns on poisoning of array cookies when using custom operator new[] in AddressSanitizer
  • -fsanitize-address-use-after-return=<mode> โ€” picks the mode for detecting stack use-after-return in AddressSanitizer
  • -fsanitize-address-use-after-scope โ€” turns on use-after-scope detection in AddressSanitizer
  • -fsanitize-address-use-odr-indicator โ€” turns on ODR indicator globals so you avoid false ODR violation reports in partially sanitized programs โ€” the tradeoff is that your binary gets bigger, jsyk
  • -fsanitize-cfi-canonical-jump-tables โ€” makes the jump table addresses canonical in the symbol table
  • -fsanitize-cfi-cross-dso โ€” turns on control flow integrity (CFI) checks for cross-DSO calls
  • -fsanitize-cfi-icall-experimental-normalize-integers โ€” normalizes integers in CFI indirect call type signature checks
  • -fsanitize-cfi-icall-generalize-pointers โ€” generalizes pointers in CFI indirect call type signature checks
  • -fsanitize-coverage-allowlist=<value> โ€” restricts sanitizer coverage instrumentation exclusively to modules and functions matching the given special case list โ€” except the blocked ones, those stay blocked ๐Ÿ™…โ€โ™€๏ธ
  • -fsanitize-coverage-ignorelist=<value> โ€” disables sanitizer coverage instrumentation for modules and functions matching the given special case list, even the allowed ones
  • -fsanitize-coverage=<value> โ€” specifies the type of coverage instrumentation for Sanitizers
  • -fsanitize-hwaddress-abi=<value> โ€” picks the HWAddressSanitizer ABI to target (interceptor or platform, default is interceptor). Heads up: this option is currently unused ๐Ÿ˜ญ
  • -fsanitize-hwaddress-experimental-aliasing โ€” turns on aliasing mode in HWAddressSanitizer
  • -fsanitize-ignorelist=<value> โ€” the path to the ignorelist file for sanitizers
  • -fsanitize-memory-param-retval โ€” turns on detection of uninitialized parameters and return values
  • -fsanitize-memory-track-origins=<value> โ€” turns on origins tracking in MemorySanitizer
  • -fsanitize-memory-track-origins โ€” turns on origins tracking in MemorySanitizer (yeah, same energy as the one above, just no <value>)
  • -fsanitize-memory-use-after-dtor โ€” turns on 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 the sanitizers
  • -fsanitize-recover=<value> โ€” turns on recovery for the sanitizers you specify
  • -fsanitize-skip-hot-cutoff=<value> โ€” excludes sanitization for the top hottest code responsible for a given fraction of PGO counters (0.0 [default] = skip none; 1.0 = skip all). Argument format: <sanitizer1>=<value1>,<sanitizer2>=<value2>,...
  • -fsanitize-stable-abi โ€” stable ABI instrumentation for the sanitizer runtime. Default: Conventional
  • -fsanitize-stats โ€” turns on sanitizer statistics gathering ๐Ÿ“Š
  • -fsanitize-system-ignorelist=<value> โ€” the path to the system ignorelist file for sanitizers
  • -fsanitize-thread-atomics โ€” turns on atomic operations instrumentation in ThreadSanitizer (default btw)
  • -fsanitize-thread-func-entry-exit โ€” turns on function entry/exit instrumentation in ThreadSanitizer (also default)
  • -fsanitize-thread-memory-access โ€” turns on memory access instrumentation in ThreadSanitizer (default again, they're all default bestie ๐Ÿ’–)
  • -fsanitize-trap=<value> โ€” turns on trapping for the sanitizers you specify
  • -fsanitize-trap โ€” turns on trapping for all the 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 keeps only, if negative) a given number of path components when emitting check metadata
  • -fsanitize=<check> โ€” turns on runtime checks for various forms of undefined or suspicious behavior. Go read the user manual for the available checks, ok? ๐Ÿ‘‘
  • -fsave-optimization-record=<format> โ€” generates an optimization record file in a specific format
  • -fsave-optimization-record โ€” generates a YAML optimization record file
  • -fseh-exceptions โ€” uses SEH style exceptions
  • -fseparate-named-sections โ€” uses separate unique sections for named sections (ELF Only)
  • -fshort-enums โ€” allocates to an enum type only as many bytes as it needs for the declared range of possible values, efficient queen ๐Ÿ’…
  • -fshort-wchar โ€” forces wchar_t to 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 -H output
  • -fsigned-char โ€” makes char signed
  • -fsized-deallocation โ€” turns on C++14 sized global deallocation functions
  • -fsjlj-exceptions โ€” uses SjLj style exceptions
  • -fskip-odr-check-in-gmf โ€” skips ODR checks for decls in the global module fragment
  • -fslp-vectorize โ€” turns on 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 so you can still do online symbolication/stack traces when .dwo/.dwp files aren't there while using Split DWARF
  • -fsplit-lto-unit โ€” enables splitting of the LTO unit
  • -fsplit-machine-functions โ€” turns on late function splitting using profile information (x86 and aarch64 ELF)
  • -fsplit-stack โ€” uses segmented stack
  • -fstack-clash-protection โ€” turns on stack clash protection ๐Ÿ›ก๏ธ
  • -fstack-protector-all โ€” turns on stack protectors for ALL functions
  • -fstack-protector-strong โ€” turns on stack protectors for some functions that are 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 to alloca or the taking of an address from a local variable
  • -fstack-protector โ€” turns on stack protectors for some functions vulnerable to stack smashing. This one uses a loose heuristic: it considers functions vulnerable if they contain a char (or 8bit integer) array or constant sized calls to alloca, which are bigger than ssp-buffer-size (default: 8 bytes). All variable sized calls to alloca count as vulnerable. A function with a stack protector gets a guard value added to its stack frame that's checked on function exit. The guard value has to sit in the stack frame such that a buffer overflow from a vulnerable variable will overwrite the guard value before it overwrites the function's return address. The reference stack guard value lives in a global variable.
  • -fstack-size-section โ€” emits a section containing metadata on function stack sizes
  • -fstack-usage โ€” emits a .su file containing info on function stack sizes
  • -fstandalone-debug โ€” emits full debug info for every type the program uses
  • -fstrict-aliasing โ€” turns on optimizations based on strict aliasing rules
  • -fstrict-enums โ€” turns on optimizations based on the strict definition of an enum's value range
  • -fstrict-flex-arrays=<n> โ€” turns on optimizations that lean on the strict definition of flexible arrays. slay, but only if ur code actually plays by the rules bestie ๐Ÿ’…
  • -fstrict-float-cast-overflow โ€” assume that a float-to-int cast that overflows is undefined behaviour. this one's the default, so it's already on unless u say otherwise ๐Ÿซถ
  • -fstrict-vtable-pointers โ€” enables optimizations based on the strict rules for overwriting polymorphic C++ objects. C++ girlies stay winning โœจ
  • -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 the default values specified by specialization_id. if a device image doesn't use a specialization constant at all, then no copy gets generated, periodt. this option is only useful when used in conjunction with Ahead of Time Compilation (the -fsycl-target command line option) ๐Ÿ‘‘
  • -fsycl-allow-device-dependencies โ€” deprecated, bestie: please use -fsycl-allow-device-image-dependencies instead ๐Ÿ’€
  • -fsycl-allow-device-image-dependencies โ€” allow dependencies between device code images ๐Ÿ”—
  • -fsycl-dead-args-optimization โ€” enables elimination of DPC++ dead kernel arguments. dead weight? gone. not me clearing out the args ๐Ÿ˜ญ
  • -fsycl-decompose-functor โ€” do decompose the 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 away from SYCL into a separate device binary image (default). has effect only for SPIR-based targets. (experimental) โœ‚๏ธ
  • -fsycl-device-code-split=<value> โ€” perform SYCL device code split. the values r:
    • per_kernel โ€” a device code module is created for each SYCL kernel
    • per_source โ€” a device code module is created for each source (translation unit)
    • off โ€” no device code split
    • auto โ€” use a heuristic to select the best way of splitting device code

default is 'auto' โ€” use a heuristic to distribute device code across modules ๐ŸŽ€

  • -fsycl-device-code-split โ€” perform SYCL device code split in the 'auto' mode, i.e. use a 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 are libc, libm-fp32, libm-fp64, libimf-fp32, libimf-fp64, libimf-bf16, all ๐Ÿ“š
  • -fsycl-device-obj=<value> โ€” specify the 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: please use -fsycl-range-rounding=disable instead ๐Ÿ™ˆ
  • -fsycl-dump-device-code=<value> โ€” dump device code into the user provided directory ๐Ÿ“‚
  • -fsycl-early-optimizations โ€” enable standard optimization pipeline for the SYCL device compiler โšก
  • -fsycl-embed-ir โ€” embed LLVM IR for runtime kernel fusion ๐Ÿ”ฅ
  • -fsycl-esimd-force-stateless-mem โ€” enforce using stateless memory accesses. converts 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 the 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 kernel lambda in the 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 an 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-compiler specified, use the given options during that compile. options are expected to be a quoted list of space separated options ๐Ÿ› ๏ธ
  • -fsycl-host-compiler=<value> โ€” specify the C++ compiler binary to perform host compilation with during SYCL offload compiles ๐Ÿงฐ
  • -fsycl-host-only โ€” compile SYCL code for host only. has no effect on non-SYCL compilations ๐Ÿ™…
  • -fsycl-id-queries-fit-in-int โ€” assume that SYCL ID queries fit within MAX_INT ๐Ÿ”ข
  • -fsycl-instrument-device-code โ€” add Instrumentation and Tracing Technology (ITT) instrumentation intrinsics calls (experimental) ๐Ÿ”
  • -fsycl-libspirv-path=<value> โ€” path to the libspirv library ๐Ÿ“
  • -fsycl-link โ€” generate a 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 -O0 to optimize SYCL framework utility functions and leave the 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 unused SYCL_EXTERNAL functions (default) ๐Ÿ—‘๏ธ
  • -fsycl-targets=<value> โ€” specify a comma-separated list of triples of SYCL offloading targets to be supported ๐ŸŽฏ
  • -fsycl-unnamed-lambda โ€” allow unnamed SYCL lambda kernels ๐Ÿ™Š
  • -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. that's it, that's the whole vibe ๐Ÿ‘‘
  • -fsystem-debug โ€” emit debug information for declarations in system headers ๐Ÿ›
  • -fsystem-module โ€” build this module as a system module. only used with -emit-module ๐Ÿ“ฆ
  • -ftarget-compile-fast โ€” experimental feature: reduce target compilation time, with a potential runtime performance trade-off. faster now, maybe sadder later ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ
  • -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). bestie those backtraces can get LONG ๐Ÿ˜ญ
  • -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 the provided function summary index ๐Ÿ“‡
  • -ftime-report=<value> โ€” (for new pass manager) 'per-pass': one report for each pass; 'per-pass-run': one report for each pass invocation โณ
  • -ftime-trace-granularity=<value> โ€” minimum time granularity (in microseconds) traced by the time profiler ๐Ÿ”ฌ
  • -ftime-trace-verbose<value> โ€” make time trace capture verbose event details (e.g. source filenames). this can increase the size of the output by 2-3 times ๐Ÿ˜ณ
  • -ftime-trace=<value> โ€” similar to -ftime-trace. specify the JSON file or a directory which will contain the JSON file ๐Ÿ“„
  • -ftime-trace โ€” turn on the time profiler. generates a JSON file based on the output filename โฑ๏ธโœจ
  • -ftrap-function=<value> โ€” issue a call to the specified function rather than a trap instruction ๐Ÿชค
  • -ftrapv-handler=<function name> โ€” specify the function to be called on overflow ๐Ÿšจ
  • -ftrapv โ€” trap on integer overflow. integer overflow? straight to jail ๐Ÿš”
  • -ftrigraphs โ€” process trigraph sequences ๐ŸŽ€
  • -ftrivial-auto-var-init-max-size=<value> โ€” stop initializing trivial automatic stack variables if the var size exceeds the specified number of instances (in bytes) ๐Ÿ›‘
  • -ftrivial-auto-var-init-stop-after=<value> โ€” stop initializing trivial automatic stack variables after the specified number of instances ๐Ÿ›‘
  • -ftrivial-auto-var-init=<value> โ€” initialize trivial automatic stack variables. defaults to 'uninitialized' ๐Ÿงผ
  • -funified-lto โ€” use the unified LTO pipeline ๐Ÿ”—
  • -funique-basic-block-section-names โ€” use unique names for basic block sections (ELF Only) ๐Ÿท๏ธ
  • -funique-internal-linkage-names โ€” uniqueify Internal Linkage Symbol Names by appending the MD5 hash of the module path ๐Ÿ”
  • -funroll-loops โ€” turn on the loop unroller ๐ŸŒ€
  • -funsafe-math-optimizations โ€” allow unsafe floating-point math optimizations which may decrease precision โš ๏ธ (she's fast but she's not accurate, iykyk)
  • -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 #line in 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 optimization. It requires -flto=full, no exceptions bestie ๐Ÿ’…
  • -fvisibility-dllexport=<value> โ€” sets the visibility for dllexport definitions. If you say Keep, the visibility is not adjusted [-fvisibility-from-dllstorageclass]
  • -fvisibility-externs-dllimport=<value> โ€” the visibility for dllimport external declarations. Say Keep and nothing gets adjusted [-fvisibility-from-dllstorageclass]
  • -fvisibility-externs-nodllstorageclass=<value> โ€” the visibility for external declarations that have no explicit DLL storage class. Again, Keep = hands off [-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 global C++ operator new and delete declarations hidden visibility
  • -fvisibility-global-new-delete=<value> โ€” the visibility for global C++ operator new and delete declarations. If you specify 'source', the visibility is not adjusted
  • -fvisibility-inlines-hidden-static-local-var โ€” when -fvisibility-inlines-hidden is on, static variables inside inline C++ member functions also get hidden visibility by default ๐Ÿซฃ
  • -fvisibility-inlines-hidden โ€” gives inline C++ member functions hidden visibility by default
  • -fvisibility-ms-compat โ€” gives global types 'default' visibility, and global functions + variables 'hidden' visibility, all by default
  • -fvisibility-nodllstorageclass=<value> โ€” the visibility for definitions without an explicit DLL storage class. Keep means the visibility is not adjusted [-fvisibility-from-dllstorageclass]
  • -fvisibility=<value> โ€” sets the default symbol visibility for all global definitions
  • -fwasm-exceptions โ€” use WebAssembly style exceptions ๐Ÿฆ‹
  • -fwhole-program-vtables โ€” enables whole-program vtable optimization. Requires -flto
  • -fwrapv-pointer โ€” treat pointer overflow as two's complement
  • -fwrapv โ€” treat signed integer overflow as two's complement
  • -fwritable-strings โ€” store string literals as writable data โœ๏ธ
  • -fxl-pragma-pack โ€” enable IBM XL #pragma pack handling
  • -fxray-always-emit-customevents โ€” always emit __xray_customevent(...) calls, even if the function containing them 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: filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
  • -fxray-attr-list=<value> โ€” filename defining the list of functions/types for imbuing XRay attributes.
  • -fxray-function-groups=<value> โ€” only instrument 1 of N groups
  • -fxray-ignore-loops โ€” don't instrument functions with loops unless they also meet the minimum function size
  • -fxray-instruction-threshold=<value> โ€” sets the minimum function size to instrument with XRay
  • -fxray-instrumentation-bundle=<value> โ€” select which XRay instrumentation points to emit. The options are all, none, function-entry, function-exit, function, custom. Default is 'all'. And '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-instrument is specified (this is the default)
  • -fxray-modes=<value> โ€” list of modes to link in by default into XRay instrumented binaries.
  • -fxray-never-instrument=<value> โ€” DEPRECATED: filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
  • -fxray-selected-function-group=<value> โ€” when you're using -fxray-function-groups, this picks which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1
  • -fxray-shared โ€” enable shared library instrumentation with XRay
  • -fzero-call-used-regs=<value> โ€” clear call-used registers upon function return (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 in the specified directory. That directory ends with path components like 'lib{,32,64}/gcc{,-cross}/$triple/$version'. โš ๏ธ Note: executables (like ld) used by the compiler are not overridden by the selected GCC installation
  • --gcc-toolchain=<value> โ€” specify a directory where Clang can find 'include' and 'lib{,32,64}/gcc{,-cross}/$triple/$version'. Clang will use the GCC installation with the largest version ๐Ÿ‘‘
  • --gcc-triple=<value> โ€” search for the GCC installation with the specified triple.
  • -gcodeview-command-line โ€” emit compiler path and command line into CodeView debug information
  • -gcodeview-ghash โ€” emit type record hashes in a .debug$H section
  • -gcodeview โ€” generate CodeView debug information
  • -gdwarf-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 DWARF32 format for ELF binaries, if debug information emission is enabled.
  • -gdwarf64 โ€” enables 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 source text in DWARF debug sections ๐ŸŒธ
  • -gen-reproducer=<value> โ€” emit reproducer on (option: off, crash (default), error, always)
  • -gline-directives-only โ€” emit debug line info directives only
  • -gline-tables-only โ€” emit debug line number tables only
  • -gmodules โ€” generate debug info with external references to clang modules or precompiled headers
  • -gno-codeview-command-line โ€” don't emit 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.
  • --gpu-bundle-output โ€” bundle output files of HIP device compilation
  • --gpu-instrument-lib=<value> โ€” instrument device library for HIP, which is a LLVM bitcode containing __cyg_profile_func_enter and __cyg_profile_func_exit
  • --gpu-max-threads-per-block=<value> โ€” default max threads per block for kernel launch bounds for HIP
  • -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
  • --help-hidden โ€” display help for hidden options ๐Ÿ™ˆ
  • -help โ€” display available options
  • --hip-device-lib=<value> โ€” HIP device library
  • --hip-link โ€” link clang-offload-bundler bundles for HIP
  • --hip-path=<value> โ€” HIP runtime installation path, used for finding the HIP version and adding the HIP include path.
  • --hip-version=<value> โ€” HIP version in the format of major.minor.patch
  • --hipspv-pass-plugin=<dsopath> โ€” path to a pass plugin for HIP to SPIR-V passes.
  • --hipstdpar-interpose-alloc โ€” replace all memory allocation / deallocation calls with hipManagedMalloc / hipFree equivalents
  • --hipstdpar-path=<value> โ€” HIP Standard Parallel Algorithm Acceleration library path, used for finding and implicitly including the library header
  • --hipstdpar-prim-path=<value> โ€” rocPrim path, required by the HIP Standard Parallel Algorithm Acceleration library, used to implicitly include the rocPrim library
  • --hipstdpar-thrust-path=<value> โ€” rocThrust path, required by the HIP Standard Parallel Algorithm Acceleration library, used to implicitly include the rocThrust library
  • --hipstdpar โ€” enable HIP acceleration for standard parallel algorithms ๐Ÿ”ฅ
  • -H โ€” show header includes and nesting depth
  • -I- โ€” restrict all prior -I flags 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 #include directories even when -nostdinc is used before or after -ibuiltininc. Using -nobuiltininc after 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 precompiled header file
  • -include <file> โ€” include file before parsing
  • -iprefix <dir> โ€” set the -iwithprefix/-iwithprefixbefore prefix
  • -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 include search path with prefix
  • -iwithprefix <dir> โ€” set directory to SYSTEM include search path with prefix
  • -iwithsysroot <directory> โ€” drops directory into the SYSTEM include search path, and heads up bestie: absolute paths get resolved relative to -isysroot ๐Ÿซถ
  • -I <dir> โ€” pops directory onto the end of the include search path list, so it's checked last, no cutting the line ๐Ÿ’…
  • --libomptarget-amdgcn-bc-path=<value> โ€” the path to the libomptarget-amdgcn bitcode library โœจ
  • --libomptarget-amdgpu-bc-path=<value> โ€” path to the libomptarget-amdgcn bitcode library ๐ŸŒธ
  • --libomptarget-nvptx-bc-path=<value> โ€” path to the libomptarget-nvptx bitcode library ๐Ÿฆ‹
  • --libomptarget-spirv-bc-path=<value> โ€” path to the libomptarget-spirv bitcode library โญ
  • -L <dir> โ€” adds directory to the library search path, iconic behaviour honestly ๐Ÿ’–
  • -mabi=quadword-atomics โ€” turns on the quadword atomics ABI on AIX, and this is AIX PPC64 only. It uses lqarx/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. Lowkey important: this access sequence is not used for variables larger than 32KB โš ๏ธ
  • -maix-small-local-exec-tls โ€” same deal but for local-exec TLS variables, faster access sequence, offset from the TLS base encoded as an immediate operand, AIX 64-bit only, and again it is not used for variables larger than 32KB ๐ŸŒˆ
  • -maix-struct-return โ€” returns all structs in memory, PPC32 only ๐Ÿ’œ
  • -malign-branch-boundary=<value> โ€” tells the compiler the size of the boundary to align branches to โœจ
  • -malign-branch=<value> โ€” specifies which types of branches get aligned ๐ŸŽ€
  • -malign-double โ€” aligns doubles to two words inside structs, x86 only ๐Ÿ“
  • -maltivec โ€” enables the 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: 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 the list of available architectures for the target, use '-mcpu=help' ๐Ÿ”
  • -marm64x<value> โ€” links as a hybrid ARM64X image ๐ŸŒธ
  • -mbackchain โ€” links stack frames through 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> โ€” selects the label scheme for branch control-flow architecture protection ๐Ÿ”ฅ
  • -mcmse โ€” allow use of CMSE (Armv8-M Security Extensions) ๐Ÿงš
  • -mcode-object-version=<value> โ€” specifies the code object ABI version. Defaults to 5. AMDGPU only ๐Ÿ’–
  • -mconstructor-aliases โ€” enables emitting complete constructors and destructors as aliases when possible ๐Ÿ‘‘
  • -mcpu=<value> โ€” for the list of 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, as well as for all other CPUs when optimization is applied (-O2 and above) ๐Ÿ’ซ
  • -mcrc โ€” allow use of CRC instructions, ARM/Mips only ๐ŸŒˆ
  • -mcumode โ€” specifies 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 โ€” use div.w[u] and mod.w[u] instructions with input that is not sign-extended ๐Ÿ’…
  • -mdouble=<n โ€” forces double to be <n> bits (yep, the flag really is written like that, no cap) ๐Ÿ“
  • -MD โ€” writes a depfile containing user and system headers โœจ
  • -meabi <value> โ€” sets the EABI type. The default depends on the triple ๐Ÿฆ‹
  • -membedded-data โ€” places constants in the .rodata section instead of the .sdata section, even if they meet the -G <size> threshold, MIPS ๐Ÿ’œ
  • -menable-experimental-extensions โ€” enables use of experimental RISC-V extensions ๐Ÿงช
  • -mexec-model=<value> โ€” the 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 โ€” enables frecipe.{s/d} and frsqrte.{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 -M to <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> โ€” enables or disables 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 one of: 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 the Hexagon Vector Length ๐Ÿ“
  • -mhvx-qfloat โ€” enables Hexagon HVX QFloat instructions โœจ
  • -mhvx=<value> โ€” enables Hexagon Vector eXtensions ๐ŸŒˆ
  • -mhvx โ€” enables Hexagon Vector eXtensions ๐ŸŒˆ
  • -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) emits an object file which can be used with an incremental linker ๐Ÿ”—
  • -mindirect-branch-cs-prefix โ€” adds cs prefix to call and jmp to indirect thunk ๐Ÿ’ซ
  • -mindirect-jump=<value> โ€” changes 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 โ€” enables amswap[_db].{b/h} and amadd[_db].{b/h} โœจ
  • -mlamcas โ€” enables amcas[_db].{b/h/w/d} โœจ
  • -mlasx โ€” enable Loongson Advanced SIMD Extension (LASX) ๐Ÿ‰ (the manpage puts this one on the same line, we're just vibing)
  • -mld-seq-sa โ€” do 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 -G behaviour to object local data, MIPS ๐Ÿ’œ
  • -mlong-calls โ€” generates branches with extended addressability, usually via indirect jumps ๐Ÿฆ˜
  • -mlong-double-128 โ€” forces long double to be 128 bits ๐Ÿ’ช
  • -mlong-double-64 โ€” forces long double to be 64 bits ๐Ÿœ
  • -mlong-double-80 โ€” forces long double to be 80 bits, padded to 128 bits for storage ๐Ÿ“ฆ
  • -mlr-for-calls-only โ€” do not allocate the LR register for general purpose usage, only for calls. AArch64 only ๐Ÿ“ž
  • -mlsx โ€” enable Loongson SIMD Extension (LSX) ๐Ÿ‰ (also a same-line one, keeping it real)
  • -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-operand madd.s, madd.d and related instructions โž•
  • -mmark-bti-property โ€” adds .note.gnu.property with 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 also implies -E and 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 โ€” disable annotate table jump instruction to correlate 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 a setjmp or 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 โ€” specifies 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, this is do not energy: don't use div.w[u] and mod.w[u] instructions with input that isn't sign-extended. ๐Ÿ’…
  • -mno-embedded-data โ€” do not place constants in the .rodata section instead of the .sdata if they meet the -G <size> threshold. (MIPS) ๐Ÿซถ
  • -mno-execute-only โ€” allow generation of data access to code sections. (ARM only) ๐Ÿ‘‘
  • -mno-extern-sdata โ€” do not assume that externally defined data is in the small data if it meets the -G <size> threshold. (MIPS) ๐Ÿ’€
  • -mno-fix-cmse-cve-2021-35465 โ€” don't work around VLLDM erratum CVE-2021-35465. (ARM only) ๐Ÿšซ
  • -mno-fix-cortex-a53-835769 โ€” don't 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. no cap. โœจ
  • -mno-frecipe โ€” disable frecipe.{s/d} and frsqrte.{s/d}. ๐Ÿ”ฅ
  • -mno-gather โ€” disable generation of gather instructions in auto-vectorization. (x86 only) ๐Ÿงš
  • -mno-global-merge โ€” disable merging of globals. ๐Ÿ’…
  • -mno-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 โ€” disable amswap[_db].{b/h} and amadd[_db].{b/h}. ๐Ÿ”’
  • -mno-lamcas โ€” disable amcas[_db].{b/h/w/d}. ๐Ÿ”’
  • -mno-lasx โ€” disable Loongson Advanced SIMD Extension (LASX). ๐Ÿ’…
  • -mno-ld-seq-sa โ€” generate load-load barrier instructions (dbar 0x700). ๐Ÿ›ก๏ธ
  • -mno-local-sdata โ€” do not extend the -G behaviour 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-operand madd.s, madd.d and related instructions. ๐Ÿ”ฅ
  • -mno-memops โ€” disable generation of memop instructions. ๐Ÿ’…
  • -mno-movt โ€” disallow use of movt/movw pairs. (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 โ€” disable sc.q instruction. ๐Ÿšซ
  • -mno-seses โ€” disable speculative execution side effect suppression (SESES). ๐Ÿ›ก๏ธ๐Ÿšซ
  • -mno-stack-arg-probe โ€” disable stack probes which are enabled by default. ๐Ÿšซ
  • -mno-strict-align โ€” allow memory accesses to be unaligned. (AArch64/LoongArch/RISC-V only) ๐ŸŒ€
  • -mno-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 โ€” generate mcount/__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_loc section entry for each __fentry__ call. ๐Ÿ“
  • -mregnames โ€” use full register names when writing assembly output. ๐Ÿ”ค
  • -mrelax-all โ€” (integrated-as) relax all machine instructions. ๐Ÿ˜Œ
  • -mrelax โ€” enable linker relaxation. โœ…
  • -mrestrict-it โ€” disallow generation of complex IT blocks. It is off by default. ๐Ÿšซ
  • -mrtd โ€” make StdCall calling convention the default. ๐Ÿ“ž
  • -mrvv-vector-bits=<value> โ€” specify the size in bits of an RVV vector register. ๐Ÿ“
  • -msave-reg-params โ€” save arguments passed by registers to ABI-defined stack positions. ๐Ÿ’พ
  • -msave-restore โ€” enable using library calls for save and restore. โœ…
  • -mscalar-strict-align โ€” force all scalar memory accesses to be aligned. (RISC-V only) ๐Ÿ“
  • -mscq โ€” enable sc.q instruction. โœ…
  • -mseses โ€” enable speculative execution side effect suppression (SESES). Includes LVI control flow integrity mitigations. ๐Ÿ›ก๏ธ
  • -msign-return-address=<value> โ€” select return address signing scope. โœ๏ธ
  • -msimd=<value> โ€” select the SIMD extension(s) to be enabled in LoongArch either 'none', 'lsx', 'lasx'. ๐ŸŽ›๏ธ
  • -mskip-rax-setup โ€” skip setting up RAX register when passing variable arguments. (x86 only) ๐Ÿšซ
  • -msmall-data-limit=<value> โ€” put global and static data smaller than the limit into a special section. ๐Ÿ“ฆ
  • -msoft-float โ€” use software floating point. ๐Ÿ’ป
  • -msse2avx โ€” specify that the assembler should encode SSE instructions with VEX prefix. ๐Ÿงฌ
  • -mstack-alignment=<value> โ€” set the stack alignment. ๐Ÿ“
  • -mstack-arg-probe โ€” enable stack probes. โœ…
  • -mstack-probe-size=<value> โ€” set the stack probe size. ๐Ÿ“
  • -mstack-protector-guard-offset=<value> โ€” use the given offset for addressing the stack-protector guard. ๐Ÿ“
  • -mstack-protector-guard-reg=<value> โ€” use the given reg for addressing the stack-protector guard. ๐Ÿ“
  • -mstack-protector-guard-symbol=<value> โ€” use the given symbol for addressing the stack-protector guard. ๐Ÿ“
  • -mstack-protector-guard=<value> โ€” use the given guard (global, tls) for addressing the stack-protector guard. ๐Ÿ“
  • -mstackrealign โ€” force realign the stack at entry to every function. ๐Ÿ“
  • -mstrict-align โ€” force all memory accesses to be aligned. (AArch64/LoongArch/RISC-V only) ๐Ÿ“
  • -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). ๐Ÿ“
  • -mtocdata=<value> โ€” bestie, you hand over a list of variables and the TOC data transformation gets applied to exactly those. slay ๐Ÿ’…
  • -mtocdata โ€” no value? then every suitable variable gets the TOC data transformation. all of them โœจ
  • -mtp=<value> โ€” thread pointer access method, okay? For AArch32: 'soft' uses a function call, or 'tpidrurw', 'tpidruro' or 'tpidrprw' use the three CP15 registers. 'cp15' is an alias for 'tpidruro'. For AArch64: 'tpidr_el0', 'tpidr_el1', 'tpidr_el2', 'tpidr_el3' or 'tpidrro_el0' use the five system registers. 'elN' is an alias for 'tpidr_elN'. so many options, iykyk ๐Ÿฆ‹
  • -mtune=<value> โ€” only supported on AArch64, PowerPC, RISC-V, SPARC, SystemZ, and X86. not everywhere, bestie โš ๏ธ
  • -MT <value> โ€” specify name of main file output in depfile. depfile stuff ๐Ÿ“
  • -multi-lib-config=<file> โ€” path to the YAML configuration file to be used for multilib selection. yaml vibes ๐ŸŽ€
  • -munaligned-access โ€” allow memory accesses to be unaligned (AArch32/MIPSr6 only). unaligned, risky but ok ๐Ÿ’€
  • -munaligned-symbols โ€” expect external char-aligned symbols to be without ABI alignment (SystemZ only). systemz things ๐Ÿงš
  • -munsafe-fp-atomics โ€” enable generation of unsafe floating point atomic instructions. May generate more efficient code, but may not respect rounding and denormal modes, and may give incorrect results for certain memory destinations. (AMDGPU only) unsafe, but fast? careful bestie ๐Ÿ˜ญ
  • -mv8plus โ€” enable V8+ mode, allowing use of 64-bit V9 instructions in 32-bit code. v8+ mode, slay ๐Ÿ”ฅ
  • -mvector-strict-align โ€” force all vector memory accesses to be aligned (RISC-V only). alignment enforcement ๐Ÿ’…
  • -mvevpu โ€” emit VPU instructions for VE. ve vpu things ๐Ÿฆ‹
  • -MV โ€” use NMake/Jom format for the depfile. nmake/jom format ๐Ÿ“
  • -mwavefrontsize64 โ€” specify wavefront size 64 mode (AMDGPU only). wavefront 64 ๐ŸŒŠ
  • -mxcoff-build-id=<0xHEXSTRING> โ€” on AIX, request creation of a build-id string, "0xHEXSTRING", in the string table of the loader section inside the linked binary. aix build id ๐ŸŽ€
  • -mxcoff-roptr โ€” place constant objects with relocatable address values in the RO data section and add -bforceimprw to the linker flags (AIX only). ro data + linker flags ๐Ÿ’€
  • -mzos-hlq-clang=<ClangHLQ> โ€” high level qualifier for z/OS C++RT side deck datasets. z/os stuff ๐Ÿงš
  • -mzos-hlq-csslib=<CsslibHLQ> โ€” high level qualifier for z/OS CSSLIB dataset. csslib hlq ๐ŸŒธ
  • -mzos-hlq-le=<LeHLQ> โ€” high level qualifier for z/OS Language Environment datasets. le hlq ๐Ÿ’…
  • -mzos-sys-include=<SysInclude> โ€” path to system headers on z/OS. z/os headers ๐Ÿฆ‹
  • -M โ€” like -MD, but also implies -E and writes to stdout by default. like -MD but extra โœจ
  • --no-cuda-include-ptx=<value> โ€” do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once. no ptx for that arch ๐Ÿšซ
  • --no-cuda-version-check โ€” don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture. no version check, yolo ๐Ÿ™ˆ
  • --no-default-config โ€” disable loading default configuration files. no default config ๐Ÿ’€
  • --no-gpu-bundle-output โ€” do not bundle output files of HIP device compilation. no bundle ๐Ÿงš
  • -no-hip-rt โ€” do not link against HIP runtime libraries. no hip runtime ๐ŸŒธ
  • --no-offload-arch=<value> โ€” remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. 'all' resets the list to its default value. remove offload arch ๐Ÿ’…
  • --no-offload-new-driver โ€” don't use the new driver for offloading compilation. old driver, ok ๐Ÿฆ‹
  • --no-system-header-prefix=<prefix> โ€” treat all #include paths starting with <prefix> as not including a system header. not a system header ๐Ÿšซ
  • --no-wasm-opt โ€” disable the wasm-opt optimizer. no wasm opt ๐Ÿ’€
  • -nobuiltininc โ€” disable builtin #include directories only. no builtin includes ๐ŸŽ€
  • -nogpuinc โ€” do not add include paths for CUDA/HIP and do not include the default CUDA/HIP wrapper headers. no gpu includes ๐Ÿšซ
  • -nogpulib โ€” do not link device library for CUDA/HIP device compilation. no gpu lib ๐Ÿงš
  • -nohipwrapperinc โ€” do not include the default HIP wrapper headers and include paths. no hip wrapper ๐ŸŒธ
  • -nolibsycl โ€” do not link SYCL runtime library. no sycl lib ๐Ÿ’…
  • -nostdinc++ โ€” disable standard #include directories for the C++ standard library. no c++ std includes ๐Ÿฆ‹
  • -nostdinc โ€” disable both standard system #include directories and builtin #include directories. no std includes at all ๐Ÿ’€
  • -nostdlibinc โ€” disable standard system #include directories only. no system std includes ๐ŸŽ€
  • --nvptx-arch-tool=<value> โ€” tool used for detecting NVIDIA GPU arch in the system. nvptx arch tool ๐Ÿงš
  • -ObjC++ โ€” treat source input files as Objective-C++ inputs. objc++ mode ๐Ÿ”ฅ
  • -ObjC โ€” treat source input files as Objective-C inputs. objc mode ๐ŸŒธ
  • -object-file-name=<file> โ€” set the output <file> for debug infos. object file name ๐Ÿ“
  • -Ofast<value> โ€” deprecated; use '-O3 -ffast-math' for the same behavior, or '-O3' to enable only conforming optimizations. deprecated, bestie, use -O3 instead โš ๏ธ
  • --offload-arch=<value> โ€” specify an offloading device architecture for CUDA, HIP, or OpenMP. (e.g. sm_35). If 'native' is used the compiler will detect locally installed architectures. For HIP offloading, the device architecture can be followed by target ID features delimited by a colon (e.g. gfx908:xnack+:sramecc-). May be specified more than once. offload arch, so many options ๐Ÿฆ‹
  • --offload-compress โ€” compress offload device binaries (HIP only). compress offload ๐Ÿ—œ๏ธ
  • --offload-device-only โ€” only compile for the offloading device. device only ๐Ÿ’…
  • --offload-host-device โ€” compile for both the offloading host and device (default). host and device, default โœจ
  • --offload-host-only โ€” only compile for the offloading host. host only ๐Ÿšซ
  • --offload-link โ€” use the new offloading linker to perform the link job. new offload linker ๐Ÿ”—
  • --offload-new-driver โ€” use the new driver for offloading compilation. new offload driver ๐Ÿ”ฅ
  • --offload=<value> โ€” specify comma-separated list of offloading target triples (CUDA and HIP only). offload target triples ๐ŸŽ€
  • -o <file> โ€” write output to <file>. output file ๐Ÿ“
  • -pedantic โ€” warn on language extensions. pedantic mode, warning you โš ๏ธ
  • -pg โ€” enable mcount instrumentation. mcount instrumentation ๐Ÿ“Š
  • -pipe โ€” use pipes between commands, when possible. pipes between commands ๐Ÿšฐ
  • --precompile โ€” only precompile the input. precompile only ๐Ÿ’…
  • --pretty-sgf โ€” emit pretty printed symbol graphs. pretty symbol graphs ๐ŸŒธ
  • -print-diagnostic-options โ€” print all of Clang's warning options. print warning options ๐Ÿ“‹
  • -print-effective-triple โ€” print the effective target triple. effective triple ๐ŸŽฏ
  • -print-enabled-extensions โ€” print the extensions enabled by the given target and -march/-mcpu options. (AArch64 and RISC-V only) enabled extensions ๐Ÿฆ‹
  • -print-file-name=<file> โ€” print the full library path of <file>. full library path ๐Ÿ“š
  • -print-ivar-layout โ€” enable Objective-C Ivar layout bitmap print trace. ivar layout trace ๐Ÿ”
  • -print-libgcc-file-name โ€” print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang_rt.builtins.*.a"). libgcc path ๐Ÿ—๏ธ
  • -print-library-module-manifest-path โ€” print the path for the C++ Standard library module manifest. module manifest path ๐Ÿ“„
  • -print-multi-flags-experimental โ€” print the flags used for selecting multilibs (experimental). multilib flags, experimental ๐Ÿงช
  • -print-prog-name=<name> โ€” print the full program path of <name>. program path ๐Ÿ› ๏ธ
  • -print-resource-dir โ€” print the resource directory pathname. resource dir ๐Ÿ“
  • -print-rocm-search-dirs โ€” print the paths used for finding ROCm installation. rocm search dirs ๐Ÿงญ
  • -print-runtime-dir โ€” print the directory pathname containing Clang's runtime libraries. runtime dir ๐Ÿ“‚
  • -print-search-dirs โ€” print the paths used for finding libraries and programs. search dirs ๐Ÿ”
  • -print-supported-cpus โ€” print supported cpu models for the given target (if target is not specified, it will print the supported cpus for the default target). supported cpus ๐Ÿ–ฅ๏ธ
  • -print-supported-extensions โ€” print supported -march extensions (RISC-V, AArch64 and ARM only). supported extensions ๐ŸŒŸ
  • -print-target-triple โ€” print the normalized target triple. target triple ๐ŸŽฏ
  • -print-targets โ€” print the registered targets. registered targets ๐Ÿ“‹
  • -pthread โ€” support POSIX threads in generated code. posix threads ๐Ÿงต
  • --ptxas-path=<value> โ€” path to ptxas (used for compiling CUDA code). ptxas path ๐Ÿ›ฃ๏ธ
  • -P โ€” disable linemarker output in -E mode. no linemarkers ๐Ÿšซ
  • -p โ€” enable mcount instrumentation with prof. mcount with prof ๐Ÿ“Š
  • -Qn โ€” do not emit metadata containing compiler name and version. no compiler metadata ๐Ÿšซ
  • -Qunused-arguments โ€” don't emit warning for unused driver arguments. no warning for unused args ๐Ÿ™Š
  • -Qy โ€” emit metadata containing compiler name and version. compiler metadata ๐Ÿ“
  • -regcall4 โ€” set __regcall4 as a default calling convention to respect __regcall ABI v.4. regcall4 convention ๐Ÿ“ž
  • -relocatable-pch โ€” whether to build a relocatable precompiled header. relocatable pch ๐Ÿ“ฆ
  • -rewrite-legacy-objc โ€” rewrite Legacy Objective-C source to C++. legacy objc to c++ ๐Ÿ”„
  • -rewrite-objc โ€” rewrite Objective-C source to C++. objc to c++ ๐Ÿ”„
  • --rocm-device-lib-path=<value> โ€” ROCm device library path. Alternative to rocm-path. rocm device lib path ๐Ÿ—๏ธ
  • --rocm-path=<value> โ€” ROCm installation path, used for finding and automatically linking required bitcode libraries. rocm path ๐Ÿงญ
  • -Rpass-analysis=<value> โ€” report transformation analysis from optimization passes whose name matches the given POSIX regular expression. report analysis ๐Ÿ”
  • -Rpass-missed=<value> โ€” report missed transformations by optimization passes whose name matches the given POSIX regular expression. report missed ๐Ÿšซ
  • -Rpass=<value> โ€” report transformations performed by optimization passes whose name matches the given POSIX regular expression. report transformations โœจ
  • -rtlib=<value> โ€” compiler runtime library to use. runtime library ๐Ÿ“š
  • -R<remark> โ€” enable the specified remark. enable remark ๐Ÿ’ฌ
  • -save-stats=<value> โ€” save llvm statistics. save stats ๐Ÿ“Š
  • -save-stats โ€” save llvm statistics. save stats ๐Ÿ“Š
  • -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 ๐Ÿ—‚๏ธ
  • -save-temps โ€” alias for --save-temps=cwd. alias for --save-temps=cwd ๐Ÿ”„
  • -serialize-diagnostics <value> โ€” serialize compiler diagnostics to a file. serialize diagnostics ๐Ÿ“„
  • -shared-libsan โ€” dynamically link the sanitizer runtime. dynamic sanitizer ๐Ÿ”—
  • --start-no-unused-arguments โ€” don't emit warnings about unused arguments for the following arguments. no unused arg warnings ๐Ÿ™Š
  • -static-libsan โ€” statically link the sanitizer runtime (Not supported for ASan, TSan or UBSan on darwin). static sanitizer, not on darwin ๐Ÿšซ
  • -static-openmp โ€” use the static host OpenMP runtime while linking. static openmp ๐Ÿ”—
  • -std=<value> โ€” language standard to compile for. language standard ๐Ÿ“
  • -stdlib++-isystem <directory> โ€” use directory as the C++ standard library include path. c++ stdlib include path ๐Ÿ“
  • -stdlib=<value> โ€” C++ standard library to use. c++ stdlib ๐Ÿ“š
  • -sycl-std=<value> โ€” SYCL language standard to compile for. sycl std ๐Ÿงช
  • --symbol-graph-dir=<value> โ€” directory in which to emit symbol graphs. symbol graph dir ๐Ÿ“
  • --system-header-prefix=<prefix> โ€” treat all #include paths starting with <prefix> as including a system header. system header prefix ๐Ÿ“‚
  • -S โ€” only run preprocess and compilation steps. only preprocess and compile ๐Ÿ›‘
  • --target=<value> โ€” generate code for the given target. target ๐ŸŽฏ
  • -time โ€” time individual commands. time commands โฑ๏ธ
  • -traditional-cpp โ€” enable some traditional CPP emulation. traditional cpp ๐Ÿ•ฐ๏ธ
  • -trigraphs โ€” process trigraph sequences. yes bestie, those three-character sequences are getting processed ๐Ÿ’…
  • -T <script> โ€” specify <script> as linker script. it's giving "here's the map, linker" ๐Ÿ—บ๏ธ
  • -undef โ€” undef all system defines. literally all of them, no cap ๐Ÿ™ˆ
  • -unwindlib=<value> โ€” unwind library to use. pick your unwind vibe โœจ
  • -U <macro> โ€” undefine macro <macro>. bye bye macro ๐Ÿ’–
  • --verify-debug-info โ€” verify the binary representation of debug output. double-check that debug glow-up ๐Ÿ”
  • -verify-pch โ€” load and verify that a pre-compiled header file is not stale. not me checking if your PCH is expired ๐Ÿ’€
  • --version โ€” print version information. the classic "who am I" moment ๐Ÿ‘‘
  • -vfsoverlay <value> โ€” overlay the virtual filesystem described by file over the real file system, bestie. additionally, pass this overlay file to the linker if it supports it ๐Ÿฆ‹
  • -v โ€” show commands to run and use verbose output. main character energy: tell me everything ๐ŸŽค
  • -Wa,<arg> โ€” pass the comma separated arguments in <arg> to the assembler. assembler gets the tea โ˜•
  • --warning-suppression-mappings=<value> โ€” file containing diagnostic suppression mappings. see user manual for file format, iykyk ๐Ÿ“–
  • --wasm-opt โ€” enable the wasm-opt optimizer (default). it's on by default, periodt โœจ
  • -Wl,<arg> โ€” pass the comma separated arguments in <arg> to the linker. linker says thanks bestie ๐Ÿซถ
  • -working-directory <value> โ€” resolve file paths relative to the specified directory. paths, but make it relative to <value> ๐Ÿ“
  • -Wp,<arg> โ€” pass the comma separated arguments in <arg> to the preprocessor. preprocessor gets the comma-separated gossip ๐Ÿ’…
  • -W<warning> โ€” enable the specified warning. turn on that warning, bestie ๐Ÿšจ
  • -w โ€” suppress all warnings. not a single warning, no cap ๐Ÿคซ
  • -Xanalyzer <arg> โ€” pass <arg> to the static analyzer. analyzer gets the arg ๐Ÿ”
  • -Xarch_device <arg> โ€” pass <arg> to the CUDA/HIP device compilation. device side, slay ๐ŸŽฎ
  • -Xarch_host <arg> โ€” pass <arg> to the CUDA/HIP host compilation. host side, also slay ๐Ÿ’ป
  • -Xassembler <arg> โ€” pass <arg> to the assembler. assembler, here's your arg โœจ
  • -Xclang=<arg> โ€” alias for -Xclang. yes, literally an alias for -Xclang, bestie ๐Ÿ’€
  • -Xclang <arg> โ€” pass <arg> to clang -cc1. clang -cc1, take this arg ๐Ÿ’–
  • -Xcuda-fatbinary <arg> โ€” pass <arg> to fatbinary invocation. fatbinary gets the arg ๐Ÿงš
  • -Xcuda-ptxas <arg> โ€” pass <arg> to the ptxas assembler. ptxas assembler, here you go ๐ŸŽ€
  • -Xlinker <arg> โ€” pass <arg> to the linker. linker arg, periodt ๐Ÿ”—
  • -Xoffload-linker<triple> <arg> โ€” pass <arg> to the offload linkers or the ones identified by -<triple>. offload linkers or the -<triple> ones, got it ๐Ÿฆ‹
  • -Xopenmp-target=<triple> <arg> โ€” pass <arg> to the target offloading toolchain identified by <triple>. ๐Ÿ’…
  • -Xopenmp-target <arg> โ€” pass <arg> to the target offloading toolchain. no triple, just vibes โœจ
  • -Xpreprocessor <arg> โ€” pass <arg> to the preprocessor. preprocessor gets it ๐Ÿง 
  • -Xsycl-target-backend=<triple> <arg> โ€” pass <arg> to the SYCL based backend identified by <triple>. SYCL backend with triple, iconic ๐ŸŒˆ
  • -Xsycl-target-backend <arg> โ€” pass <arg> to the SYCL based target backend. SYCL backend, no triple ๐Ÿ’œ
  • -Xsycl-target-frontend=<triple> <arg> โ€” pass <arg> to the SYCL based target frontend identified by <triple>. frontend with triple ๐ŸŽ€
  • -Xsycl-target-frontend <arg> โ€” pass <arg> to the SYCL based target frontend. frontend, no triple โœจ
  • -Xsycl-target-linker=<triple> <arg> โ€” pass <arg> to the SYCL based target linker identified by <triple>. linker with triple ๐Ÿ”—
  • -Xsycl-target-linker <arg> โ€” pass <arg> to the SYCL based target linker. linker, no triple ๐Ÿ’…
  • -Xs <arg> โ€” pass <arg> to the offline compiler. offline compiler gets it ๐Ÿ–ฅ๏ธ
  • -Xs<arg> โ€” pass <arg> to the offline compiler, adding the option specifier - to the <arg>. note the specifier - gets added to <arg> ๐Ÿ’–
  • -x <language> โ€” treat subsequent input files as having type <language>. language vibe check ๐ŸŒ
  • -z <arg> โ€” pass -z <arg> to the linker. linker gets -z <arg>, periodt ๐Ÿ”—

dxc compatibility options.: ๐ŸŽ€โœจ

  • --dxv-path=<value> โ€” DXIL validator installation path. where the DXIL validator lives ๐Ÿ“
  • -fspv-target-env=<value> โ€” specify the target environment. target env, specify it ๐Ÿ’ซ
  • -hlsl-entry <value> โ€” entry point name for hlsl. HLSL entry point, bestie ๐ŸŽฏ

SEE ALSO ๐ŸŒธ

okay so the full documentation for clang-21 is maintained as a Texinfo manual, fr fr. if the info and clang-21 programs are properly installed at your site, this command:

info clang-21

should give you access to the complete manual. periodt. ๐Ÿ’–


This page is from clang-21 6.2.0-0ubuntu2, dated March 2026. slay, bestie, you made it to the end ๐Ÿซถโœจ

๐Ÿ“ฆ where this page comes from