CLANG-22(1)

๐Ÿ“ฆ version 7.0.1, in ubuntu stonking

๐Ÿ‘‘ clang-22 ๐Ÿ‘‘

okay bestie, welcome to CLANG-22(1) โ€” yes that's the User Commands section, section 1, you're in the right place ๐Ÿ’…. This is the clang LLVM compiler for oneAPI and she is that girl. Buckle up, this page is a whole saga (it comes in 14 parts, we're on part 1, don't you dare skip ahead).


๐ŸŒธ NAME ๐ŸŒธ

clang-22 โ€” clang LLVM compiler for oneAPI โœจ


โœจ DESCRIPTION โœจ

OVERVIEW: clang LLVM compiler ๐Ÿซถ

USAGE:

clang-22 [options] file...

Like, you give her some file...s and some [options] and she does her little compiler thing. iconic.


๐Ÿ’– OPTIONS ๐Ÿ’–

okay so this is the big list, stay with me, we're going through ALL of them, no skipping (iykyk ๐Ÿ˜ญ):

  • -### โ€” Print (but do not run) the commands that would be run for this compilation. It's giving "let me show you my outfit before I leave the house" ๐Ÿ‘€
  • --analyzer-output <value> โ€” the report output format for the static analyzer. Pick your fighter: html, plist, plist-multi-file, plist-html, sarif, sarif-html, or text.
  • --analyze โ€” Run the static analyzer. she's judging your code (lovingly) ๐Ÿ”
  • -B <prefix> โ€” Search $prefix$file for executables, libraries, and data files. If $prefix is a directory, search $prefix/$file instead.
  • -b <arg> โ€” Pass -b <arg> to the linker on AIX.
  • -CC โ€” Include comments from within macros in the preprocessed output. yes comments inside macros, she sees everything ๐Ÿ’…
  • -cl-denorms-are-zero โ€” OpenCL only. Allow denormals to be flushed to zero.
  • -cl-ext=<value> โ€” OpenCL only. Enable or disable OpenCL extensions/optional features. The argument is a comma-separated sequence of one or more extension names, each prefixed by + or -.
  • -cl-fast-relaxed-math โ€” OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__.
  • -cl-finite-math-only โ€” OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
  • -cl-fp32-correctly-rounded-divide-sqrt โ€” OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded. precision queen ๐Ÿ‘‘
  • -cl-kernel-arg-info โ€” OpenCL only. Generate kernel argument metadata.
  • -cl-mad-enable โ€” OpenCL only. Allow use of less precise MAD computations in the generated binary.
  • -cl-no-signed-zeros โ€” OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
  • -cl-no-stdinc โ€” OpenCL only. Disables all standard includes containing non-native compiler types and functions.
  • -cl-opt-disable โ€” OpenCL only. This option disables all optimizations. By default optimizations are enabled.
  • -cl-single-precision-constant โ€” OpenCL only. Treat double precision floating-point constant as single precision constant.
  • -cl-std=<value> โ€” OpenCL language standard to compile for.
  • -cl-strict-aliasing โ€” OpenCL only. This option is added for compatibility with OpenCL 1.0.
  • -cl-uniform-work-group-size โ€” OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel.
  • -cl-unsafe-math-optimizations โ€” OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable. โš ๏ธ unsafe is right there in the name bestie.
  • -clangir-disable-passes โ€” Disable CIR transformations pipeline.
  • -clangir-disable-verifier โ€” ClangIR: Disable MLIR module verifier.
  • --config=<file> โ€” Specify configuration file.
  • --cuda-compile-host-device โ€” Compile CUDA code for both host and device (this is the default, she's an overachiever). Has no effect on non-CUDA compilations.
  • --cuda-device-only โ€” Compile CUDA code for device only.
  • --cuda-feature=<value> โ€” Manually specify the CUDA feature to use.
  • --cuda-host-only โ€” Compile CUDA code for host only. Has no effect on non-CUDA compilations.
  • --cuda-include-ptx=<value> โ€” Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.
  • --cuda-noopt-device-debug โ€” Enable device-side debug info generation. Disables ptxas optimizations.
  • --cuda-path-ignore-env โ€” Ignore environment variables to detect CUDA installation.
  • --cuda-path=<value> โ€” CUDA installation path.
  • -cuid=<value> โ€” An ID for compilation unit, which should be the same for the same compilation unit but different for different compilation units. It is used to externalize device-side static variables for single source offloading languages CUDA and HIP so that they can be accessed by the host code of the same compilation unit.
  • -cxx-isystem <directory> โ€” Add directory to the C++ SYSTEM include search path.
  • -C โ€” Include comments in preprocessed output.
  • -c โ€” Only run preprocess, compile, and assemble steps. short and efficient, we respect her ๐ŸŽ€
  • -darwin-target-variant-triple <value> โ€” Specify the darwin target variant triple.
  • -darwin-target-variant <value> โ€” Generate code for an additional runtime variant of the deployment target.
  • -dD โ€” Print macro definitions in -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.
  • -dsym-dir <dir> โ€” Directory to output dSYM's (if any) to.
  • -dumpdir <dumppfx> โ€” Use <dumpfpx> as a prefix to form auxiliary and dump file names.
  • -dumpmachine โ€” Display the compiler's target processor.
  • -dumpversion โ€” Display the version of the compiler.
  • -D <macro>=<value> โ€” Define <macro> to <value> (or 1 if <value> omitted).
  • --embed-dir=<dir> โ€” Add directory to embed search path.
  • -emit-ast โ€” Emit Clang AST files for source inputs.
  • -emit-cir โ€” Build ASTs and then lower to ClangIR.
  • --emit-extension-symbol-graphs โ€” Generate additional symbol graphs for extended modules.
  • -emit-interface-stubs โ€” Generate Interface Stub Files.
  • -emit-llvm โ€” Use the LLVM representation for assembler and object files.
  • -emit-merged-ifs โ€” Generate Interface Stub Files, emit merged text not binary.
  • --emit-static-lib โ€” Enable linker job to emit a static library.
  • -emit-symbol-graph โ€” Generate Extract API information as a side effect of compilation.
  • --end-no-unused-arguments โ€” Start emitting warnings for unused driver arguments.
  • --extract-api-ignores=<value> โ€” Comma separated list of files containing a new line separated list of API symbols to ignore when extracting API information.
  • -extract-api โ€” Extract API information.
  • -E โ€” Only run the preprocessor.
  • -faapcs-bitfield-load โ€” Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).
  • -faapcs-bitfield-width โ€” Follow the AAPCS standard requirement stating that volatile bit-field width is dictated by the field container type. (ARM only).
  • -faarch64-jump-table-hardening โ€” Use hardened lowering for jump-table dispatch. ๐Ÿ›ก๏ธ
  • -faddrsig โ€” Emit an address-significance table.
  • -falign-loops=<N> โ€” N must be a power of two. Align loops to the boundary.
  • -faligned-allocation โ€” Enable C++17 aligned allocation functions.
  • -falloc-token-max=<N> โ€” Limit to maximum N allocation tokens (0 = target SIZE_MAX).
  • -fallow-editor-placeholders โ€” Treat editor placeholders as valid source code.
  • -fallow-runtime-check-skip-hot-cutoff=<value> โ€” Exclude __builtin_allow_runtime_check for the top hottest code responsible for the given fraction of PGO counters (0.0 [default] = skip none; 1.0 = skip all). Argument format: <value>.
  • -faltivec-src-compat=<value> โ€” Source-level compatibility for Altivec vectors (for PowerPC targets). This includes results of vector comparison (scalar for 'xl', vector for 'gcc') as well as behavior when initializing with a scalar (splatting for 'xl', element zero only for 'gcc'). For 'mixed', the compatibility is as 'gcc' for 'vector bool/vector pixel' and as 'xl' for other types. Current default is 'mixed'.
  • -fansi-escape-codes โ€” Use ANSI escape codes for diagnostics. colorful errors, we love to see it ๐ŸŒˆ
  • -fapinotes-modules โ€” Enable module-based external API notes support.
  • -fapinotes-swift-version=<version> โ€” Specify the Swift version to use when filtering API notes.
  • -fapinotes โ€” Enable external API notes support.
  • -fapple-kext โ€” Use Apple's kernel extensions ABI.
  • -fapple-link-rtlib โ€” Force linking the clang builtins runtime library.
  • -fapple-pragma-pack โ€” Enable Apple gcc-compatible #pragma pack handling.
  • -fapplication-extension โ€” Restrict code to those available for App Extensions.
  • -fapprox-func โ€” Allow certain math function calls to be replaced with an approximately equivalent calculation.
  • -fassume-nothrow-exception-dtor โ€” Assume that exception objects' destructors are non-throwing.
  • -fasync-exceptions โ€” Enable EH Asynchronous exceptions.
  • -fatomic-fine-grained-memory โ€” May have atomic operations on fine-grained memory.
  • -fatomic-ignore-denormal-mode โ€” Allow atomic operations to ignore denormal mode.
  • -fatomic-remote-memory โ€” May have atomic operations on remote memory.
  • -fauto-import โ€” MinGW specific. Enable code generation support for automatic dllimport, and enable support for it in the linker. Enabled by default.
  • -fbasic-block-address-map โ€” Emit the basic block address map section.
  • -fbasic-block-sections=<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).

okay that's the vibe so far, and there is so much more coming in the next parts โ€” don't go anywhere ๐Ÿ’–

  • -fcall-saved-x13 โ€” makes the x13 register call-saved ๐Ÿ’… (AArch64 only)
  • -fcall-saved-x14 โ€” makes the x14 register call-saved ๐Ÿ’… (AArch64 only)
  • -fcall-saved-x15 โ€” makes the x15 register call-saved ๐Ÿ’… (AArch64 only)
  • -fcall-saved-x18 โ€” makes the x18 register call-saved ๐Ÿ’… (AArch64 only)
  • -fcall-saved-x8 โ€” makes the x8 register call-saved ๐Ÿ’… (AArch64 only)
  • -fcall-saved-x9 โ€” makes the x9 register call-saved ๐Ÿ’… (AArch64 only)
  • -fcaret-diagnostics-max-lines=<value> โ€” caps how many source lines get shown in a caret diagnostic. Set it to 0 and there's, like, no limit at all โœจ
  • -fcf-protection=<value> โ€” instruments control-flow architecture protection ๐Ÿ›ก๏ธ
  • -fcf-protection โ€” turns cf-protection on in 'full' mode, periodt ๐Ÿ’…
  • -fchar8_t โ€” enables the C++ builtin type char8_t ๐ŸŒธ
  • -fcheck-new โ€” don't assume C++ operator new might not return NULL ๐Ÿซถ
  • -fclang-abi-compat=<version> โ€” tries to match the ABI of Clang <version> ๐Ÿ‘‘
  • -fclangir โ€” uses the ClangIR pipeline to compile ๐Ÿ”ฅ
  • -fcodegen-data-generate=<path> โ€” emits codegen data into the object file. LLD for MachO (currently) merges them into the <path> you specified ๐Ÿ’พ
  • -fcodegen-data-generate โ€” emits codegen data into the object file. LLD for MachO (currently) merges them into default.cgdata ๐Ÿ’พ
  • -fcodegen-data-use=<path> โ€” uses codegen data read from the <path> you gave it ๐Ÿ“–
  • -fcodegen-data-use โ€” uses codegen data read from default.cgdata to optimize the binary ๐Ÿ“–
  • -fcolor-diagnostics โ€” enables colors in diagnostics ๐ŸŒˆโœจ
  • -fcomment-block-commands=<arg> โ€” treats each comma separated argument inside <arg> as a documentation comment block command ๐Ÿ“
  • -fcommon โ€” places uninitialized global variables in a common block ๐Ÿงฑ
  • -fcomplete-member-pointers โ€” requires member pointer base types to be complete if they'd be significant under the Microsoft ABI ๐Ÿ’…
  • -fcomplex-arithmetic=<value> โ€” controls the calculation methods used for complex number multiplication and division ๐Ÿงฎ
  • -fconstexpr-backtrace-limit=<value> โ€” sets the max number of entries to print in a constexpr evaluation backtrace (0 = no limit) ๐Ÿ’€
  • -fconstexpr-depth=<value> โ€” sets the max depth of recursive constexpr function calls ๐ŸŒ€
  • -fconstexpr-steps=<value> โ€” sets the max number of steps in constexpr function evaluation (0 = no limit) ๐ŸŒ€
  • -fconvergent-functions โ€” assumes all functions may be convergent ๐Ÿค
  • -fcoro-aligned-allocation โ€” prefers aligned allocation for C++ Coroutines ๐ŸŽ€
  • -fcoroutines โ€” enables support for the C++ Coroutines ๐ŸŽ€
  • -fcoverage-compilation-dir=<value> โ€” the compilation directory to embed in the coverage mapping ๐Ÿ“‚
  • -fcoverage-mapping โ€” generates coverage mapping so you can do code coverage analysis ๐Ÿ“Š
  • -fcoverage-mcdc โ€” enables MC/DC criteria when generating code coverage ๐Ÿ“Š
  • -fcoverage-prefix-map=<old>=<new> โ€” remaps file source paths <old> to <new> in coverage mapping. Heads up bestie: if there are multiple options, prefix replacement is applied in reverse order, starting from the last one ๐Ÿ™ˆ
  • -fcrash-diagnostics-dir=<dir> โ€” puts crash-report files in <dir> ๐Ÿ’ฅ
  • -fcrash-diagnostics=<value> โ€” sets the level of crash diagnostic reporting (option: off, compiler, all) ๐Ÿ’ฅ
  • -fcrash-diagnostics โ€” enables crash diagnostic reporting (this is the default btw) ๐Ÿ’ฅ
  • -fcs-profile-generate=<directory> โ€” generates instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by the LLVM_PROFILE_FILE env var) ๐Ÿ“ˆ
  • -fcs-profile-generate โ€” generates instrumented code to collect context sensitive execution counts into default.profraw (overridden by the LLVM_PROFILE_FILE env var) ๐Ÿ“ˆ
  • -fcuda-prec-sqrt โ€” specifies that sqrt is correctly rounded (for CUDA devices) ๐ŸŽฏ
  • -fcuda-short-ptr โ€” uses 32-bit pointers for accessing const/local/shared address spaces ๐ŸŽฏ
  • -fcx-fortran-rules โ€” range reduction is enabled for complex arithmetic operations ๐Ÿงฎ
  • -fcx-limited-range โ€” basic algebraic expansions of complex arithmetic operations involving are enabled ๐Ÿงฎ
  • -fcxx-exceptions โ€” enables C++ exceptions ๐Ÿšจ
  • -fcxx-modules โ€” enables modules for C++ ๐Ÿ“ฆ
  • -fdata-sections โ€” places each data in its own section ๐Ÿ—‚๏ธ
  • -fdebug-compilation-dir=<value> โ€” the compilation directory to embed in the debug info ๐Ÿ›
  • -fdebug-default-version=<value> โ€” the default DWARF version to use, if a -g option caused DWARF debug info to be produced ๐Ÿ›
  • -fdebug-info-for-profiling โ€” emits extra debug info to make the sample profile more accurate ๐ŸŽฏ
  • -fdebug-macro โ€” emits macro debug information ๐Ÿ›
  • -fdebug-prefix-map=<old>=<new> โ€” for paths in debug info, remaps directory <old> to <new>. If multiple options match a path, the last option wins ๐Ÿ‘‘
  • -fdebug-ranges-base-address โ€” uses DWARF base address selection entries in .debug_ranges ๐Ÿ›
  • -fdebug-types-section โ€” places debug types in their own section (ELF Only) ๐Ÿ›
  • -fdeclspec โ€” allows __declspec as a keyword ๐Ÿ’…
  • -fdefer-ts โ€” enables support for the C '_Defer' Technical Specification โณ
  • -fdefine-target-os-macros โ€” enables predefined target OS macros ๐ŸŒ
  • -fdelayed-template-parsing โ€” parses templated function definitions at the end of the translation unit โฐ
  • -fdelete-null-pointer-checks โ€” treats usage of null pointers as undefined behavior (and yes, this is the default) ๐Ÿ’€
  • -fdevirtualize-speculatively โ€” enables speculative devirtualization optimization ๐Ÿ”ฎ
  • -fdiagnostics-absolute-paths โ€” prints absolute paths in diagnostics ๐Ÿ“
  • -fdiagnostics-color=<value> โ€” when to use colors in diagnostics ๐ŸŒˆ
  • -fdiagnostics-hotness-threshold=<value> โ€” prevents optimization remarks from being output if they don't have at least this profile count. Use 'auto' to apply the threshold from the profile summary ๐Ÿ”ฅ
  • -fdiagnostics-misexpect-tolerance=<value> โ€” prevents misexpect diagnostics from being output if the profile counts are within N% of the expected ๐Ÿ™ˆ
  • -fdiagnostics-parseable-fixits โ€” prints fix-its in machine parseable form ๐Ÿค–
  • -fdiagnostics-print-source-range-info โ€” prints source range spans in numeric form ๐Ÿ”ข
  • -fdiagnostics-show-hotness โ€” enables profile hotness information in the diagnostic line ๐Ÿ”ฅ
  • -fdiagnostics-show-note-include-stack โ€” displays include stacks for diagnostic notes ๐Ÿ“š
  • -fdiagnostics-show-option โ€” prints the option name along with mappable diagnostics ๐Ÿท๏ธ
  • -fdiagnostics-show-template-tree โ€” prints a template comparison tree for differing templates ๐ŸŒณ
  • -fdigraphs โ€” enables alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (this one's the default btw) โœจ
  • -fdirect-access-external-data โ€” don't use GOT indirection to reference external data symbols ๐Ÿš€
  • -fdisable-block-signature-string โ€” disable block signature string ๐Ÿ™…
  • -fdiscard-value-names โ€” discards value names in LLVM IR ๐Ÿ—‘๏ธ
  • -fdollars-in-identifiers โ€” allows '$' in identifiers ๐Ÿ’ฐ
  • -fdriver-only โ€” only runs the driver ๐Ÿš—
  • -fdwarf-exceptions โ€” uses DWARF style exceptions ๐Ÿ›
  • -feliminate-unused-debug-types โ€” do not emit debug info for defined but unused types ๐Ÿšซ
  • -fembed-bitcode-marker โ€” embeds placeholder LLVM IR data as a marker ๐Ÿ“Œ
  • -fembed-bitcode=<option> โ€” embeds LLVM bitcode ๐Ÿ’พ
  • -fembed-bitcode โ€” embeds LLVM IR bitcode as data ๐Ÿ’พ
  • -fembed-offload-object=<value> โ€” embeds Offloading device-side binary into the host object file as a section ๐Ÿ“ฆ
  • -femit-all-decls โ€” emits all declarations, even if unused ๐Ÿ“ข
  • -femit-compact-unwind-non-canonical โ€” tries emitting Compact-Unwind for non-canonical entries. This maybe gets overridden by other constraints ๐Ÿ™ˆ
  • -femit-dwarf-unwind=<value> โ€” when to emit DWARF unwind (EH frame) info ๐Ÿ›
  • -femulated-tls โ€” uses emutls functions to access thread_local variables ๐Ÿงต
  • -fenable-matrix โ€” enables the matrix data type and related builtin functions ๐Ÿ”ข
  • -fexceptions โ€” enables support for exception handling ๐Ÿšจ
  • -fexcess-precision=<value> โ€” lets you control excess precision on targets where native support for the precision types isn't available. By default, excess precision is used to calculate intermediate results following the rules specified in ISO C99 ๐ŸŽฏ
  • -fexperimental-call-graph-section โ€” emits a call graph section ๐Ÿ•ธ๏ธ
  • -fexperimental-late-parse-attributes โ€” enables experimental late parsing of attributes ๐Ÿงช
  • -fexperimental-library โ€” controls whether unstable and experimental library features are enabled. This option enables various library features that are either experimental (also known as TSes), or have been but are not stable yet in the selected Standard Library implementation. It is not recommended to use this option in production code, since neither ABI nor API stability are guaranteed. This is intended to provide a preview of features that will ship in the future for experimentation purposes ๐Ÿงช
  • -fexperimental-loop-fusion โ€” enable the loop fusion pass ๐Ÿ”
  • -fexperimental-new-constant-interpreter โ€” enables the experimental new constant interpreter ๐Ÿงช
  • -fexperimental-openacc-macro-override <value> โ€” overrides the _OPENACC macro value for experimental testing during OpenACC support development ๐Ÿงช
  • -fexperimental-relative-c++-abi-vtables โ€” uses the experimental C++ class ABI for classes with virtual tables ๐Ÿงช
  • -fexperimental-sanitize-metadata-ignorelist=<value> โ€” disables sanitizer metadata for modules and functions that match the provided special case list ๐Ÿ™…
  • -fexperimental-sanitize-metadata=<value> โ€” specifies the type of metadata to emit for binary analysis sanitizers ๐Ÿงช
  • -fexperimental-strict-floating-point โ€” enables the use of non-default rounding modes and non-default exception handling on targets that are not currently ready ๐Ÿ˜ฌ (like, it literally says they're not ready bestie)
  • -fextend-arguments=<value> โ€” controls how scalar integer arguments are extended in calls to unprototyped and varargs functions ๐Ÿ“
  • -fextend-variable-liveness=<value> โ€” extends the liveness of user variables through optimizations to prevent stale or optimized-out variable values when debugging ๐Ÿ›
  • -fextend-variable-liveness โ€” alias for -fextend-variable-liveness=all ๐Ÿ”
  • -ffast-math โ€” allows aggressive, lossy floating-point optimizations โšก (emphasis on lossy, it's giving risky)
  • -ffat-lto-objects โ€” enables fat LTO object support ๐Ÿ”
  • -ffile-compilation-dir=<value> โ€” tells the compiler which compilation directory to bake into the debug info and the coverage mapping. like, so your debugger knows where home is ๐Ÿ’…
  • -ffile-prefix-map=<value> โ€” remaps file source paths everywhere it matters: debug info, coverage mapping, predefined preprocessor macros, and __builtin_FILE(). it also implies -ffile-reproducible, so you get that for free โœจ
  • -ffile-reproducible โ€” uses the target's platform-specific path separator character when it expands the __FILE__ macro. yes bestie, that's the whole thing ๐ŸŽ€
  • -ffine-grained-bitfield-accesses โ€” uses separate accesses for consecutive bitfield runs whose widths and alignments are legal. small bites, cuter bites ๐Ÿ“
  • -ffinite-loops โ€” assumes all non-trivial loops are finite. bold assumption, hope it's right ๐Ÿ˜ญ
  • -ffinite-math-only โ€” allows floating-point optimizations that assume arguments and results are not NaNs or +-inf. and it defines the __FINITE_MATH_ONLY__ preprocessor macro. so if your math is cursed, this is gonna be a whole situation ๐Ÿ’€
  • -ffixed-a0 โ€” reserve 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)
  • -ffixed-a5 โ€” reserve the a5 register (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)

okay so this is where it gets VERY "reserve the register" โ€” the compiler is basically moving in and claiming the good seats and you cannot sit there. no cap. moving on to the SPARC benches ๐Ÿ’œ

  • -ffixed-g1 โ€” reserve 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 โ€” enable fixed point types. it's giving "decimals but obsessed with staying put" ๐ŸŒธ
  • -ffixed-r19 โ€” reserve register r19 (Hexagon only)
  • -ffixed-r9 โ€” reserve the r9 register (ARM only)

and now we get to the AArch64/RISC-V section, which is literally just "reserve the x-something register" for like thirty options. it's iconic actually. the compiler said "everybody gets a boundary" ๐Ÿ˜Œ

  • -ffixed-x10 โ€” reserve 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)

periodt. register drama over, back to your regularly scheduled compiler flags ๐Ÿฆ‹

  • -fforce-check-cxx20-modules-input-files โ€” checks the input source files from C++20 modules explicitly. no vibes-based skipping allowed ๐Ÿ”
  • -fforce-dwarf-frame โ€” always emit a debug frame section. always always ๐ŸŒˆ
  • -fforce-emit-vtables โ€” emits more virtual tables to improve devirtualization. more tables, more devirtualizing, we love to see it โœจ
  • -fforce-enable-int128 โ€” enable support for the int128_t type. big numbers, big energy ๐Ÿ‘‘
  • -ffp-accuracy=<value> โ€” specifies the required accuracy for floating-point operations and library calls.
  • -ffp-contract=<value> โ€” forms fused FP ops (e.g. FMAs)
  • -ffp-eval-method=<value> โ€” specifies the evaluation method to use for floating-point arithmetic.
  • -ffp-exception-behavior=<value> โ€” specifies the exception behavior of floating-point operations.
  • -ffp-model=<value> โ€” controls the semantics of floating-point calculations.
  • -ffreestanding โ€” asserts that the compilation takes place in a freestanding environment. no host, no problem ๐Ÿงš
  • -ffuchsia-api-level=<value> โ€” sets the Fuchsia API level.
  • -ffunction-sections โ€” puts each function in its own section. everyone gets their own room, main character energy fr fr ๐Ÿ’…
  • -fglobal-isel โ€” enables the global instruction selector.
  • -fgnu-keywords โ€” allows GNU-extension keywords regardless of the language standard. rules? never heard of her ๐Ÿ™ˆ
  • -fgnu-runtime โ€” generates output compatible with the standard GNU Objective-C runtime.
  • -fgnu89-inline โ€” uses the gnu89 inline semantics.
  • -fgnuc-version=<value> โ€” sets various macros to claim compatibility with the given GCC version; the default is 4.2.1. yes bestie, it just says it's that version. fake it till you make it ๐Ÿ’€
  • -fgpu-allow-device-init โ€” allow device side init function in HIP (experimental). it's marked experimental so treat it like a situationship, careful ๐Ÿ˜ญ
  • -fgpu-approx-transcendentals โ€” use approximate transcendental functions.
  • -fgpu-default-stream=<value> โ€” specify default stream. the default value 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. deprecated bestie, it's giving "we don't do that anymore" ๐ŸŽ€
  • -fhip-emit-relocatable โ€” compile HIP source to relocatable.
  • -fhip-fp32-correctly-rounded-divide-sqrt โ€” specify that single precision floating-point divide and sqrt used in the program source are correctly rounded (HIP device compilation only).
  • -fhip-kernel-arg-name โ€” specify that kernel argument names are preserved (HIP only).
  • -fhip-new-launch-api โ€” use new kernel launching API for HIP.
  • -fhlsl-strict-availability โ€” enables strict availability diagnostic mode for HLSL built-in functions.
  • -fhonor-infinities โ€” specify that floating-point optimizations are not allowed that assume arguments and results are not +-inf. so infinity gets respect ๐Ÿ’–
  • -fhonor-nans โ€” specify that floating-point optimizations are not allowed that assume arguments and results are not NANs. NaN rights ๐Ÿซถ
  • -fignore-exceptions โ€” enable support for ignoring exception handling constructs. we simply do not perceive them โœจ
  • -fimplicit-module-maps โ€” implicitly search the file system for module map files.
  • -fincremental-extensions โ€” enable incremental processing extensions such as processing statements on the global scope.
  • -finit-global-zero โ€” zero initialize globals without default initialization (default). it's the default, so like, it's already doing this unless you said otherwise ๐Ÿ’…
  • -finline-functions โ€” inline suitable functions.
  • -finline-hint-functions โ€” inline functions which are (explicitly or implicitly) marked inline.
  • -finline-max-stacksize=<value> โ€” suppress inlining of functions whose stack size exceeds the given value. if your stack is too thicc, you're not coming in ๐Ÿ“
  • -finput-charset=<value> โ€” specify the default character set for source files.
  • -finstrument-function-entry-bare โ€” instrument function entry only, after inlining, without arguments to the instrumentation call.
  • -finstrument-functions-after-inlining โ€” like -finstrument-functions, but insert the calls after inlining.
  • -finstrument-functions โ€” generate calls to instrument function entry and exit.
  • -fintegrated-as โ€” enable the integrated assembler.
  • -fintegrated-cc1 โ€” run cc1 in-process.
  • -fintegrated-objemitter โ€” use internal machine object code emitter.
  • -fjmc โ€” enable just-my-code debugging.
  • -fjump-tables โ€” use jump tables for lowering switches.
  • -fkeep-persistent-storage-variables โ€” keeps every variable with persistent storage duration alive and well, so globals, statics and thread-local variables all get to stay ๐Ÿ”’ the whole point is guaranteeing you can directly address them, bestie.
  • -fkeep-static-consts โ€” keeps those static const variables around even when nobody's using them ๐Ÿฅบ no variable left behind fr fr.
  • -fkeep-system-includes โ€” okay so instead of expanding system headers when you're emitting preprocessor output, this one preserves the #include directive โœจ super handy when you're making preprocessed output for test case reduction. But listen: it can produce incorrect output if preprocessor symbols that control the included content (like _XOPEN_SOURCE) are defined in the including source file ๐Ÿ˜ญ and, ngl, the portability of the resulting source to other compilation environments is not guaranteed. Only valid with -E, periodt.
  • -flax-vector-conversions=<value> โ€” turns on implicit vector bit-casts ๐Ÿฆ‹ let them cast, let them slay.
  • -flink-huge-device-code โ€” generates and uses a custom linker script for those huge device code sections ๐Ÿ’… big section energy.
  • -floop-interchange โ€” enables the loop interchange pass ๐Ÿ”„ iconic compiler optimization behavior.
  • -flto-jobs=<value> โ€” controls the backend parallelism of -flto=thin โœจ and the default of 0 means the number of threads gets derived from the number of CPUs detected, so basically it counts your cores and goes off ๐Ÿ‘‘
  • -flto-partitions=<value> โ€” how many partitions to use for parallel full LTO codegen. ld.lld only, just so you know ๐Ÿซถ
  • -flto=auto โ€” enables LTO in 'full' mode ๐Ÿ”ฅ
  • -flto=jobserver โ€” enables LTO in 'full' mode ๐Ÿ”ฅ (same mode, different flavor of "yes").
  • -flto=<value> โ€” sets the LTO mode โš™๏ธ you pick, it does.
  • -flto โ€” enables LTO in 'full' mode ๐Ÿ’–
  • -fmacro-backtrace-limit=<value> โ€” sets the max number of entries to print in a macro expansion backtrace, and 0 = no limit ๐ŸŒˆ (yes, "no limit" is a real choice and it is chaotic of you).
  • -fmacro-prefix-map=<value> โ€” remaps file source paths inside predefined preprocessor macros and __builtin_FILE() ๐Ÿ“ and heads up, it implies -ffile-reproducible.
  • -fmath-errno โ€” requires math functions to indicate errors by setting errno ๐Ÿšจ they gotta tell you when something's wrong, communication is key bestie.
  • -fmatrix-memory-layout=<value> โ€” sets the matrix memory layout, either row-major or column-major ๐ŸŽ€ pick your lane.
  • -fmax-tokens=<value> โ€” the max total number of preprocessed tokens, used for -Wmax-tokens. ๐Ÿงฎ
  • -fmax-type-align=<value> โ€” specifies the maximum alignment to enforce on pointers that don't have an explicit alignment ๐Ÿ“.
  • -fmemory-profile-use=<pathname> โ€” uses a memory profile for profile-guided memory optimization ๐Ÿง โœจ.
  • -fmemory-profile=<directory> โ€” enables heap memory profiling and dumps the results into <directory> ๐Ÿ“‚.
  • -fmemory-profile โ€” enables heap memory profiling, no directory specified, no notes ๐Ÿ’œ.
  • -fmerge-all-constants โ€” allows merging of constants ๐Ÿซ‚ let the constants be friends.
  • -fmessage-length=<value> โ€” formats message diagnostics so they fit within N columns ๐Ÿ“ tidy little diagnostics, we love to see it.
  • -fminimize-whitespace โ€” ignores the whitespace from the input file when emitting preprocessor output ๐ŸŒธ it'll only contain whitespace when it's necessary, e.g. to keep two minus signs from merging into an increment operator. Super useful with the -P option to normalize whitespace such that two files with only formatting changes come out equal โœจ Important: only valid with -E on C-like inputs, and it's incompatible with -traditional-cpp ๐Ÿ˜ญ pick one, you can't have both.
  • -fmodule-file=[<name>=]<file> โ€” specifies the mapping of module name to precompiled module file, or just loads a module file if the name is omitted ๐Ÿ’… flexible.
  • -fmodule-header=<kind> โ€” builds a C++20 Header Unit from a header that should be found in the user search path (fmodule-header=user) or the system search path (fmodule-header=system) ๐Ÿ”.
  • -fmodule-header โ€” builds a C++20 Header Unit from a header ๐ŸŽ€ the short version.
  • -fmodule-map-file=<file> โ€” loads this module map file ๐Ÿ“œ.
  • -fmodule-name=<name> โ€” specifies the name of the module to build ๐Ÿท๏ธ name it, claim it.
  • -fmodule-output=<value> โ€” saves intermediate module file results when compiling a standard C++ module unit ๐Ÿ’พ.
  • -fmodule-output โ€” saves intermediate module file results when compiling a standard C++ module unit ๐Ÿ’พ (same deal, no argument).
  • -fmodulemap-allow-subdirectory-search โ€” allows searching for module maps in subdirectories of search paths ๐Ÿ—‚๏ธ dig deeper.
  • -fmodules-cache-path=<directory> โ€” specifies the module cache path ๐Ÿงบ where the modules go to chill.
  • -fmodules-decluse โ€” requires declaration of modules used within a module ๐Ÿ“ no sneaky undeclared usage.
  • -fmodules-disable-diagnostic-validation โ€” disables validation of the diagnostic options when loading the module ๐Ÿ™ˆ.
  • -fmodules-embed-all-files<value> โ€” embeds the contents of all files read by this compilation into the produced module file ๐Ÿ“ฆ everything, in the box.
  • -fmodules-force-validate-user-headers โ€” forces validation of user headers when repeatedly loading a module file within a single build session ๐Ÿ”.
  • -fmodules-ignore-macro=<value> โ€” ignores the definition of the given macro when building and loading modules ๐Ÿ™…โ™€๏ธ.
  • -fmodules-prune-after=<seconds> โ€” specifies the interval (in seconds) after which a module file will be considered unused โณ.
  • -fmodules-prune-interval=<seconds> โ€” specifies the interval (in seconds) between attempts to prune the module cache ๐Ÿงน.
  • -fmodules-reduced-bmi โ€” generates the reduced BMI โœจ.
  • -fmodules-search-all โ€” searches even non-imported modules to resolve references ๐Ÿ”Ž.
  • -fmodules-strict-decluse โ€” like -fmodules-decluse but requires all headers to be in modules ๐Ÿ˜ค stricter, no exceptions.
  • -fmodules-user-build-path <directory> โ€” specifies the module user build path ๐Ÿ› ๏ธ.
  • -fmodules-validate-input-files-content โ€” validates PCM input files based on content if the mtime differs ๐Ÿ•ต๏ธ content over timestamps.
  • -fmodules-validate-once-per-build-session โ€” doesn't verify input files for the modules if the module has already been successfully validated or loaded during this build session โœ… trust the process.
  • -fmodules-validate-system-headers โ€” validates the system headers that a module depends on when loading the module ๐Ÿฉบ.
  • -fmodules โ€” enables the 'modules' language feature ๐Ÿ’ซ.
  • -fms-compatibility-version=<value> โ€” a dot-separated value representing the Microsoft compiler version number to report in _MSC_VER, and 0 = don't define it (that's the default) ๐ŸชŸ.
  • -fms-compatibility โ€” enables full Microsoft Visual C++ compatibility ๐Ÿงฉ.
  • -fms-define-stdc โ€” defines '__STDC__' to '1' in MSVC Compatibility mode ๐Ÿท๏ธ.
  • -fms-extensions โ€” accepts some non-standard constructs supported by the Microsoft compiler ๐Ÿค.
  • -fms-hotpatch โ€” ensures that all functions can be hotpatched at runtime ๐Ÿ”ฅ๐Ÿฉน.
  • -fms-runtime-lib=<value> โ€” selects the Windows run-time library ๐ŸชŸ๐Ÿ“š.
  • -fms-secure-hotpatch-functions-file=<value> โ€” path to a file that contains a list of mangled names of functions that should be hot-patched for Windows Secure Hot-Patching ๐Ÿ“„๐Ÿ”.
  • -fms-secure-hotpatch-functions-list=<value> โ€” a list of mangled symbol names of functions that should be hot-patched for Windows Secure Hot-Patching ๐Ÿ“‹๐Ÿ”.
  • -fms-volatile โ€” volatile loads and stores have acquire and release semantics โšก.
  • -fmsc-version=<value> โ€” Microsoft compiler version number to report in _MSC_VER, and 0 = don't define it (default) ๐ŸชŸ.
  • -fnamed-loops โ€” enables support for named loops ๐Ÿท๏ธ๐Ÿ”„.
  • -fnew-alignment=<align> โ€” specifies the largest alignment guaranteed by '::operator new(size_t)' ๐Ÿ“.
  • -fnew-infallible โ€” enables treating throwing global C++ operator new as always returning valid memory ๐Ÿ˜Œ it annotates with __attribute__((returns_nonnull)) and throw(). And yes, this is detectable in source ๐Ÿ‘€.
  • -fno-aapcs-bitfield-width โ€” does not follow the AAPCS standard requirement stating that volatile bit-field width is dictated by the field container type ๐Ÿšซ๐Ÿ“ (ARM only).
  • -fno-access-control โ€” disables C++ access control ๐Ÿ˜ˆ private? never heard of her.
  • -fno-addrsig โ€” doesn't emit an address-significance table ๐Ÿ™….
  • -fno-apinotes-modules โ€” disables module-based external API notes support ๐Ÿ“๐Ÿšซ.
  • -fno-apinotes โ€” disables external API notes support ๐Ÿšซ.
  • -fno-assume-sane-operator-new โ€” doesn't assume that C++'s global operator new can't alias any pointer ๐Ÿคจ assume nothing bestie.
  • -fno-assume-unique-vtables โ€” disables optimizations based on vtable pointer identity ๐Ÿงฌ.
  • -fno-assumptions โ€” disables codegen and compile-time checks for C++23's [[assume]] attribute ๐Ÿšซ๐Ÿค”.
  • -fno-atomic-fine-grained-memory โ€” assumes no atomic operations on fine-grained memory ๐Ÿงต.
  • -fno-atomic-ignore-denormal-mode โ€” disallows atomic operations from ignoring denormal mode ๐Ÿšซ๐ŸŒ€.
  • -fno-atomic-remote-memory โ€” assumes no atomic operations on remote memory ๐Ÿ“ก.
  • -fno-auto-import โ€” MinGW specific ๐Ÿง disables support for automatic dllimport in code generation and linking.
  • -fno-autolink โ€” disables generation of linker directives for automatic library linking ๐Ÿ”—๐Ÿšซ.
  • -fno-builtin-<value> โ€” disables implicit builtin knowledge of one specific function ๐ŸŽฏ.
  • -fno-builtin โ€” disables implicit builtin knowledge of functions, full stop ๐Ÿ›‘.
  • -fno-bundle-offload-arch โ€” specifies that the offload bundler should not identify a bundle with a specific arch ๐Ÿ“ฆ so like, for example, the bundle for nvptx64-nvidia-cuda-sm_80 uses the bundle tag nvptx64-nvidia-cuda when used. This lets .o files contain .bc bundles that are unspecific to a particular arch version โœจ.
  • -fno-c++-static-destructors โ€” disables C++ static destructor registration ๐Ÿšซ๐Ÿ’€.
  • -fno-char8_t โ€” disables the C++ builtin type char8_t ๐Ÿ”ก๐Ÿšซ.
  • -fno-clangir โ€” uses the AST -> LLVM pipeline to compile ๐ŸŒณโžก๏ธ๐Ÿ”ง.
  • -fno-color-diagnostics โ€” disables colors in diagnostics ๐ŸŒˆ๐Ÿšซ (sad, but sometimes necessary).
  • -fno-common โ€” compiles common globals like normal definitions ๐Ÿ“ฆ.
  • -fno-complete-member-pointers โ€” does not require member pointer base types to be complete if they would be significant under the Microsoft ABI ๐ŸชŸ๐Ÿšซ.
  • -fno-constant-cfstrings โ€” disables creation of CodeFoundation-type constant strings ๐Ÿšซ๐Ÿ“„.
  • -fno-coverage-mapping โ€” disables code coverage analysis ๐Ÿ“‰๐Ÿšซ.
  • -fno-coverage-mcdc โ€” disables MC/DC coverage criteria ๐Ÿšซ๐Ÿงช.
  • -fno-crash-diagnostics โ€” disables auto-generation of preprocessed source files and a script for reproduction when clang crashes ๐Ÿ’ฅ๐Ÿšซ (so when it goes down, it goes down quietly, your call bestie).
  • -fno-cuda-prec-sqrt โ€” doesn't specify that sqrt is correctly rounded, for CUDA devices ๐ŸŽฎ๐Ÿ“.
  • -fno-cx-fortran-rules โ€” range reduction is disabled for complex arithmetic operations ๐ŸŒ€๐Ÿšซ.
  • -fno-cx-limited-range โ€” basic algebraic expansions of complex arithmetic operations involving are disabled ๐Ÿ™ˆ (yes, that's the exact wording, keeping it verbatim for you).
  • -fno-cxx-modules โ€” disables modules for C++ ๐Ÿšซ๐Ÿ“ฆ.
  • -fno-debug-macro โ€” does not emit macro debug information ๐Ÿ›๐Ÿšซ.
  • -fno-declspec โ€” disallows __declspec as a keyword ๐Ÿšซ๐Ÿ”‘.
  • -fno-define-target-os-macros โ€” disables predefined target OS macros ๐Ÿ–ฅ๏ธ๐Ÿšซ.
  • -fno-delayed-template-parsing โ€” Disable delayed template parsing. No more waiting around, bestie. โœจ
  • -fno-delete-null-pointer-checks โ€” Do not treat usage of null pointers as undefined behavior. live your null-pointer truth, lowkey. ๐Ÿฆ‹
  • -fno-diagnostics-fixit-info โ€” Do not include fixit information in diagnostics. no little hints, just vibes. ๐Ÿ’…
  • -fno-diagnostics-show-line-numbers โ€” Show line numbers in diagnostic code snippets. yes literally "Show" even though it's -fno, the page said it, periodt. ๐Ÿ‘‘
  • -fno-digraphs โ€” Disallow alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:'. no digraphs allowed, sorry not sorry. ๐ŸŽ€
  • -fno-direct-access-external-data โ€” Use GOT indirection to reference external data symbols. GOT indirection, iconic. ๐ŸŒˆ
  • -fno-disable-block-signature-string โ€” Don't disable block signature string) the stray ) is part of the lore, bestie. ๐Ÿ’€
  • -fno-discard-value-names โ€” Do not discard value names in LLVM IR. keep the names, they're main character energy. ๐ŸŒธ
  • -fno-dollars-in-identifiers โ€” Disallow '$' in identifiers. no dollar signs in identifiers, even if capitalism said yes. ๐Ÿ’ธ
  • -fno-elide-constructors โ€” Disable C++ copy constructor elision. copy constructors stay visible, no cap. ๐Ÿฆ‹
  • -fno-elide-type โ€” Do not elide types when printing diagnostics. full type names, no editing. โœจ
  • -fno-eliminate-unused-debug-types โ€” Emit debug info for defined but unused types. even the unused types get their moment. ๐Ÿ’–
  • -fno-exceptions โ€” Disable support for exception handling. no throw, no catch, just vibes. ๐Ÿ’€
  • -fno-experimental-late-parse-attributes โ€” Disable experimental late parsing of attributes. late parsing? not today. ๐Ÿงš
  • -fno-experimental-loop-fusion โ€” DisableEnable the loop fusion pass. it really says "DisableEnable", I'm just the messenger ๐Ÿ˜ญ ๐Ÿ”ฅ
  • -fno-experimental-relative-c++-abi-vtables โ€” Do not use the experimental C++ class ABI for classes with virtual tables. no experimental vtable ABI, bestie. ๐Ÿ‘‘
  • -fno-experimental-sanitize-metadata=<value> โ€” Disable emitting metadata for binary analysis sanitizers. metadata says bye. ๐ŸŒˆ
  • -fno-fat-lto-objects โ€” Disable fat LTO object support. no fat LTO objects. ๐ŸŽ€
  • -fno-file-reproducible โ€” Use the host's platform-specific path separator character when expanding the __FILE__ macro. platform-specific path separator, slay. ๐Ÿ’…
  • -fno-fine-grained-bitfield-accesses โ€” Use large-integer access for consecutive bitfield runs. large-integer access, period. ๐Ÿฆ‹
  • -fno-finite-loops โ€” Do not assume that any loop is finite. infinite loops are valid, bestie. ๐ŸŒธ
  • -fno-fixed-point โ€” Disable fixed point types. fixed point? not here. โœจ
  • -fno-force-enable-int128 โ€” Disable support for int128_t type. no int128_t forcing. ๐Ÿ’–
  • -fno-global-isel โ€” Disables the global instruction selector. global isel is off. ๐Ÿงš
  • -fno-gnu-inline-asm โ€” Disable GNU style inline asm. no GNU inline asm, lowkey. ๐Ÿ’€
  • -fno-gpu-allow-device-init โ€” Don't allow device side init function in HIP (experimental). experimental HIP device init, blocked. ๐Ÿ”ฅ
  • -fno-gpu-approx-transcendentals โ€” Don't use approximate transcendental functions. no approximate transcendentals, bestie. ๐ŸŒˆ
  • -fno-gpu-defer-diag โ€” Don't defer host/device related diagnostic messages for CUDA/HIP. diagnostics come through immediately. ๐Ÿ‘‘
  • -fno-hip-emit-relocatable โ€” Do not override toolchain to compile HIP source to relocatable. relocatable HIP? not overridden. ๐Ÿ’…
  • -fno-hip-fp32-correctly-rounded-divide-sqrt โ€” Don't specify that single precision floating-point divide and sqrt used in the program source are correctly rounded (HIP device compilation only). HIP device only, bestie. ๐Ÿฆ‹
  • -fno-hip-kernel-arg-name โ€” Don't specify that kernel argument names are preserved (HIP only). HIP only, no preservation. ๐ŸŒธ
  • -fno-hip-new-launch-api โ€” Don't use new kernel launching API for HIP. old API stays, period. โœจ
  • -fno-init-global-zero โ€” Do not zero initialize globals without default initialization. no free zero init. ๐Ÿ’–
  • -fno-integrated-as โ€” Disable the integrated assembler. external assembler era. ๐Ÿงš
  • -fno-integrated-cc1 โ€” Spawn a separate process for each cc1. separate cc1 processes, every time. ๐Ÿ”ฅ
  • -fno-integrated-objemitter โ€” Use external machine object code emitter. external object emitter, slay. ๐Ÿ‘‘
  • -fno-jump-tables โ€” Do not use jump tables for lowering switches. no jump tables for switches. ๐ŸŒˆ
  • -fno-keep-persistent-storage-variables โ€” Disable keeping all variables that have a persistent storage duration, including global, static and thread-local variables, to guarantee that they can be directly addressed. persistent storage variables, not kept. ๐Ÿ’…
  • -fno-keep-static-consts โ€” Don't keep static const variables even if unused. unused static consts get yeeted. ๐Ÿฆ‹
  • -fno-knr-functions โ€” Disable support for K&R C function declarations. K&R functions? no. ๐ŸŒธ
  • -fno-link-huge-device-code โ€” Do not generate or use a custom linker script for huge device code sections (default). this is the default, bestie. โœจ
  • -fno-loop-interchange โ€” Disable the loop interchange pass. loop interchange off. ๐Ÿ’–
  • -fno-lto โ€” Disable LTO mode (default). default behavior, no LTO. ๐Ÿงš
  • -fno-memory-profile โ€” Disable heap memory profiling. no heap memory profiling. ๐Ÿ”ฅ
  • -fno-merge-all-constants โ€” Disallow merging of constants. constants stay separate, period. ๐Ÿ‘‘
  • -fno-modules-check-relocated<value> โ€” Skip checks for relocated modules when loading PCM files. PCM files, skip checks. ๐ŸŒˆ
  • -fno-modules-force-validate-user-headers โ€” Do not force validation of user headers when repeatedly loading a module file within single build session. single build session, no force validation. ๐Ÿ’…
  • -fno-modules-validate-textual-header-includes โ€” Do not enforce -fmodules-decluse and private header restrictions for textual headers. This flag will be removed in a future Clang release. future removal warning, bestie. ๐Ÿฆ‹
  • -fno-ms-tls-guards โ€” Do not emit code to perform on-demand initialization of thread-local variables. no MS TLS guards. ๐ŸŒธ
  • -fno-new-infallible โ€” Disable treating throwing global C++ operator new as always returning valid memory (annotates with __attribute__((returns_nonnull)) and throw()). This is detectable in source. detectable in source, no cap. โœจ
  • -fno-objc-avoid-heapify-local-blocks โ€” Don't try to avoid heapifying local blocks. local blocks get heapified. ๐Ÿ’–
  • -fno-objc-infer-related-result-type โ€” do not infer Objective-C related result type based on method family. no inference from method family. ๐Ÿงš
  • -fno-offload-fp32-prec-div โ€” fdiv operations in offload device code are not required to return correctly rounded results. offload fdiv, not correctly rounded required. ๐Ÿ”ฅ
  • -fno-offload-fp32-prec-sqrt โ€” sqrt operations in offload device code are not required to return correctly rounded results. offload sqrt, same vibe. ๐Ÿ‘‘
  • -fno-offload-lto โ€” Disable LTO mode (default) for offload compilation. default offload LTO off. ๐ŸŒˆ
  • -fno-offload-uniform-block โ€” Don't assume that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise). default true for CUDA/HIP, false otherwise. ๐Ÿ’…
  • -fno-offload-via-llvm โ€” Don't use LLVM/Offload as portable offloading runtime. no LLVM/Offload runtime. ๐Ÿฆ‹
  • -fno-openmp-extensions โ€” Disable all Clang extensions for OpenMP directives and clauses. no OpenMP extensions. ๐ŸŒธ
  • -fno-openmp-simd โ€” Do not emit code for any OpenMP constructs. no OpenMP code at all. โœจ
  • -fno-operator-names โ€” Do not treat C++ operator name keywords as synonyms for operators. operator names are not synonyms. ๐Ÿ’–
  • -fno-optimize-sibling-calls โ€” Disable tail call optimization, keeping the call stack accurate. accurate call stack, period. ๐Ÿงš
  • -fno-partition-static-data-sections โ€” Disable partition static data sections using profile information (x86 and aarch64 ELF). x86 and aarch64 ELF only. ๐Ÿ”ฅ
  • -fno-pch-codegen โ€” Do not generate code for uses of this PCH that assumes an explicit object file will be built for the PCH. PCH codegen, no. ๐Ÿ‘‘
  • -fno-pch-debuginfo โ€” Do not generate debug info for types in an object file built from this PCH and do not generate them elsewhere. no PCH debuginfo. ๐ŸŒˆ
  • -fno-plt โ€” Use GOT indirection instead of PLT to make external function calls (x86 only). x86 only, bestie. ๐Ÿ’…
  • -fno-preserve-as-comments โ€” Do not preserve comments in inline assembly. inline asm comments, gone. ๐Ÿฆ‹
  • -fno-profile-generate โ€” Disable generation of profile instrumentation. no profile instrumentation. ๐ŸŒธ
  • -fno-profile-instr-generate โ€” Disable generation of profile instrumentation. same as above, iconic. โœจ
  • -fno-profile-instr-use โ€” Disable using instrumentation data for profile-guided optimization. no PGO instrumentation data. ๐Ÿ’–
  • -fno-pseudo-probe-for-profiling โ€” Do not emit pseudo probes for sample profiling. no pseudo probes. ๐Ÿงš
  • -fno-raw-string-literals โ€” Disable raw string literals. raw string literals? no. ๐Ÿ”ฅ
  • -fno-register-global-dtors-with-atexit โ€” Don't use atexit or __cxa_atexit to register global destructors. global dtors not registered that way. ๐Ÿ‘‘
  • -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. no rpath additions, bestie. ๐ŸŒˆ
  • -fno-rtlib-defaultlib โ€” On Windows, do not emit /defaultlib: directives to link compiler-rt libraries. Windows only. ๐Ÿ’…
  • -fno-rtti-data โ€” Disable generation of RTTI data. no RTTI data. ๐Ÿฆ‹
  • -fno-rtti โ€” Disable generation of rtti information. no rtti info at all. ๐ŸŒธ
  • -fno-sanitize-address-globals-dead-stripping โ€” Disable linker dead stripping of globals in AddressSanitizer. ASan globals not dead-stripped. โœจ
  • -fno-sanitize-address-outline-instrumentation โ€” Use default code inlining logic for the address sanitizer. default inlining for ASan. ๐Ÿ’–
  • -fno-sanitize-address-poison-custom-array-cookie โ€” Disable poisoning array cookies when using custom operator new[] in AddressSanitizer. custom operator new[], no poisoning. ๐Ÿงš
  • -fno-sanitize-address-use-after-scope โ€” Disable use-after-scope detection in AddressSanitizer. no use-after-scope detection. ๐Ÿ”ฅ
  • -fno-sanitize-address-use-odr-indicator โ€” Disable ODR indicator globals. no ODR indicator globals. ๐Ÿ‘‘
  • -fno-sanitize-alloc-token-extended โ€” Disable extended coverage to custom allocation functions. no extended AllocToken coverage. ๐ŸŒˆ
  • -fno-sanitize-alloc-token-fast-abi โ€” Use the default AllocToken ABI. default ABI, period. ๐Ÿ’…
  • -fno-sanitize-annotate-debug-info=<value> โ€” Do not allow compiler to annotate sanitizer instrumentation with extra debug info for the specified sanitizers. specified sanitizers only. ๐Ÿฆ‹
  • -fno-sanitize-annotate-debug-info โ€” Do not allow compiler to annotate sanitizer instrumentation with extra debug info for any sanitizers. any sanitizers, no annotations. ๐ŸŒธ
  • -fno-sanitize-cfi-canonical-jump-tables โ€” Do not make the jump table addresses canonical in the symbol table. no canonical jump table addresses. โœจ
  • -fno-sanitize-cfi-cross-dso โ€” Disable control flow integrity (CFI) checks for cross-DSO calls. no cross-DSO CFI checks. ๐Ÿ’–
  • -fno-sanitize-coverage=<value> โ€” Disable features of coverage instrumentation for Sanitizers. specified coverage features off. ๐Ÿงš
  • -fno-sanitize-debug-trap-reasons โ€” Alias for -fsanitize-debug-trap-reasons=none. alias, bestie. ๐Ÿ”ฅ
  • -fno-sanitize-handler-preserve-all-regs โ€” Disable handlers with preserve_all calling convention. no preserve_all handlers. ๐Ÿ‘‘
  • -fno-sanitize-hwaddress-experimental-aliasing โ€” Disable aliasing mode in HWAddressSanitizer. no HWASan aliasing mode. ๐ŸŒˆ
  • -fno-sanitize-ignorelist โ€” Don't use ignorelist file for sanitizers. no ignorelist file. ๐Ÿ’…
  • -fno-sanitize-memory-param-retval โ€” Disable detection of uninitialized parameters and return values. no param/retval uninit detection. ๐Ÿฆ‹
  • -fno-sanitize-memory-track-origins โ€” Disable origins tracking in MemorySanitizer. no MSan origins tracking. ๐ŸŒธ
  • -fno-sanitize-memory-use-after-dtor โ€” Disable use-after-destroy detection in MemorySanitizer. no use-after-dtor detection. โœจ
  • -fno-sanitize-merge=<value> โ€” Do not allow compiler to merge handlers for specified sanitizers. specified sanitizers, no merge. ๐Ÿ’–
  • -fno-sanitize-merge โ€” Do not allow compiler to merge handlers for any sanitizers. any sanitizers, no merge. ๐Ÿงš
  • -fno-sanitize-recover=<value> โ€” Disable recovery for specified sanitizers. specified sanitizers, no recovery. ๐Ÿ”ฅ
  • -fno-sanitize-stable-abi โ€” Conventional ABI instrumentation for sanitizer runtime. Default: Conventional. default is Conventional, bestie. ๐Ÿ‘‘
  • -fno-sanitize-stats โ€” Disable sanitizer statistics gathering. no sanitizer stats. ๐ŸŒˆ
  • -fno-sanitize-thread-atomics โ€” Disable atomic operations instrumentation in ThreadSanitizer. no TSan atomics instrumentation. ๐Ÿ’…
  • -fno-sanitize-thread-func-entry-exit โ€” Disable function entry/exit instrumentation in ThreadSanitizer. no TSan func entry/exit. ๐Ÿฆ‹
  • -fno-sanitize-thread-memory-access โ€” Disable memory access instrumentation in ThreadSanitizer. no TSan memory access instrumentation. ๐ŸŒธ
  • -fno-sanitize-trap=<value> โ€” Disable trapping for specified sanitizers. specified sanitizers, no trap. โœจ
  • -fno-sanitize-trap โ€” turns OFF trapping for every single sanitizer ๐Ÿ’… no traps, we vibe differently now.
  • -fno-sanitize-type-outline-instrumentation โ€” tells it to use the code inlining logic for the type sanitizer โœจ
  • -fno-short-wchar โ€” forces wchar_t to be an unsigned int, no cap ๐Ÿซถ
  • -fno-show-column โ€” diagnostics will NOT include the column number. bestie loses her coordinates ๐Ÿ˜ญ
  • -fno-show-source-location โ€” no source location info attached to diagnostics at all. it's giving mystery ๐Ÿฆ‹
  • -fno-signed-char โ€” char is unsigned, periodt ๐Ÿ’œ
  • -fno-signed-zeros โ€” allows optimizations that ignore the sign of floating point zeros ๐Ÿ”ฅ (yes it's chaotic, yes it's allowed)
  • -fno-skip-odr-check-in-gmf โ€” performs ODR checks for decls inside the global module fragment ๐Ÿ‘‘
  • -fno-spell-checking โ€” disables spell-checking. typos are my truth now ๐Ÿ’€
  • -fno-split-machine-functions โ€” disables late function splitting using profile information (x86 and aarch64 ELF) ๐ŸŒธ
  • -fno-split-stack โ€” wouldn't use segmented stack. nope, not doing it ๐Ÿ™ˆ
  • -fno-stack-clash-protection โ€” disables stack clash protection โš ๏ธ
  • -fno-stack-protector โ€” disables the use of stack protectors โš ๏ธ
  • -fno-standalone-debug โ€” limits the debug information produced, to reduce the size of the debug binary ๐ŸŽ€
  • -fno-strict-aliasing โ€” disables optimizations based on strict aliasing rules โœจ
  • -fno-strict-float-cast-overflow โ€” relaxes the language rules and tries to match the behavior of the target's native float-to-int conversion instructions ๐Ÿ’…
  • -fno-strict-return โ€” does NOT treat control flow paths that fall off the end of a non-void function as unreachable ๐ŸŒˆ
  • -fno-swift-version-independent-apinotes โ€” disables version-independent external API notes support ๐Ÿ’œ
  • -fno-sycl-add-default-spec-consts-image โ€” turns off generation of the device image where all specialization constant usages are replaced with default values ๐Ÿฆ‹
  • -fno-sycl-allow-device-dependencies โ€” deprecated, bestie: please use -fno-sycl-allow-device-image-dependencies instead ๐Ÿšจ
  • -fno-sycl-allow-device-image-dependencies โ€” does not allow dependencies between device code images (this is the default) ๐Ÿซถ
  • -fno-sycl-cuda-compatibility โ€” disables CUDA compatibility mode ๐Ÿ’€
  • -fno-sycl-dead-args-optimization โ€” disables elimination of DPC++ dead kernel arguments โœจ
  • -fno-sycl-decompose-functor โ€” does not decompose the SYCL functor if possible (experimental, CUDA only) ๐Ÿงš
  • -fno-sycl-device-code-split-esimd โ€” does not split ESIMD and SYCL device code into separate device binary images. has effect only for SPIR-based targets. (experimental) ๐ŸŒธ
  • -fno-sycl-early-optimizations โ€” disables the standard optimization pipeline for the SYCL device compiler ๐Ÿ˜ญ
  • -fno-sycl-esimd-force-stateless-mem โ€” does not enforce using stateless memory accesses ๐Ÿ’…
  • -fno-sycl-explicit-simd โ€” disables the SYCL explicit SIMD extension. (deprecated) โš ๏ธ
  • -fno-sycl-force-inline-kernel-lambda โ€” disallows force inline SYCL kernels lambda in the entry point ๐Ÿ”ฅ
  • -fno-sycl-id-queries-fit-in-int โ€” does not assume that SYCL ID queries fit within MAX_INT ๐Ÿ™ˆ
  • -fno-sycl-instrument-device-code โ€” does not add Instrumentation and Tracing Technology (ITT) instrumentation intrinsics calls (experimental) ๐ŸŽ€
  • -fno-sycl-libspirv โ€” disables the check for libspirv โŒ
  • -fno-sycl-link-spirv โ€” disables adding of the default (spir64) triple when it's discovered in user specified objects and archives ๐ŸŒˆ
  • -fno-sycl-rdc โ€” generates relocatable device code during SYCL offload target compilation. using -fno-sycl-rdc in combination with -c will produce final device binaries within the generated fat object. when you use this option, each kernel must be self-contained within its translation unit (source file). therefore, the use of SYCL_EXTERNAL is disallowed when this option is enabled ๐Ÿ‘‘
  • -fno-sycl-remove-unused-external-funcs โ€” prevents removal of unused SYCL_EXTERNAL functions ๐Ÿ’œ
  • -fno-sycl-unnamed-lambda โ€” disallows unnamed SYCL lambda kernels ๐Ÿฆ‹
  • -fno-sycl-use-bitcode โ€” uses SPIR-V instead of LLVM bitcode in fat objects (deprecated) ๐Ÿšจ
  • -fno-sycl-use-footer โ€” disables usage of the integration footer during SYCL enabled compilations โœจ
  • -fno-sycl โ€” disables SYCL C++ extensions ๐Ÿ’€
  • -fno-system-debug โ€” does not emit debug information for declarations in system headers ๐ŸŒธ
  • -fno-temp-file โ€” directly creates the compilation output files. this may lead to incorrect incremental builds if the compiler crashes โš ๏ธ (fr fr, be careful)
  • -fno-threadsafe-statics โ€” does not emit code to make initialization of local statics thread safe ๐Ÿ™ˆ
  • -fno-trigraphs โ€” does not process trigraph sequences ๐Ÿ’…
  • -fno-unified-lto โ€” uses distinct LTO pipelines ๐ŸŽ€
  • -fno-unique-section-names โ€” does not use unique names for text and data sections ๐Ÿ”ฅ
  • -fno-unroll-loops โ€” turns off the loop unroller ๐Ÿ˜ญ
  • -fno-use-cxa-atexit โ€” doesn't use __cxa_atexit for calling destructors ๐Ÿซถ
  • -fno-use-init-array โ€” uses .ctors/.dtors instead of .init_array/.fini_array ๐ŸŒˆ
  • -fno-verify-intermediate-code โ€” disables verification of LLVM IR ๐Ÿ˜ฌ
  • -fno-visibility-inlines-hidden-static-local-var โ€” disables -fvisibility-inlines-hidden-static-local-var (this is the default on non-darwin targets) โœจ
  • -fno-xray-function-index โ€” omits the function index section, at the expense of single-function patching performance ๐Ÿ’€
  • -fno-zero-initialized-in-bss โ€” doesn't place zero initialized data in BSS ๐Ÿฆ‹
  • -fno-zos-extensions โ€” does not accept non-standard constructs supported by the z/OS compiler ๐Ÿ’œ

  • -fobjc-arc-exceptions โ€” uses EH-safe code when synthesizing retains and releases in -fobjc-arc ๐ŸŽ€
  • -fobjc-arc โ€” synthesizes retain and release calls for Objective-C pointers โœจ
  • -fobjc-avoid-heapify-local-blocks โ€” tries to avoid heapifying local blocks ๐ŸŒธ
  • -fobjc-direct-precondition-thunk โ€” moves precondition checks for direct methods into thunks ๐Ÿ‘‘
  • -fobjc-disable-direct-methods-for-testing โ€” ignores the attribute objc_direct so that direct methods can be tested ๐Ÿงช
  • -fobjc-encode-cxx-class-template-spec โ€” fully encodes c++ class template specialization ๐Ÿ”ฅ
  • -fobjc-exceptions โ€” enables Objective-C exceptions ๐Ÿซถ
  • -fobjc-runtime=<value> โ€” specifies the target Objective-C runtime kind and version ๐Ÿ’…
  • -fobjc-weak โ€” enables ARC-style weak references in Objective-C ๐ŸŒˆ

  • -foffload-fp32-prec-div โ€” fdiv operations in offload device code are required to return correctly rounded results โญ
  • -foffload-fp32-prec-sqrt โ€” sqrt operations in offload device code are required to return correctly rounded results โญ
  • -foffload-implicit-host-device-templates โ€” template functions or specializations without host, device and global attributes have implicit host device attributes (CUDA/HIP only) ๐Ÿฆ‹
  • -foffload-lto=<value> โ€” sets the LTO mode for offload compilation โœจ
  • -foffload-lto โ€” enables LTO in 'full' mode for offload compilation ๐Ÿ”ฅ
  • -foffload-uniform-block โ€” assumes that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise) ๐Ÿ’œ
  • -foffload-via-llvm โ€” uses LLVM/Offload as the portable offloading runtime ๐ŸŽ€

  • -fomit-frame-pointer โ€” omits the frame pointer from functions that don't need it. some stack unwinding cases, such as profilers and sanitizers, may prefer specifying -fno-omit-frame-pointer. on many targets, -O1 and higher omit the frame pointer by default. -m[no-]omit-leaf-frame-pointer takes precedence for leaf functions ๐ŸŒธ
  • -fopenacc โ€” enables OpenACC ๐ŸŒˆ
  • -fopenmp-extensions โ€” enables all Clang extensions for OpenMP directives and clauses โœจ
  • -fopenmp-force-usm โ€” forces behavior as if the user specified pragma omp requires unified_shared_memory ๐Ÿ‘‘
  • -fopenmp-offload-mandatory โ€” does not create a host fallback if offloading to the device fails ๐Ÿ˜ค
  • -fopenmp-simd โ€” emits OpenMP code only for SIMD-based constructs ๐Ÿ’œ
  • -fopenmp-target-debug โ€” enables debugging in the OpenMP offloading device RTL ๐Ÿ›
  • -fopenmp-target-jit โ€” emits code that can be JIT compiled for OpenMP offloading. implies -foffload-lto=full ๐Ÿ”ฅ
  • -fopenmp-targets=<value> โ€” specifies a comma-separated list of triples of OpenMP offloading targets to be supported ๐ŸŽ€
  • -fopenmp-version=<value> โ€” sets the OpenMP version (e.g. 45 for OpenMP 4.5, 51 for OpenMP 5.1). the default value is 51 for Clang ๐Ÿ’…
  • -fopenmp โ€” parses OpenMP pragmas and generates parallel code โœจ
  • -foperator-arrow-depth=<value> โ€” maximum number of 'operator->'s to call for a member access ๐Ÿฆ‹
  • -foptimization-record-file=<file> โ€” specifies the output name of the file containing the optimization remarks. implies -fsave-optimization-record. on Darwin platforms, this cannot be used with multiple -arch <arch> options โš ๏ธ
  • -foptimization-record-passes=<regex> โ€” only includes passes which match a specified regular expression in the generated optimization record (by default, include all passes) ๐Ÿ”
  • -fpack-struct=<value> โ€” specifies the default maximum struct packing alignment ๐Ÿ“ฆ
  • -fpartition-static-data-sections โ€” enables partition static data sections using profile information (x86 and aarch64 ELF) ๐ŸŒธ
  • -fpascal-strings โ€” recognizes and constructs Pascal-style string literals ๐Ÿ’œ
  • -fpass-plugin=<dsopath> โ€” loads pass plugin from a dynamic shared object file (only with new pass manager) ๐Ÿ”Œ
  • -fpatchable-function-entry=<N,M,Section> โ€” generates M NOPs before function entry and N-M NOPs after function entry. if section is specified, use it instead of __patchable_function_entries ๐ŸŽ€
  • -fpcc-struct-return โ€” overrides the default ABI to return all structs on the stack ๐Ÿ“š
  • -fpch-codegen โ€” generates code for uses of this PCH that assumes an explicit object file will be built for the PCH โœจ
  • -fpch-debuginfo โ€” generates debug info for types in an object file built from this PCH, and does not generate them elsewhere ๐Ÿ›
  • -fpch-instantiate-templates โ€” instantiates templates already while building a PCH โšก
  • -fpch-validate-input-files-content โ€” validates PCH input files based on content if mtime differs ๐Ÿ•ต๏ธ
  • -fplugin-arg-<name>-<arg> โ€” passes <arg> to plugin <name> ๐Ÿ’…
  • -fplugin=<dsopath> โ€” loads the named plugin (dynamic shared object) ๐Ÿ”Œ
  • -fprebuilt-implicit-modules โ€” looks up implicit modules in the prebuilt module path ๐Ÿ”
  • -fprebuilt-module-path=<directory> โ€” specifies the prebuilt module path ๐Ÿ“
  • -fpreview-breaking-changes โ€” okay so this is the "we're allowed to break stuff on purpose" flag ๐Ÿ’… It tells the compiler driver and all the compilation phases that backwards compatibility is officially cancelled, no cap. Turn it on and the compiler also defines the macro __INTEL_PREVIEW_BREAKING_CHANGES for you. And bbz, if you pair it with -fsycl, the driver links against a whole alternate form of libsycl called libsycl-preview โœจ
  • -fproc-stat-report=<value> โ€” saves the subprocess statistics into the file you name ๐ŸŽ€
  • -fproc-stat-report<value> โ€” same energy but it just prints the subprocess statistics instead of filing them away ๐Ÿซถ
  • -fprofile-arcs โ€” instruments your code so it produces gcov data files (*.gcda) ๐Ÿ“Š
  • -fprofile-continuous โ€” turns on continuous instrumentation profiling mode, lowkey the vibe of "just keep watching me" ๐Ÿ‘€
  • -fprofile-exclude-files=<value> โ€” instruments only functions from files whose names don't match all the regexes you separated with a semi-colon ๐Ÿ™ˆ
  • -fprofile-filter-files=<value> โ€” the flip side: instruments only functions from files whose names match any regex separated by a semi-colon ๐ŸŽฏ
  • -fprofile-function-groups=<N> โ€” splits the functions into N groups and then you use -fprofile-selected-function-group to pick just group i for instrumentation ๐Ÿงš
  • -fprofile-generate-cold-function-coverage=<directory> โ€” generates instrumented code to collect coverage info for the cold functions (the unpopular ones, we love them anyway) into <directory>/default.profraw โ€” though the LLVM_PROFILE_FILE env var gets to override that ๐Ÿ’œ
  • -fprofile-generate-cold-function-coverage โ€” same coverage-info-for-cold-functions deal, but it lands in a default.profraw file instead (and yes, it's overridden by the = form of the option or by LLVM_PROFILE_FILE) โ„๏ธ
  • -fprofile-generate=<directory> โ€” generates instrumented code that collects execution counts into <directory>/default.profraw, overridable by the LLVM_PROFILE_FILE env var bestie ๐Ÿ“
  • -fprofile-generate โ€” collects those execution counts straight into default.profraw (overridden by LLVM_PROFILE_FILE env var) โœจ
  • -fprofile-instr-generate=<file> โ€” generates instrumented code that collects execution counts into <file>, and yeah LLVM_PROFILE_FILE can override it ๐Ÿ˜Œ
  • -fprofile-instr-generate โ€” collects execution counts into the default.profraw file (overridden by the = form of the option or LLVM_PROFILE_FILE env var) ๐ŸŒธ
  • -fprofile-instr-use=<value> โ€” uses instrumentation data for profile-guided optimization, iconic behavior ๐Ÿซถ
  • -fprofile-list=<value> โ€” a filename that defines the list of functions/files to instrument. The file uses the sanitizer special case list format, iykyk ๐Ÿ’…
  • -fprofile-remapping-file=<file> โ€” uses the remappings described in <file> to match the profile data against names in the program ๐Ÿ”ฅ
  • -fprofile-sample-accurate โ€” says, officially, that the sample profile is accurate. Trust. ๐Ÿ’ฏ
  • -fprofile-sample-use=<value> โ€” enables sample-based profile guided optimizations, main character energy โญ
  • -fprofile-selected-function-group=<i> โ€” pairs with -fprofile-function-groups to split your functions into N groups and instrument only the ones in group i. Valid range is 0 to N-1 inclusive, don't get it twisted ๐ŸŽ€
  • -fprofile-update=<method> โ€” sets the update method of the profile counters ๐Ÿ”ง
  • -fprofile-use=<pathname> โ€” uses instrumentation data for profile-guided optimization. If <pathname> is a directory it reads from <pathname>/default.profdata; otherwise it reads from the file <pathname> ๐Ÿ—‚๏ธ
  • -fprotect-parens โ€” decides whether the optimizer actually honors your parentheses when it evaluates floating-point expressions. The way that matters ๐Ÿ˜ญ
  • -fpseudo-probe-for-profiling โ€” emits pseudo probes for sample profiling ๐Ÿงš
  • -fptrauth-auth-traps โ€” enables traps on authentication failures ๐Ÿชค
  • -fptrauth-block-descriptor-pointers โ€” enables signing and authentication of block descriptors ๐Ÿ”
  • -fptrauth-calls โ€” enables signing and authentication of all indirect calls ๐Ÿ‘‘
  • -fptrauth-elf-got โ€” enables authentication of pointers from the GOT (ELF only, so don't come at me on other formats) ๐Ÿง
  • -fptrauth-function-pointer-type-discrimination โ€” enables type discrimination on C function pointers ๐ŸŽฏ
  • -fptrauth-indirect-gotos โ€” enables signing and authentication of indirect goto targets ๐Ÿš€
  • -fptrauth-init-fini-address-discrimination โ€” enables address discrimination of function pointers in init/fini arrays ๐Ÿ“
  • -fptrauth-init-fini โ€” enables signing of function pointers in init/fini arrays โœ๏ธ
  • -fptrauth-intrinsics โ€” enables pointer authentication intrinsics ๐Ÿงฉ
  • -fptrauth-objc-class-ro โ€” enables signing and authentication for ObjC class_ro pointers ๐ŸŽ
  • -fptrauth-objc-interface-sel โ€” enables signing and authentication of an Objective-C object's 'SEL' fields ๐Ÿท๏ธ
  • -fptrauth-objc-isa โ€” enables signing and authentication of an Objective-C object's 'isa' field ๐Ÿชช
  • -fptrauth-returns โ€” enables signing and authentication of return addresses โ†ฉ๏ธ
  • -fptrauth-type-info-vtable-pointer-discrimination โ€” enables type and address discrimination of the vtable pointer of std::type_info ๐Ÿงฌ
  • -fptrauth-vtable-pointer-address-discrimination โ€” enables address discrimination of vtable pointers ๐Ÿ“Œ
  • -fptrauth-vtable-pointer-type-discrimination โ€” enables type discrimination of vtable pointers ๐Ÿ”
  • -frandomize-layout-seed-file=<file> โ€” the file holding the seed used by the randomize structure layout feature ๐ŸŽฒ
  • -frandomize-layout-seed=<seed> โ€” the actual seed used by the randomize structure layout feature ๐ŸŒฑ
  • -fraw-string-literals โ€” enables raw string literals ๐Ÿชข
  • -freciprocal-math โ€” allows division operations to be reassociated, which is giving "math but make it flexible" ๐Ÿงฎ
  • -freg-struct-return โ€” overrides the default ABI so small structs get returned in registers ๐Ÿ“ฆ
  • -fregister-global-dtors-with-atexit โ€” uses atexit or __cxa_atexit to register global destructors ๐Ÿงน
  • -fropi โ€” generates read-only position independent code (ARM 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, so it's just doing its thing) ๐ŸชŸ
  • -frwpi โ€” generates read-write position independent code (ARM only) ๐Ÿฆพ
  • -fsafe-buffer-usage-suggestions โ€” displays suggestions to update code associated with -Wunsafe-buffer-usage warnings ๐Ÿ’ก
  • -fsample-profile-use-profi โ€” uses profi to infer block and edge counts ๐Ÿ“ˆ
  • -fsanitize-address-destructor=<value> โ€” sets the kind of module destructors emitted by AddressSanitizer instrumentation. These destructors get emitted to unregister instrumented global variables when code is unloaded (like, for example, via dlclose()) ๐Ÿงผ
  • -fsanitize-address-field-padding=<value> โ€” the level of field padding for AddressSanitizer ๐Ÿ›‹๏ธ
  • -fsanitize-address-globals-dead-stripping โ€” enables linker dead stripping of globals in AddressSanitizer ๐Ÿ—‘๏ธ
  • -fsanitize-address-outline-instrumentation โ€” always generates function calls for address sanitizer instrumentation ๐Ÿ“ž
  • -fsanitize-address-poison-custom-array-cookie โ€” enables poisoning array cookies when using custom operator new[] in AddressSanitizer ๐Ÿช
  • -fsanitize-address-use-after-return=<mode> โ€” selects the mode of detecting stack use-after-return in AddressSanitizer ๐Ÿ•ต๏ธ
  • -fsanitize-address-use-after-scope โ€” enables use-after-scope detection in AddressSanitizer ๐Ÿ”Ž
  • -fsanitize-address-use-odr-indicator โ€” enables ODR indicator globals to avoid false ODR violation reports in partially sanitized programs โ€” at the cost of an increase in binary size, so it's giving tradeoff energy ๐Ÿ’€
  • -fsanitize-alloc-token-extended โ€” enables extended coverage to custom allocation functions โž•
  • -fsanitize-alloc-token-fast-abi โ€” uses the AllocToken fast ABI โšก
  • -fsanitize-annotate-debug-info=<value> โ€” annotates sanitizer instrumentation with extra debug info for the sanitizers you specify, if that's supported ๐Ÿท๏ธ
  • -fsanitize-annotate-debug-info โ€” lets the compiler annotate sanitizer instrumentation with extra debug info for all sanitizers, where supported ๐ŸŒˆ
  • -fsanitize-cfi-canonical-jump-tables โ€” makes the jump table addresses canonical in the symbol table ๐Ÿ“š
  • -fsanitize-cfi-cross-dso โ€” enables control flow integrity (CFI) checks for cross-DSO calls ๐Ÿ›‚
  • -fsanitize-cfi-icall-experimental-normalize-integers โ€” normalizes integers in CFI indirect call type signature checks ๐Ÿ”ข
  • -fsanitize-cfi-icall-generalize-pointers โ€” generalizes pointers in CFI indirect call type signature checks ๐Ÿช„
  • -fsanitize-coverage-allowlist=<value> โ€” restricts sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list โ€” except the blocked ones ๐Ÿ™…
  • -fsanitize-coverage-ignorelist=<value> โ€” disables sanitizer coverage instrumentation for modules and functions that match the provided special case list โ€” even the allowed ones ๐Ÿ™…
  • -fsanitize-coverage-stack-depth-callback-min=<M> โ€” uses a callback for max stack depth tracing with a minimum stack depth of <M> ๐Ÿ“‰
  • -fsanitize-coverage=<value> โ€” specifies the type of coverage instrumentation for Sanitizers ๐ŸŽ›๏ธ
  • -fsanitize-debug-trap-reasons=<value> โ€” sets how trap reasons get emitted:
    • none โ€” not emitted at all. This gives the smallest debug info ๐Ÿœ
    • basic โ€” emits a fixed trap message per check type. This increases the debug info size, but not as much as detailed ๐Ÿ•
    • detailed โ€” emits a more detailed trap message. This increases the debug info size the most ๐Ÿ˜

Default is detailed ๐ŸŽ€

  • -fsanitize-debug-trap-reasons โ€” an alias for -fsanitize-debug-trap-reasons=detailed โœจ
  • -fsanitize-handler-preserve-all-regs โ€” enables handlers with the preserve_all calling convention ๐Ÿ’พ
  • -fsanitize-hwaddress-abi=<value> โ€” selects the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). Heads up bestie: this option is currently unused ๐Ÿ’€
  • -fsanitize-hwaddress-experimental-aliasing โ€” enables aliasing mode in HWAddressSanitizer ๐Ÿงช
  • -fsanitize-ignorelist=<value> โ€” the path to the ignorelist file for sanitizers ๐Ÿšซ
  • -fsanitize-kcfi-arity โ€” embeds function arity information into the KCFI patchable function prefix ๐Ÿงท
  • -fsanitize-kcfi-hash=<value> โ€” selects the hash algorithm for KCFI type IDs (xxHash64, FNV-1a) #๏ธโƒฃ
  • -fsanitize-memory-param-retval โ€” enables detection of uninitialized parameters and return values ๐Ÿ•ณ๏ธ
  • -fsanitize-memory-track-origins=<value> โ€” enables origins tracking in MemorySanitizer ๐ŸŒณ
  • -fsanitize-memory-track-origins โ€” turns on origins tracking inside MemorySanitizer, so bestie, when it yells at you it can actually tell you where the uninitialized thing came from ๐Ÿ•ต๏ธโ™€๏ธ
  • -fsanitize-memory-use-after-dtor โ€” enables use-after-destroy detection in MemorySanitizer. yes, using a thing after its destructor ran. we're catching that ๐Ÿ’€
  • -fsanitize-memtag-mode=<value> โ€” sets the default MTE mode. Valid vibe check: 'sync' (which is the default) or 'async' โœจ
  • -fsanitize-merge=<value> โ€” lets the compiler merge handlers for the sanitizers you name
  • -fsanitize-merge โ€” same energy but for all the sanitizers, no picking and choosing ๐Ÿ’…
  • -fsanitize-recover=<value> โ€” enables recovery for the specified sanitizers
  • -fsanitize-skip-hot-cutoff=<value> โ€” excludes sanitization for the top hottest code responsible for the given fraction of PGO counters. The scale is: 0.0 [default] = skip none; 1.0 = skip all. Argument format is literally:
<sanitizer1>=<value1>,<sanitizer2>=<value2>,...
  • -fsanitize-stable-abi โ€” stable ABI instrumentation for the sanitizer runtime. Default: Conventional ๐Ÿ”’
  • -fsanitize-stats โ€” enables sanitizer statistics gathering.
  • -fsanitize-system-ignorelist=<value> โ€” the path to the system ignorelist file for sanitizers ๐Ÿ™ˆ
  • -fsanitize-thread-atomics โ€” enables atomic operations instrumentation in ThreadSanitizer (and that's the default, so it's already on, you're welcome)
  • -fsanitize-thread-func-entry-exit โ€” enables function entry/exit instrumentation in ThreadSanitizer (default, bestie)
  • -fsanitize-thread-memory-access โ€” enables memory access instrumentation in ThreadSanitizer (default ๐Ÿซถ)
  • -fsanitize-trap=<value> โ€” enables trapping for the specified sanitizers
  • -fsanitize-trap โ€” enables trapping for every single sanitizer, all of them, periodt
  • -fsanitize-type-outline-instrumentation โ€” always generate function calls for type sanitizer instrumentation
  • -fsanitize-undefined-ignore-overflow-pattern=<value> โ€” specify the overflow patterns to exclude from arithmetic sanitizer instrumentation
  • -fsanitize-undefined-strip-path-components=<number> โ€” strip a given number of path components when emitting check metadata โ€” or, if the number is negative, keep only that many ๐ŸŽ€
  • -fsanitize=<check> โ€” turn on runtime checks for various forms of undefined or suspicious behavior. see the user manual for the available checks, iykyk
  • -fsave-optimization-record=<format> โ€” generate an optimization record file in a specific format
  • -fsave-optimization-record โ€” generate a YAML optimization record file ๐ŸŒธ
  • -fseh-exceptions โ€” use SEH style exceptions
  • -fseparate-named-sections โ€” use separate unique sections for named sections (ELF only, bestie)
  • -fshort-enums โ€” allocate to an enum type only as many bytes as it needs for the declared range of possible values. minimalism โœจ
  • -fshort-wchar โ€” 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 โ€” show skipped includes in -H output.
  • -fsigned-char โ€” char is signed. that's the whole thing. iconic honestly
  • -fsized-deallocation โ€” enables C++14 sized global deallocation functions
  • -fsjlj-exceptions โ€” use SjLj style exceptions
  • -fskip-odr-check-in-gmf โ€” skip ODR checks for decls in the global module fragment.
  • -fslp-vectorize โ€” enables the superword-level parallelism vectorization passes โšก
  • -fspell-checking-limit=<value> โ€” set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit). your typos are safe, girl
  • -fsplit-dwarf-inlining โ€” provide minimal debug info in the object/executable so you can still get online symbolication/stack traces when .dwo/.dwp files aren't around, as long as you're using Split DWARF
  • -fsplit-lto-unit โ€” enables splitting of the LTO unit
  • -fsplit-machine-functions โ€” enable late function splitting using profile information (x86 and aarch64 ELF)
  • -fsplit-stack โ€” use segmented stack
  • -fstack-clash-protection โ€” enable stack clash protection ๐Ÿ›ก๏ธ
  • -fstack-protector-all โ€” enable stack protectors for all functions, no exceptions, everyone gets one
  • -fstack-protector-strong โ€” enable stack protectors for some functions vulnerable to stack smashing. compared to -fstack-protector, this one uses a stronger heuristic that includes functions containing arrays of any size (and any type), plus any calls to alloca or the taking of an address from a local variable ๐Ÿ’ช
  • -fstack-protector โ€” enable stack protectors for some functions vulnerable to stack smashing. this uses a loose heuristic which considers functions vulnerable if they contain a char (or 8bit integer) array or constant sized calls to alloca, which are of greater size than ssp-buffer-size (default: 8 bytes). all variable sized calls to alloca are considered vulnerable. a function with a stack protector has a guard value added to the stack frame that gets checked on function exit. the guard value must be positioned in the stack frame such that a buffer overflow from a vulnerable variable will overwrite the guard value before overwriting the function's return address. the reference stack guard value is stored in a global variable. okay that was a lot but like, stack safety is the moment ๐ŸŽ€
  • -fstack-size-section โ€” emit a section containing metadata on function stack sizes
  • -fstack-usage โ€” emit a .su file containing information on function stack sizes
  • -fstandalone-debug โ€” emit full debug info for all types used by the program
  • -fstrict-aliasing โ€” enable optimizations based on strict aliasing rules
  • -fstrict-enums โ€” enable optimizations based on the strict definition of an enum's value range
  • -fstrict-flex-arrays=<n> โ€” enable optimizations based on the strict definition of flexible arrays.
  • -fstrict-float-cast-overflow โ€” assume that overflowing float-to-int casts are undefined (that's the default, so like, heads up ๐Ÿซฃ)
  • -fstrict-vtable-pointers โ€” enable optimizations based on the strict rules for overwriting polymorphic C++ objects
  • -fswift-async-fp=<option> โ€” control emission of Swift async extended frame info
  • -fswift-version-independent-apinotes โ€” enable version-independent external API notes support
  • -fsycl-add-default-spec-consts-image โ€” generates a copy of every device image that uses a specialization constant and replaces all usages of specialization constant with default values specified by specialization_id. if a device image does not use a specialization constant at all then no copy is generated. this option is only useful if used in conjunction with Ahead of Time Compilation (-fsycl-target command line option). got it? good ๐Ÿ’…
  • -fsycl-allow-device-dependencies โ€” deprecated: please use -fsycl-allow-device-image-dependencies instead. girl, upgrade
  • -fsycl-allow-device-image-dependencies โ€” allow dependencies between device code images
  • -fsycl-cuda-compatibility โ€” enable CUDA compatibility mode (experimental). enables the use of CUDA device code with SYCL device code. under this mode, a SYCL device function can call a CUDA device function (but not the other way around, so no reverse uno). this implies the definition of CUDA macros and the inclusion of implicit header files.
  • -fsycl-dead-args-optimization โ€” enables elimination of DPC++ dead kernel arguments ๐Ÿ—‘๏ธ
  • -fsycl-decompose-functor โ€” do decompose SYCL functor if possible (experimental, CUDA only)
  • -fsycl-default-sub-group-size <value> โ€” set the default sub group size for SYCL kernels
  • -fsycl-device-code-split-esimd โ€” split ESIMD device code from SYCL into a separate device binary image (that's the default). only has effect for SPIR-based targets. (experimental) ๐Ÿงช
  • -fsycl-device-code-split=<value> โ€” perform SYCL device code split. the options are: per_kernel (device code module is created for each SYCL kernel) | per_source (device code module is created for each source (translation unit)) | off (no device code split) | auto (use heuristic to select the best way of splitting device code). default is 'auto' โ€” use heuristic to distribute device code across modules โœจ
  • -fsycl-device-code-split โ€” perform SYCL device code split in the 'auto' mode, i.e. use heuristic to distribute device code across modules
  • -fsycl-device-obj=<value> โ€” specify format of device code stored in the resulting object. valid values are: spirv, asm, llvmir (default) ๐ŸŽ€
  • -fsycl-device-only โ€” compile SYCL kernels for device
  • -fsycl-disable-range-rounding โ€” deprecated: please use -fsycl-range-rounding=disable instead.
  • -fsycl-dump-device-code=<value> โ€” dump device code into the user provided directory. (deprecated, bestie, it's giving legacy)
  • -fsycl-early-optimizations โ€” enable standard optimization pipeline for SYCL device compiler
  • -fsycl-embed-ir โ€” embed LLVM IR for runtime kernel fusion ๐Ÿ”ฅ
  • -fsycl-esimd-force-stateless-mem โ€” enforce using stateless memory accesses. convert stateful accesses via SYCL accessors to stateless within ESIMD kernels. enabled by default.
  • -fsycl-exp-range-rounding โ€” use experimental range rounding.
  • -fsycl-explicit-simd โ€” enable SYCL explicit SIMD extension. (deprecated)
  • -fsycl-footer-path=<value> โ€” specify the location of the temporary source file with the included integration footer
  • -fsycl-force-inline-kernel-lambda โ€” allow force inline SYCL kernels lambda in entry point
  • -fsycl-force-target=<value> โ€” force the usage of the given triple when extracting device code from any given objects on the command line
  • -fsycl-fp32-prec-sqrt โ€” SYCL only. specify that single precision floating-point sqrt is correctly rounded. (deprecated)
  • -fsycl-fp64-conv-emu โ€” enable fp64 partial emulation for kernels with only fp64 conversion operations and no fp64 computation operations (requires Intel GPU backend supporting fp64 partial emulation).
  • -fsycl-help=<value> โ€” emit help information from the related offline compilation tool. valid values: all, 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 โ€” bestie, you're telling it to assume that SYCL ID queries fit within MAX_INT. Justโ€ฆ trust the vibes. โœจ
  • -fsycl-instrument-device-code โ€” adds Instrumentation and Tracing Technology (ITT) instrumentation intrinsics calls ๐Ÿซถ (experimental, so likeโ€ฆ it's giving beta energy)
  • -fsycl-libspirv-path=<value> โ€” the path to the libspirv library, bestie ๐Ÿ“
  • -fsycl-link โ€” generate a partially linked device object that's meant to be used with the host link ๐Ÿ”—
  • -fsycl-max-parallel-link-jobs=<value> โ€” controls the max parallelism of actions performed on SYCL device code post-link โ€” aka the generation of SPIR-V device images, or the AOT compilation of each device image ๐ŸŒ€ (experimental)
  • -fsycl-optimize-non-user-code โ€” this one runs with -O0: it optimizes the SYCL framework utility functions but leaves your kernel code unoptimized, so your stuff stays untouched โ„๏ธ (experimental)
  • -fsycl-range-rounding=<value> โ€” your options for range rounding of SYCL range kernels: disable (do not generate range rounded kernels), force (only generate range rounded kernels), on (generate range rounded kernels as well as unrounded kernels). The default is 'on' ๐Ÿ’ซ
  • -fsycl-remove-unused-external-funcs โ€” allow removal of unused SYCL_EXTERNAL functions (this is the default, no cap) ๐Ÿงน
  • -fsycl-targets=<value> โ€” specify a comma-separated list of triples of SYCL offloading targets to be supported ๐ŸŽฏ
  • -fsycl-unnamed-lambda โ€” allow unnamed SYCL lambda kernels, anonymous icon behavior ๐Ÿ’…
  • -fsycl-use-bitcode โ€” use LLVM bitcode instead of SPIR-V in fat objects. deprecated, so likeโ€ฆ it's on its way out ๐Ÿ‘‹
  • -fsyclbin=<value> โ€” outputs in the SYCLBIN binary format in the state specified by <arg> (input, object, or executable โ€” the default) ๐Ÿ“ฆ
  • -fsycl โ€” enable SYCL C++ extensions ๐Ÿ”ฅ
  • -fsyntax-only โ€” run the preprocessor, parser and semantic analysis stages. That's it, that's the whole job ๐Ÿง 
  • -fsystem-debug โ€” emit debug information for declarations in system headers ๐Ÿ›
  • -fsystem-module โ€” build this module as a system module. Only used with -emit-module ๐Ÿงฉ
  • -ftarget-compile-fast โ€” experimental feature: reduce target compilation time, with a potential runtime performance trade-off. Speedy trade-off arc โšก
  • -ftarget-export-symbols โ€” expose exported symbols in a generated target library so they're visible to other modules ๐Ÿ‘€
  • -ftarget-register-alloc-mode=<value> โ€” specify a register allocation mode for specific hardware, for use by supported target backends ๐ŸŽ›๏ธ
  • -ftemplate-backtrace-limit=<value> โ€” set the maximum number of entries to print in a template instantiation backtrace (0 = no limit, go off I guess) ๐Ÿ“œ
  • -ftemplate-depth=<value> โ€” set the maximum depth of recursive template instantiation ๐Ÿ•ณ๏ธ
  • -ftemporal-profile โ€” generate instrumented code to collect temporal information โฑ๏ธ
  • -ftest-coverage โ€” produce gcov notes files (*.gcno) ๐Ÿ“
  • -fthin-link-bitcode=<value> โ€” write minimized bitcode to <file> for the ThinLTO thin link only ๐Ÿงต
  • -fthinlto-distributor=<path> โ€” path to the ThinLTO distributor process. If you specify it, ThinLTO backend compilations get distributed by LLD ๐Ÿ“ก
  • -fthinlto-index=<value> โ€” perform ThinLTO importing using the provided function summary index ๐Ÿ“‡
  • -ftime-report=<value> โ€” (for new pass manager) 'per-pass': one report for each pass; 'per-pass-run': one report for each pass invocation ๐Ÿ“Š
  • -ftime-trace-granularity=<value> โ€” minimum time granularity (in microseconds) traced by the time profiler ๐Ÿ”ฌ
  • -ftime-trace-verbose<value> โ€” make time trace capture verbose event details (e.g. source filenames). Heads up: this can increase the size of the output by 2-3 times ๐Ÿ˜ณ
  • -ftime-trace=<value> โ€” similar to -ftime-trace. Specify the JSON file, or a directory which will contain the JSON file ๐Ÿ—‚๏ธ
  • -ftime-trace โ€” turn on the time profiler. Generates a JSON file based on the output filename ๐Ÿ•ฐ๏ธ
  • -ftrap-function=<value> โ€” issue a call to the specified function rather than a trap instruction ๐Ÿชค
  • -ftrapv-handler=<function name> โ€” specify the function to be called on overflow ๐Ÿšจ
  • -ftrapv โ€” trap on integer overflow, periodt ๐Ÿ›‘
  • -ftrigraphs โ€” process trigraph sequences ๐ŸŽ€
  • -ftrivial-auto-var-init-max-size=<value> โ€” stop initializing trivial automatic stack variables if the var size exceeds the specified number of instances (in bytes) ๐Ÿ“
  • -ftrivial-auto-var-init-stop-after=<value> โ€” stop initializing trivial automatic stack variables after the specified number of instances โœ‹
  • -ftrivial-auto-var-init=<value> โ€” initialize trivial automatic stack variables. Defaults to 'uninitialized' ๐ŸŒฑ
  • -funified-lto โ€” use the unified LTO pipeline ๐Ÿ”„
  • -funique-basic-block-section-names โ€” use unique names for basic block sections (ELF only) ๐Ÿท๏ธ
  • -funique-internal-linkage-names โ€” uniqueify internal linkage symbol names by appending the MD5 hash of the module path #๏ธโƒฃ
  • -funique-source-file-identifier=<value> โ€” specify the source file identifier for -funique-source-file-names; it uses the source file path if you don't specify one ๐Ÿ”–
  • -funique-source-file-names โ€” allow the compiler to assume that each translation unit has a unique source file identifier (see -funique-source-file-identifier) at link time ๐Ÿงฌ
  • -funroll-loops โ€” turn on the loop unroller ๐ŸŒ€
  • -funsafe-math-optimizations โ€” allow unsafe floating-point math optimizations, which may decrease precision. unsafe, babe, it says it right there โš ๏ธ
  • -fuse-cuid=<value> โ€” the method used to generate ID's for compilation units for the single source offloading languages CUDA and HIP: 'hash' (ID's generated by hashing the file path and command line options) | 'random' (ID's generated as random numbers) | 'none' (disabled). Default is 'hash'. Heads up: this option will be overridden by the option '-cuid=[ID]' if it's specified ๐Ÿ†”
  • -fuse-line-directives โ€” use #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,libmvec} implies -fno-math-errno. Note: -fveclib=libmvec on AArch64 requires GLIBC 2.40 or newer ๐Ÿงฎ
  • -fvectorize โ€” enable the loop vectorization passes ๐ŸŽ๏ธ
  • -fverbose-asm โ€” generate verbose assembly output ๐Ÿ—ฃ๏ธ
  • -fverify-intermediate-code โ€” enable verification of LLVM IR โœ…
  • -fvirtual-function-elimination โ€” enables dead virtual function elimination optimization. Requires -flto=full ๐Ÿ’€
  • -fvisibility-dllexport=<value> โ€” the visibility for dllexport definitions. If Keep is specified the visibility is not adjusted [-fvisibility-from-dllstorageclass] ๐Ÿ‘๏ธ
  • -fvisibility-externs-dllimport=<value> โ€” the visibility for dllimport external declarations. If Keep is specified the visibility is not adjusted [-fvisibility-from-dllstorageclass] ๐Ÿ‘๏ธ
  • -fvisibility-externs-nodllstorageclass=<value> โ€” the visibility for external declarations without an explicit DLL storage class. If Keep is specified the visibility is not adjusted [-fvisibility-from-dllstorageclass] ๐Ÿ‘๏ธ
  • -fvisibility-from-dllstorageclass โ€” override the visibility of globals based on their final DLL storage class ๐Ÿ”
  • -fvisibility-global-new-delete-hidden โ€” give global C++ operator new and delete declarations hidden visibility ๐Ÿ™ˆ
  • -fvisibility-global-new-delete=<value> โ€” the visibility for global C++ operator new and delete declarations. If 'source' is specified the visibility is not adjusted ๐ŸŽš๏ธ
  • -fvisibility-inlines-hidden-static-local-var โ€” when -fvisibility-inlines-hidden is enabled, static variables in inline C++ member functions will also be given hidden visibility by default ๐Ÿซฅ
  • -fvisibility-inlines-hidden โ€” give inline C++ member functions hidden visibility by default ๐Ÿซฅ
  • -fvisibility-ms-compat โ€” give global types 'default' visibility and global functions and variables 'hidden' visibility by default ๐Ÿค
  • -fvisibility-nodllstorageclass=<value> โ€” the visibility for definitions without an explicit DLL storage class. If Keep is specified the visibility is not adjusted [-fvisibility-from-dllstorageclass] ๐Ÿ‘๏ธ
  • -fvisibility=<value> โ€” set the default symbol visibility for all global definitions ๐ŸŒ
  • -fwasm-exceptions โ€” use WebAssembly style exceptions ๐Ÿงฑ
  • -fwhole-program-vtables โ€” enables whole-program vtable optimization. Requires -flto ๐Ÿ”—
  • -fwinx64-eh-unwindv2=<value> โ€” generate unwind v2 (epilog) information for x64 Windows ๐ŸชŸ
  • -fwrapv-pointer โ€” treat pointer overflow as two's complement ๐Ÿ”
  • -fwrapv โ€” treat signed integer overflow as two's complement ๐Ÿ”
  • -fwritable-strings โ€” store string literals as writable data โœ๏ธ
  • -fxl-pragma-pack โ€” enable IBM XL #pragma pack handling ๐Ÿ“š
  • -fxray-always-emit-customevents โ€” always emit __xray_customevent(...) calls, even if the containing function is not always instrumented ๐Ÿ“ข
  • -fxray-always-emit-typedevents โ€” always emit __xray_typedevent(...) calls, even if the containing function is not always instrumented ๐Ÿ“ข
  • -fxray-always-instrument=<value> โ€” DEPRECATED: filename defining the whitelist for imbuing the 'always instrument' XRay attribute ๐Ÿšซ
  • -fxray-attr-list=<value> โ€” filename defining the list of functions/types for imbuing XRay attributes ๐Ÿ“‹
  • -fxray-function-groups=<value> โ€” only instrument 1 of N groups ๐ŸŽฒ
  • -fxray-ignore-loops โ€” don't instrument functions with loops unless they also meet the minimum function size โžฐ
  • -fxray-instruction-threshold=<value> โ€” sets the minimum function size to instrument with XRay ๐Ÿ“
  • -fxray-instrumentation-bundle=<value> โ€” select which XRay instrumentation points to emit. Options: all, none, function-entry, function-exit, function, custom. Default is 'all'. Note that 'function' includes both 'function-entry' and 'function-exit' ๐ŸŽ
  • -fxray-instrument โ€” generate XRay instrumentation sleds on function entry and exit ๐Ÿ›ท
  • -fxray-link-deps โ€” link the XRay runtime library when -fxray-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> โ€” bestie this one only makes sense if you're already using -fxray-function-groups, and it picks which group of functions gets instrumented. Valid range is 0 to fxray-function-groups - 1. that's it, that's the whole thought ๐Ÿ’…
  • -fxray-shared โ€” turn on shared library instrumentation with XRay โœจ
  • -fzero-call-used-regs=<value> โ€” clear the call-used registers when a function returns (AArch64/x86 only, so if you're on something elseโ€ฆ not for you bb ๐Ÿซถ)
  • -fzos-extensions โ€” accept some non-standard constructs that the z/OS compiler happens to support
  • -fzvector โ€” enable the System z vector language extension โญ
  • -F <value> โ€” add a directory to the framework include search path ๐ŸŽ€
  • -gcall-site-info โ€” enable call site debug info
  • --gcc-install-dir=<value> โ€” use the GCC installation sitting in the directory you name. The directory ends with path components like lib{,32,64}/gcc{,-cross}/$triple/$version. > heads up bestie: executables (like ld) that the compiler uses are not overridden by the selected GCC installation. no cap, that's the fine print ๐Ÿ’€
  • --gcc-toolchain=<value> โ€” point Clang at a directory where it can find include and lib{,32,64}/gcc{,-cross}/$triple/$version. Clang will pick the GCC installation with the largest version ๐Ÿ‘‘
  • --gcc-triple=<value> โ€” search for the GCC installation using the triple you specify
  • -gcodeview-command-line โ€” emit the compiler path and command line straight into CodeView debug information
  • -gcodeview-ghash โ€” emit type record hashes into a .debug$H section
  • -gcodeview โ€” generate CodeView debug information
  • -gdwarf-2 โ€” generate source-level debug info with DWARF version 2
  • -gdwarf-3 โ€” generate source-level debug info with DWARF version 3
  • -gdwarf-4 โ€” generate source-level debug info with DWARF version 4
  • -gdwarf-5 โ€” generate source-level debug info with DWARF version 5
  • -gdwarf-6 โ€” generate source-level debug info with DWARF version 6 ๐Ÿฆ‹
  • -gdwarf32 โ€” enables DWARF32 format for ELF binaries, but only if debug information emission is enabled in the first place
  • -gdwarf64 โ€” enables DWARF64 format for ELF binaries, again only if debug information emission is enabled
  • -gdwarf โ€” generate source-level debug info with the default DWARF version
  • -gembed-source โ€” embed the source text inside DWARF debug sections ๐ŸŒธ
  • -gen-reproducer=<value> โ€” emit a reproducer, and the options are: off, crash (that's the default bb), error, always
  • -gkey-instructions โ€” enable Key Instructions, which makes debug stepping in optimized C/C++ code less jumpy in some debuggers. DWARF only โœจ
  • -gline-directives-only โ€” emit debug line info directives only
  • -gline-tables-only โ€” emit debug line number tables only
  • -gmodules โ€” generate debug info with external references to clang modules or precompiled headers
  • -gno-call-site-info โ€” disable call site debug info (the anti--gcall-site-info, iconic honestly)
  • -gno-codeview-command-line โ€” don't emit the compiler path and command line into CodeView debug information
  • -gno-embed-source โ€” restore the default behavior of not embedding source text in DWARF debug sections
  • -gno-inline-line-tables โ€” don't emit inline line tables. periodt.
  • --gpu-bundle-output โ€” bundle the output files of HIP device compilation ๐ŸŽ€
  • --gpu-instrument-lib=<value> โ€” instrument device library for HIP, which is an LLVM bitcode containing __cyg_profile_func_enter and __cyg_profile_func_exit
  • --gpu-max-threads-per-block=<value> โ€” the default max threads per block for kernel launch bounds for HIP
  • -gpulibc โ€” link the LLVM C Library for GPUs ๐ŸŒˆ
  • -gsplit-dwarf=<value> โ€” set the DWARF fission mode
  • -gstrict-dwarf โ€” restrict DWARF features to only the ones defined in the specified version, so you don't sneak in features from later versions. no gatecrashing ๐Ÿ’…
  • -gstructor-decl-linkage-names โ€” attach linkage names to C++ constructor/destructor declarations in DWARF
  • -gz=<value> โ€” the compression type for DWARF debug sections
  • -G <size> โ€” put objects of at most size bytes into the small data section (MIPS / Hexagon)
  • -g โ€” generate source-level debug information. the classic. the blueprint. ๐Ÿ‘‘
  • --help-hidden โ€” display help for hidden options (yes bestie, the secret menu ๐Ÿ™ˆ)
  • -help โ€” display available options
  • --hip-device-lib=<value> โ€” HIP device library
  • --hip-link โ€” link clang-offload-bundler bundles for HIP ๐Ÿ”ฅ
  • --hip-path=<value> โ€” the HIP runtime installation path, used for finding the HIP version and adding the HIP include path
  • --hip-version=<value> โ€” HIP version in the format 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 a 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 this option disables it ๐ŸŽ€
  • -idirafter <value> โ€” add a directory to the AFTER include search path
  • -iframeworkwithsysroot <directory> โ€” add a directory to the SYSTEM framework search path; absolute paths are relative to -isysroot
  • -iframework <value> โ€” add a directory to the SYSTEM framework search path
  • -ignore-pch โ€” disable precompiled headers; this overrides -emit-pch and -include-pch ๐Ÿ’€
  • -imacros <file> โ€” include macros from file before parsing
  • -include-pch <file> โ€” include a precompiled header file
  • -include <file> โ€” include file before parsing
  • -iprefix <dir> โ€” set the -iwithprefix/-iwithprefixbefore prefix
  • -iquote <directory> โ€” add a directory to the QUOTE include search path
  • -isysroot <dir> โ€” set the system root directory (usually /) ๐ŸŒธ
  • -isystem-after <directory> โ€” add a directory to the end of the SYSTEM include search path
  • -isystem <directory> โ€” add a directory to the SYSTEM include search path
  • -ivfsoverlay <value> โ€” overlay the virtual filesystem described by file on top of the real file system ๐Ÿฆ‹
  • -iwithprefixbefore <dir> โ€” set a directory to the include search path with prefix
  • -iwithprefix <dir> โ€” set a directory to the SYSTEM include search path with prefix
  • -iwithsysroot <directory> โ€” add a directory to the SYSTEM include search path; absolute paths are relative to -isysroot
  • -I <dir> โ€” add a directory to the end of the list of include search paths
  • --libclc-lib=<value> โ€” namespec of the libclc OpenCL bitcode library to link
  • --libomptarget-amdgcn-bc-path=<value> โ€” path to the libomptarget-amdgcn bitcode library
  • --libomptarget-amdgpu-bc-path=<value> โ€” path to the libomptarget-amdgcn bitcode library (yes bestie, same description as the one above, I'm just telling you what the page says ๐Ÿ™ˆ)
  • --libomptarget-nvptx-bc-path=<value> โ€” path to the libomptarget-nvptx bitcode library
  • --libomptarget-spirv-bc-path=<value> โ€” path to the libomptarget-spirv bitcode library
  • -L <dir> โ€” add a directory to the library search path
  • -mabi=quadword-atomics โ€” enable quadword atomics ABI on AIX (AIX PPC64 only). Uses lqarx/stqcx. instructions โšก
  • -mabicalls โ€” enable SVR4-style position-independent code (Mips only)
  • -maix-shared-lib-tls-model-opt โ€” for a shared library loaded with the main program, change local-dynamic access(es) to initial-exec access(es) at the function level (AIX 64-bit only)
  • -maix-small-local-dynamic-tls โ€” produce a faster access sequence for local-dynamic TLS variables where the offset from the TLS base is encoded as an immediate operand (AIX 64-bit only). > this access sequence is not used for variables larger than 32KB, so don't come crying to me about your giant variable ๐Ÿ’€
  • -maix-small-local-exec-tls โ€” produce a faster access sequence for local-exec TLS variables where the offset from the TLS base is encoded as an immediate operand (AIX 64-bit only). > same deal: not used for variables larger than 32KB
  • -maix-struct-return โ€” return all structs in memory (PPC32 only)
  • -malign-branch-boundary=<value> โ€” specify the boundary's size for aligning branches
  • -malign-branch=<value> โ€” specify which types of branches to align
  • -malign-double โ€” align doubles to two words in structs (x86 only)
  • -maltivec โ€” enable AltiVec vector initializer syntax โœจ
  • -mamdgpu-expand-waitcnt-profiling โ€” expand s_waitcnt instructions to help PC-sampling profilers spot memory stalls. Instead of a single waitcnt(target), it emits waitcnt(N-1), waitcnt(N-2), โ€ฆ, waitcnt(target). (AMDGPU only) ๐Ÿ‘‘
  • -mamdgpu-ieee โ€” sets the IEEE bit in the expected default floating point mode register. Floating point opcodes that support exception flag gathering quiet and propagate signaling NaN inputs per IEEE 754-2008. > this option changes the ABI. (AMDGPU only) โ€” that's a big deal, bestie, don't do it casually ๐Ÿ˜ญ
  • -mamdgpu-precise-memory-op โ€” enable precise memory mode (AMDGPU only)
  • -mannotate-tablejump โ€” enable the annotate table jump instruction so it can be correlated with the jump table
  • -mapx-features=<value> โ€” enable features of APX
  • -mapx-inline-asm-use-gpr32 โ€” enable use of GPR32 in inline assembly for APX
  • -march=<value> โ€” for a list of available architectures for the target, use -mcpu=help ๐ŸŽ€
  • -marm64x<value> โ€” link as a hybrid ARM64X image
  • -mbackchain โ€” link stack frames through backchain on System Z
  • -mbranch-protection=<value> โ€” enforce targets of indirect branches and function returns ๐ŸŒˆ
  • -mbranches-within-32B-boundaries โ€” align selected branches (fused, jcc, jmp) within a 32-byte boundary
  • -mcabac โ€” enable CABAC instructions ๐Ÿ“

  • -mcf-branch-label-scheme=<value> โ€” pick the label scheme for branch control-flow architecture protection โœจ bestie choose your fighter
  • -mcmse โ€” allow use of CMSE (Armv8-M Security Extensions) ๐Ÿ’… secure the bag
  • -mcode-object-version=<value> โ€” specify code object ABI version. Defaults to 6. (AMDGPU only) ๐ŸŽ€
  • -mconstructor-aliases โ€” enable emitting complete constructors and destructors as aliases when possible ๐Ÿ‘‘
  • -mcpu=<value> โ€” for a list of available CPUs for the target use '-mcpu=help' ๐Ÿฆ‹ literally just ask for help
  • -mcrbits โ€” control the CR-bit tracking feature on PowerPC. -mcrbits (the enablement of CR-bit tracking support) is the default 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 โ€” specify CU wavefront execution mode (AMDGPU only) ๐Ÿ’œ
  • -mdaz-ftz โ€” globally set the denormals-are-zero (DAZ) and flush-to-zero (FTZ) bits in the floating-point control register on program startup ๐Ÿ’–
  • -mdefault-visibility-export-mapping=<value> โ€” mapping between default visibility and export โœจ
  • -mdiv32 โ€” use div.w[u] and mod.w[u] instructions with input not sign-extended. ๐Ÿงš
  • -mdouble=<n โ€” force double to be <n> bits ๐Ÿ’€ yes the flag is missing its closing > bestie we don't touch it
  • -MD โ€” write a depfile containing user and system headers ๐ŸŽ€
  • -meabi <value> โ€” set EABI type. Default depends on triple) ๐Ÿ™ˆ stray ) is canon
  • -membedded-data โ€” place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS) ๐ŸŒˆ
  • -menable-experimental-extensions โ€” enable use of experimental RISC-V extensions. ๐Ÿฆ‹
  • -mexec-model=<value> โ€” execution model (WebAssembly only) โญ
  • -mexecute-only โ€” disallow generation of data access to code sections (AArch64/ARM only) ๐Ÿ”ฅ
  • -mextern-sdata โ€” assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS) ๐Ÿ‘‘
  • -mfentry โ€” insert calls to fentry at function entry (x86/SystemZ only) ๐Ÿ’…
  • -mfix-cmse-cve-2021-35465 โ€” work around VLLDM erratum CVE-2021-35465 (ARM only) ๐Ÿ’–
  • -mfix-cortex-a53-835769 โ€” work around Cortex-A53 erratum 835769 (AArch64 only) ๐ŸŽ€
  • -mfix-cortex-a53-843419 โ€” work around Cortex-A53 erratum 843419 (AArch64 only) ๐ŸŒธ
  • -mfix-cortex-a57-aes-1742098 โ€” work around Cortex-A57 Erratum 1742098 (ARM only) ๐Ÿ’œ
  • -mfix-cortex-a72-aes-1655431 โ€” work around Cortex-A72 Erratum 1655431 (ARM only) โœจ
  • -mfix-gr712rc โ€” enable workarounds for GR712RC errata ๐Ÿงš
  • -mfix-ut700 โ€” enable workarounds for UT700 errata ๐Ÿฆ‹
  • -mfp32 โ€” use 32-bit floating point registers (MIPS only) โญ
  • -mfp64 โ€” use 64-bit floating point registers (MIPS only) ๐ŸŒˆ
  • -mframe-chain=<value> โ€” select the frame chain model used to emit frame records (Arm only). ๐Ÿ‘‘
  • -mfrecipe โ€” enable frecipe.{s/d} and frsqrte.{s/d} ๐Ÿ”ฅ
  • -mfunction-return=<value> โ€” replace returns with jumps to __x86_return_thunk (x86 only, error otherwise) ๐Ÿ’€
  • -MF <file> โ€” write depfile output from -MMD, -MD, -MM, or -M to <file> ๐ŸŽ€
  • -mgeneral-regs-only โ€” generate code which only uses the general purpose registers (AArch64/x86 only) ๐Ÿ’…
  • -mglobal-merge โ€” enable merging of globals ๐Ÿ’–
  • -mgpopt โ€” use GP relative accesses for symbols known to be in a small data section (MIPS) ๐ŸŒธ
  • -mguard=<value> โ€” enable or disable Control Flow Guard checks and guard tables emission โœจ
  • -MG โ€” add missing headers to depfile ๐Ÿงš
  • -mharden-sls=<value> โ€” select straight-line speculation hardening scope (ARM/AArch64/X86 only). <arg> must be: all, none, retbr(ARM/AArch64), blr(ARM/AArch64), comdat(ARM/AArch64), nocomdat(ARM/AArch64), return(X86), indirect-jmp(X86) ๐Ÿ‘‘
  • -mhvx-ieee-fp โ€” enable Hexagon HVX IEEE floating-point ๐Ÿฆ‹
  • -mhvx-length=<value> โ€” set Hexagon Vector Length โญ
  • -mhvx-qfloat โ€” enable Hexagon HVX QFloat instructions ๐ŸŒˆ
  • -mhvx=<value> โ€” enable Hexagon Vector eXtensions ๐Ÿ”ฅ
  • -mhvx โ€” enable Hexagon Vector eXtensions ๐Ÿ’œ
  • -miamcu โ€” use Intel MCU ABI ๐Ÿ’…
  • -mignore-xcoff-visibility โ€” not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file ๐Ÿ’–
  • -mimplicit-float โ€” generate implicit floating point or vector instructions ๐ŸŽ€
  • -mincremental-linker-compatible โ€” (integrated-as) emit an object file which can be used with an incremental linker ๐ŸŒธ
  • -mindirect-branch-cs-prefix โ€” add cs prefix to call and jmp to indirect thunk โœจ
  • -mindirect-jump=<value> โ€” change indirect jump instructions to inhibit speculation ๐Ÿงš
  • -mios-version-min=<value> โ€” set iOS deployment target ๐Ÿฆ‹
  • -MJ <value> โ€” write a compilation database entry per input โญ
  • -mlam-bh โ€” enable amswap[_db].{b/h} and amadd[_db].{b/h} ๐ŸŒˆ
  • -mlamcas โ€” enable amcas[_db].{b/h/w/d} ๐Ÿ”ฅ
  • -mlasx โ€” enable Loongson Advanced SIMD Extension (LASX). ๐Ÿ‘‘
  • -mld-seq-sa โ€” do not generate same-address load-load barrier instructions (dbar 0x700) ๐Ÿ’œ
  • -mlink-builtin-bitcode-postopt โ€” link builtin bitcodes after the optimization pipeline ๐Ÿ’…
  • -mllvm=<arg> โ€” alias for -mllvm ๐Ÿ’–
  • -mllvm <value> โ€” additional arguments to forward to LLVM's option processing ๐ŸŽ€
  • -mlocal-sdata โ€” extend the -G behaviour to object local data (MIPS) ๐ŸŒธ
  • -mlong-calls โ€” generate branches with extended addressability, usually via indirect jumps. โœจ
  • -mlong-double-128 โ€” force long double to be 128 bits ๐Ÿงš
  • -mlong-double-64 โ€” force long double to be 64 bits ๐Ÿฆ‹
  • -mlong-double-80 โ€” force long double to be 80 bits, padded to 128 bits for storage โญ
  • -mlr-for-calls-only โ€” do not allocate the LR register for general purpose usage, only for calls. (AArch64 only) ๐ŸŒˆ
  • -mlsx โ€” enable Loongson SIMD Extension (LSX). ๐Ÿ”ฅ
  • -mlvi-cfi โ€” enable only control-flow mitigations for Load Value Injection (LVI) ๐Ÿ‘‘
  • -mlvi-hardening โ€” enable all mitigations for Load Value Injection (LVI) ๐Ÿ’œ
  • -mmacos-version-min=<value> โ€” set macOS deployment target ๐Ÿ’…
  • -mmadd4 โ€” enable the generation of 4-operand madd.s, madd.d and related instructions. ๐Ÿ’–
  • -mmark-bti-property โ€” add .note.gnu.property with BTI to assembly files (AArch64 only) ๐ŸŽ€
  • -MMD โ€” write a depfile containing user headers ๐ŸŒธ
  • -mmemops โ€” enable generation of memop instructions โœจ
  • -mmlir <value> โ€” additional arguments to forward to MLIR's option processing ๐Ÿงš
  • -mms-bitfields โ€” set the default structure layout to be compatible with the Microsoft compiler standard ๐Ÿฆ‹
  • -mmsa โ€” enable MSA ASE (MIPS only) โญ
  • -mmt โ€” enable MT ASE (MIPS only) ๐ŸŒˆ
  • -MM โ€” like -MMD, but also implies -E and writes to stdout by default ๐Ÿ”ฅ
  • -mno-abicalls โ€” disable SVR4-style position-independent code (Mips only) ๐Ÿ‘‘
  • -mno-amdgpu-precise-memory-op โ€” disable precise memory mode (AMDGPU only) ๐Ÿ’œ
  • -mno-annotate-tablejump โ€” disable annotate table jump instruction to correlate it with the jump table. ๐Ÿ’…
  • -mno-apx-features=<value> โ€” disable features of APX ๐Ÿ’–
  • -mno-bti-at-return-twice โ€” do not add a BTI instruction after a setjmp or other return-twice construct (Arm/AArch64 only) ๐ŸŽ€
  • -mno-constructor-aliases โ€” disable emitting complete constructors and destructors as aliases when possible ๐ŸŒธ
  • -mno-crc โ€” disallow use of CRC instructions (Mips only) โœจ
  • -mno-cumode โ€” specify WGP wavefront execution mode (AMDGPU only) ๐Ÿงš
  • -mno-daz-ftz โ€” do not globally set the denormals-are-zero (DAZ) and flush-to-zero (FTZ) bits in the floating-point control register on program startup ๐Ÿฆ‹
  • -mno-div32 โ€” do not use div.w[u] and mod.w[u] instructions with input not 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 (AArch64/ARM only) ๐Ÿ”ฅ
  • -mno-extern-sdata โ€” do not assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS) ๐Ÿ‘‘
  • -mno-fix-cmse-cve-2021-35465 โ€” don't work around VLLDM erratum CVE-2021-35465 (ARM only) ๐Ÿ’œ
  • -mno-fix-cortex-a53-835769 โ€” don't work around Cortex-A53 erratum 835769 (AArch64 only) ๐Ÿ’…
  • -mno-fix-cortex-a53-843419 โ€” don't work around Cortex-A53 erratum 843419 (AArch64 only) ๐Ÿ’–
  • -mno-fix-cortex-a57-aes-1742098 โ€” don't work around Cortex-A57 Erratum 1742098 (ARM only) ๐ŸŽ€
  • -mno-fix-cortex-a72-aes-1655431 โ€” don't work around Cortex-A72 Erratum 1655431 (ARM only) ๐ŸŒธ
  • -mno-fmv โ€” disable function multiversioning โœจ
  • -mno-frecipe โ€” 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 same-address 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 โ€” nope, do not set the default struct layout to be Microsoft-compiler-compatible. Bye to that whole situation ๐Ÿ’…
  • -mno-msa โ€” kill the MSA ASE (MIPS only)
  • -mno-mt โ€” kill the MT ASE (MIPS only)
  • -mno-neg-immediates โ€” not allowed: converting instructions that carry negative immediates into their negation or inversion. Sorry bestie ๐Ÿ™…
  • -mno-nvj โ€” turn off generation of new-value jumps
  • -mno-nvs โ€” turn off generation of new-value stores
  • -mno-outline-atomics โ€” don't generate local calls to out-of-line atomic operations
  • -mno-outline โ€” disable function outlining (AArch64 only)
  • -mno-packets โ€” disable generation of instruction packets
  • -mno-pic-data-is-text-relative โ€” don't just assume data segments are relative to the text segment, ok? ๐Ÿซถ
  • -mno-regnames โ€” when writing assembly output, use only register numbers
  • -mno-relax โ€” disable linker relaxation
  • -mno-restrict-it โ€” allow generation of complex IT blocks
  • -mno-save-restore โ€” disable using library calls for save and restore
  • -mno-scalar-strict-align โ€” allow scalar memory accesses to be unaligned (RISC-V only)
  • -mno-scatter โ€” disable generation of scatter instructions in auto-vectorization (x86 only)
  • -mno-scq โ€” disable the sc.q instruction
  • -mno-seses โ€” disable speculative execution side effect suppression (SESES)
  • -mno-stack-arg-probe โ€” disable stack probes, which btw are enabled by default
  • -mno-strict-align โ€” allow memory accesses to be unaligned (AArch64/LoongArch/RISC-V only)
  • -mno-tgsplit โ€” disable threadgroup split execution mode (AMDGPU only)
  • -mno-tls-direct-seg-refs โ€” disable direct TLS access through segment registers
  • -mno-tocdata=<value> โ€” specifies a list of variables to be exempt from the TOC data transformation
  • -mno-tocdata โ€” this one is the default ๐Ÿ’ค. TOC data transformation is not applied to any variables. Only variables specified explicitly in -mtocdata= will have the TOC data transformation.
  • -mno-unaligned-access โ€” force all memory accesses to be aligned (AArch32/MIPSr6 only)
  • -mno-unaligned-symbols โ€” expect external char-aligned symbols to be without ABI alignment (SystemZ only)
  • -mno-v8plus โ€” disable V8+ mode
  • -mno-vector-strict-align โ€” allow vector memory accesses to be unaligned (RISC-V only)
  • -mno-wavefrontsize64 โ€” specify wavefront size 32 mode (AMDGPU only)
  • -mnocrc โ€” disallow use of CRC instructions (ARM only)
  • -mnop-mcount โ€” generate mcount/__fentry__ calls as nops. To activate they need to be patched in ๐Ÿ”ง
  • -mnvj โ€” yes actually, enable generation of new-value jumps
  • -mnvs โ€” enable generation of new-value stores
  • -module-dependency-dir <value> โ€” directory to dump module dependencies to
  • -module-file-info โ€” spill the tea on a particular module file โ˜•
  • -momit-leaf-frame-pointer โ€” omit frame pointer setup for leaf functions
  • -moutline-atomics โ€” generate local calls to out-of-line atomic operations
  • -moutline โ€” enable function outlining (AArch64 only)
  • -mpacked-stack โ€” use packed stack layout (SystemZ only)
  • -mpackets โ€” enable generation of instruction packets
  • -mpad-max-prefix-size=<value> โ€” specify the maximum number of prefixes to use for padding
  • -mpic-data-is-text-relative โ€” assume data segments are relative to text segment
  • -mprefer-vector-width=<value> โ€” specifies the preferred vector width for auto-vectorization. Defaults to 'none', which lets the target make its own decisions โœจ
  • -mprintf-kind=<value> โ€” specify the printf lowering scheme (AMDGPU only), and the allowed values are "hostcall" (printing happens during kernel execution โ€” this scheme relies on hostcalls which require the system to support pcie atomics) and "buffered" (printing happens after all kernel threads exit โ€” this uses a printf buffer and does not rely on pcie atomic support)
  • -MP โ€” create a phony target for each dependency (other than the main file)
  • -mqdsp6-compat โ€” enable hexagon-qdsp6 backward compatibility
  • -MQ <value> โ€” specify the name of the main file output to quote in the depfile
  • -mrecip=<value> โ€” control use of approximate reciprocal and reciprocal square root instructions followed by <n> iterations of Newton-Raphson refinement. The grammar, fr fr:
<value> = ( ['!'] ['vec-'] ('rcp'|'sqrt') [('h'|'s'|'d')] [':'<n>] ) | 'all' | 'default' | 'none'
  • -mrecip โ€” equivalent to -mrecip=all, periodt
  • -mrecord-mcount โ€” generate a __mcount_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
  • -mreserve-frame-pointer-reg โ€” reserve the frame pointer register even if the function doesn't have a frame ๐Ÿ‘‘
  • -mrestrict-it โ€” disallow generation of complex IT blocks. It is off by default.
  • -mrtd โ€” make StdCall calling convention the default
  • -mrvv-vector-bits=<value> โ€” specify the size in bits of an RVV vector register
  • -msave-reg-params โ€” save arguments passed by registers to ABI-defined stack positions
  • -msave-restore โ€” enable using library calls for save and restore
  • -mscalar-strict-align โ€” force all scalar memory accesses to be aligned (RISC-V only)
  • -mscq โ€” enable the 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', or 'lasx'
  • -mskip-rax-setup โ€” skip setting up the RAX register when passing variable arguments (x86 only)
  • -msmall-data-limit=<value> โ€” put global and static data smaller than the limit into a special section
  • -msoft-float โ€” use software floating point
  • -msse2avx โ€” specify that the assembler should encode SSE instructions with the VEX prefix
  • -mstack-alignment=<value> โ€” set the stack alignment
  • -mstack-arg-probe โ€” enable stack probes
  • -mstack-probe-size=<value> โ€” set the stack probe size
  • -mstack-protector-guard-offset=<value> โ€” use the given offset for addressing the stack-protector guard
  • -mstack-protector-guard-reg=<value> โ€” use the given reg for addressing the stack-protector guard
  • -mstack-protector-guard-symbol=<value> โ€” use the given symbol for addressing the stack-protector guard
  • -mstack-protector-guard=<value> โ€” use the given guard (global, tls) for addressing the stack-protector guard
  • -mstackrealign โ€” force realign the stack at entry to every function
  • -mstrict-align โ€” force all memory accesses to be aligned (AArch64/LoongArch/RISC-V only)
  • -msve-streaming-vector-bits=<value> โ€” specify the size in bits of an SVE vector register in streaming mode. Defaults to the vector length agnostic value of "scalable". (AArch64 only) ๐ŸŒŠ
  • -msve-vector-bits=<value> โ€” specify the size in bits of an SVE vector register. Defaults to the vector length agnostic value of "scalable". (AArch64 only)
  • -msvr4-struct-return โ€” return small structs in registers (PPC32 only)
  • -mtargetos=<value> โ€” set the deployment target to be the specified OS and OS version
  • -mtgsplit โ€” enable threadgroup split execution mode (AMDGPU only)
  • -mthread-model <value> โ€” the thread model to use. Defaults to 'posix'.
  • -mtls-dialect=<value> โ€” which thread-local storage dialect to use for dynamic accesses of TLS variables
  • -mtls-direct-seg-refs โ€” enable direct TLS access through segment registers (this one's the default ๐Ÿ’…)
  • -mtls-size=<value> โ€” specify bit size of immediate TLS offsets (AArch64 ELF only): 12 (for 4KB) | 24 (for 16MB, default) | 32 (for 4GB) | 48 (for 256TB, needs -mcmodel=large)
  • -mtocdata=<value> โ€” specifies a list of variables to which the TOC data transformation will be applied
  • -mtocdata โ€” all suitable variables will have the TOC data transformation applied ๐ŸŽ‰
  • -mtp=<value> โ€” thread pointer access method. For AArch32: 'soft' uses a function call, or 'tpidrurw', 'tpidruro' or 'tpidrprw' use the three CP15 registers. 'cp15' is an alias for 'tpidruro'. For AArch64: 'tpidr_el0', 'tpidr_el1', 'tpidr_el2', 'tpidr_el3' or 'tpidrro_el0' use the five system registers. 'elN' is an alias for 'tpidr_elN'.
  • -mtune=<value> โ€” only supported on AArch64, PowerPC, RISC-V, SPARC, SystemZ, and X86
  • -MT <value> โ€” specify the name of the main file output in the depfile
  • -multi-lib-config=<file> โ€” path to the YAML configuration file to be used for multilib selection
  • -munaligned-access โ€” allow memory accesses to be unaligned (AArch32/MIPSr6 only)
  • -munaligned-symbols โ€” expect external char-aligned symbols to be without ABI alignment (SystemZ only)
  • -mv8plus โ€” enable V8+ mode, allowing use of 64-bit V9 instructions in 32-bit code
  • -mvector-strict-align โ€” force all vector memory accesses to be aligned (RISC-V only)
  • -mvevpu โ€” emit VPU instructions for VE
  • -MV โ€” use NMake/Jom format for the depfile
  • -mwavefrontsize64 โ€” specify wavefront size 64 mode (AMDGPU only)
  • -mxcoff-build-id=<0xHEXSTRING> โ€” on AIX, request creation of a build-id string, "0xHEXSTRING", in the string table of the loader section inside the linked binary
  • -mxcoff-roptr โ€” place constant objects with relocatable address values in the RO data section and add -bforceimprw to the linker flags (AIX only)
  • -mzos-hlq-clang=<ClangHLQ> โ€” high level qualifier for z/OS C++RT side deck datasets
  • -mzos-hlq-csslib=<CsslibHLQ> โ€” high level qualifier for z/OS CSSLIB dataset
  • -mzos-hlq-le=<LeHLQ> โ€” high level qualifier for z/OS Language Environment datasets
  • -mzos-sys-include=<SysInclude> โ€” path to system headers on z/OS
  • -mzos-target=<value> โ€” set the z/OS release of the runtime environment
  • -M โ€” like -MD, but it also implies -E and writes to stdout by default ๐Ÿ‘€
  • --no-cuda-include-ptx=<value> โ€” okay so this is you telling clang "bestie, do not include PTX for this GPU architecture" โ€” you pass a value like sm_35, or literally just 'all' if you're feeling chaotic ๐Ÿ’… May be specified more than once, so stack 'em if you got 'em.
  • --no-cuda-version-check โ€” normally if the CUDA install you've got is too low a version for the CUDA gpu architecture you asked for, clang errors out and ruins your day. This flag says "no, don't do that" and skips the error ๐Ÿ™ˆ
  • --no-default-config โ€” disables loading the default configuration files. they simply do not load. โœจ
  • --no-gpu-bundle-output โ€” do not bundle the output files of HIP device compilation.
  • -no-hip-rt โ€” do not link against the HIP runtime libraries.
  • --no-offload-arch=<value> โ€” removes a CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. Pass 'all' and it resets the whole list back to its default value ๐Ÿ‘‘
  • --no-offload-inc โ€” no include paths for CUDA/HIP, and no including the default CUDA/HIP wrapper headers either.
  • --no-offload-new-driver โ€” don't Use the new driver for offloading compilation.
  • --no-offloadlib โ€” do not link the device library for CUDA/HIP/SYCL device compilation.
  • --no-system-header-prefix=<prefix> โ€” every #include path that starts with <prefix> gets treated as not including a system header.
  • --no-wasm-opt โ€” disables the wasm-opt optimizer. gone. ๐Ÿšซ
  • -nobuiltininc โ€” disables the builtin #include directories only.
  • -nohipwrapperinc โ€” does not include the default HIP wrapper headers, and not the include paths either.
  • -nolibsycl โ€” do not link the SYCL runtime library.
  • -nostdinc++ โ€” disables the standard #include directories for the C++ standard library.
  • -nostdinc โ€” disables both the standard system #include directories and the builtin #include directories. everything. all at once. ๐Ÿ’€
  • -nostdlibinc โ€” disables the standard system #include directories only.
  • -ObjC++ โ€” treat source input files as Objective-C++ inputs ๐Ÿ’–
  • -ObjC โ€” treat source input files as Objective-C inputs.
  • -object-file-name=<file> โ€” sets the output <file> for debug infos.
  • -Ofast<value> โ€” deprecated! the elders say use '-O3 -ffast-math' for the exact same behavior, or just '-O3' if you want only the conforming optimizations. no cap.
  • --offload-arch-tool=<value> โ€” the tool used for detecting offloading architectures in the system.
  • --offload-arch=<value> โ€” specify an offloading device architecture for CUDA, HIP, or OpenMP (e.g. sm_35). Pass 'native' and the compiler will detect the locally installed architectures for you, so iconic. For HIP offloading, the device architecture can be followed by target ID features delimited by a colon (e.g. gfx908:xnack+:sramecc-). May be specified more than once โœจ
  • --offload-compress โ€” compress offload device binaries (HIP and SYCL only).
  • --offload-device-only โ€” only compile for the offloading device.
  • --offload-host-device โ€” compile for both the offloading host and device. this one's the default btw ๐Ÿซถ
  • --offload-host-only โ€” only compile for the offloading host.
  • --offload-inc โ€” add include paths for CUDA/HIP and include the default CUDA/HIP wrapper headers. also the default ๐Ÿ’…
  • --offload-jobs=<value> โ€” specify the number of threads to use for device offloading tasks during compilation. can be a positive integer, or the string 'jobserver' to use the make-style jobserver from the environment. multitasking queen.
  • --offload-link โ€” use the new offloading linker to perform the link job.
  • --offload-new-driver โ€” use the new driver for offloading compilation.
  • --offload-targets=<value> โ€” specify a list of target architectures to use for offloading.
  • --offload=<value> โ€” specify a comma-separated list of offloading target triples (CUDA and HIP only).
  • --offloadlib โ€” link device libraries for GPU device compilation.
  • -o <file> โ€” write output to <file>.
  • -pedantic โ€” warn on language extensions. no extensions. be normal. ๐Ÿ˜ญ
  • -pg โ€” enable mcount instrumentation.
  • -pipe โ€” use pipes between commands, when possible.
  • --precompile โ€” only precompile the input.
  • --pretty-sgf โ€” emit pretty printed symbol graphs. pretty!!! ๐ŸŽ€
  • -print-diagnostic-options โ€” print all of Clang's warning options. all of them.
  • -print-effective-triple โ€” print the effective target triple.
  • -print-enabled-extensions โ€” print the extensions enabled by the given target and -march/-mcpu options. (AArch64 and RISC-V only)
  • -print-file-name=<file> โ€” print the full library path of <file>.
  • -print-ivar-layout โ€” enable Objective-C Ivar layout bitmap print trace.
  • -print-libgcc-file-name โ€” print the library path for the compiler runtime library currently in use ("libgcc.a" or "libclang_rt.builtins.*.a").
  • -print-library-module-manifest-path โ€” print the path for the C++ Standard library module manifest.
  • -print-multi-flags-experimental โ€” print the flags used for selecting multilibs (experimental ๐Ÿ‘€).
  • -print-prog-name=<name> โ€” print the full program path of <name>.
  • -print-resource-dir โ€” print the resource directory pathname.
  • -print-rocm-search-dirs โ€” print the paths used for finding the ROCm installation.
  • -print-runtime-dir โ€” print the directory pathname containing Clang's runtime libraries.
  • -print-search-dirs โ€” print the paths used for finding libraries and programs.
  • -print-supported-cpus โ€” print supported cpu models for the given target (if the target isn't specified, it will print the supported cpus for the default target).
  • -print-supported-extensions โ€” print supported -march extensions (RISC-V, AArch64 and ARM only).
  • -print-target-triple โ€” print the normalized target triple.
  • -print-targets โ€” print the registered targets.
  • -pthread โ€” support POSIX threads in generated code.
  • --ptxas-path=<value> โ€” path to ptxas (used for compiling CUDA code).

  • -P โ€” disable linemarker output in -E mode.
  • -p โ€” enable mcount instrumentation with prof.
  • -Qn โ€” do not emit metadata containing the compiler name and version.
  • -Qunused-arguments โ€” don't emit a warning for unused driver arguments. mind your business, driver.
  • -Qy โ€” emit metadata containing the compiler name and version.
  • -regcall4 โ€” set __regcall4 as a default calling convention to respect __regcall ABI v.4.
  • -relocatable-pch โ€” whether to build a relocatable precompiled header.
  • -resource-dir <value> โ€” the directory which holds the compiler resource files.
  • -rewrite-legacy-objc โ€” rewrite Legacy Objective-C source to C++.
  • -rewrite-objc โ€” rewrite Objective-C source to C++.
  • --rocm-device-lib-path=<value> โ€” ROCm device library path. Alternative to rocm-path.
  • --rocm-path=<value> โ€” ROCm installation path, used for finding and automatically linking required bitcode libraries.
  • -Rpass-analysis=<value> โ€” report transformation analysis from optimization passes whose name matches the given POSIX regular expression.
  • -Rpass-missed=<value> โ€” report missed transformations by optimization passes whose name matches the given POSIX regular expression.
  • -Rpass=<value> โ€” report transformations performed by optimization passes whose name matches the given POSIX regular expression.
  • -rtlib=<value> โ€” compiler runtime library to use.
  • -R<remark> โ€” enable the specified remark.
  • -save-offload-code=<value> โ€” save offload code generated during compilation into the user provided directory.
  • -save-stats=<value> โ€” save llvm statistics.
  • -save-stats โ€” save llvm statistics.
  • -save-temps=<value> โ€” save intermediate compilation results. <arg> can be set to 'cwd' for current working directory, or 'obj' which will save temporary files in the same directory as the final output file.
  • -save-temps โ€” alias for --save-temps=cwd.
  • -serialize-diagnostics <value> โ€” serialize compiler diagnostics to a file.
  • -shared-libsan โ€” dynamically link the sanitizer runtime.
  • --start-no-unused-arguments โ€” don't emit warnings about unused arguments for the following arguments. (a little "shhh" for everything after it ๐Ÿซถ)
  • -static-libclosure โ€” generate code for statically linking libclosure (BlocksRuntime).
  • -static-libsan โ€” statically link the sanitizer runtime (Not supported for ASan, TSan or UBSan on darwin).
  • -static-openmp โ€” use the static host OpenMP runtime while linking.
  • -std=<value> โ€” language standard to compile for.
  • -stdlib++-isystem <directory> โ€” use directory as the C++ standard library include path.
  • -stdlib=<value> โ€” C++ standard library to use.
  • -sycl-std=<value> โ€” SYCL language standard to compile for.
  • --symbol-graph-dir=<value> โ€” directory in which to emit symbol graphs.
  • --system-header-prefix=<prefix> โ€” treat all #include paths starting with <prefix> as including a system header.
  • -S โ€” only run preprocess and compilation steps.
  • --target=<value> โ€” generate code for the given target.
  • -time โ€” time individual commands. clock it, bestie โฑ๏ธ
  • -traditional-cpp โ€” enable some traditional CPP emulation.
  • -trigraphs โ€” process trigraph sequences.
  • -T <script> โ€” specify <script> as linker script.
  • -undef โ€” undef all system defines.
  • -unwindlib=<value> โ€” unwind library to use.
  • -U <macro> โ€” undefine macro <macro>.
  • --verify-debug-info โ€” verify the binary representation of debug output.
  • -verify-pch โ€” load and verify that a pre-compiled header file is not stale. get that PCH a vibe check ๐Ÿฆ‹
  • --version โ€” print version information.
  • -vfsoverlay <value> โ€” overlay the virtual filesystem described by file over the real file system. Additionally, pass this overlay file to the linker if it supports it.
  • -v โ€” show commands to run and use verbose output.
  • -Wa,<arg> โ€” pass the comma separated arguments in <arg> to the assembler.
  • --warning-suppression-mappings=<value> โ€” file containing diagnostic suppression mappings. See user manual for file format.
  • --wasm-opt โ€” enable the wasm-opt optimizer (default).
  • -Wl,<arg> โ€” pass the comma separated arguments in <arg> to the linker.
  • -working-directory <value> โ€” resolve file paths relative to the specified directory.
  • -Wp,<arg> โ€” pass the comma separated arguments in <arg> to the preprocessor.
  • -W<warning> โ€” enable the specified warning.
  • -w โ€” suppress all warnings. shhh. ๐Ÿคซ
  • -Xanalyzer <arg> โ€” pass <arg> to the static analyzer.
  • -Xarch_device <arg> โ€” pass <arg> to device compilation in the offloading toolchain.
  • -Xarch_host <arg> โ€” pass <arg> to host compilation in the offloading toolchain.
  • -Xarch_<arch> <arg> โ€” if the target matches <arch>, then boom, <arg> goes straight to the compilation. Conditional bestie behavior โœจ
  • -Xassembler <arg> โ€” hands <arg> over to the assembler
  • -Xclang=<arg> โ€” just an alias for -Xclang. that's it, that's the whole job ๐Ÿ’…
  • -Xclangas=<arg> โ€” alias for -Xclangas, same vibe
  • -Xclangas <arg> โ€” passes <arg> to clang -cc1as
  • -Xclang <arg> โ€” passes <arg> to clang -cc1
  • -Xcuda-fatbinary <arg> โ€” passes <arg> into the fatbinary invocation
  • -Xcuda-ptxas <arg> โ€” passes <arg> to the ptxas assembler
  • -Xlinker <arg> โ€” passes <arg> to the linker
  • -Xoffload-linker<triple> <arg> โ€” passes <arg> to the offload linkers, or specifically to the ones identified by -<triple>
  • -Xopenmp-target=<triple> <arg> โ€” passes <arg> to the target offloading toolchain that <triple> points at.
  • -Xopenmp-target <arg> โ€” passes <arg> to the target offloading toolchain. no triple needed, it just goes ๐Ÿซถ
  • -Xpreprocessor <arg> โ€” passes <arg> to the preprocessor
  • -Xsycl-target-backend=<triple> <arg> โ€” passes <arg> to the SYCL based backend that <triple> identifies.
  • -Xsycl-target-backend <arg> โ€” passes <arg> to the SYCL based target backend.
  • -Xsycl-target-frontend=<triple> <arg> โ€” passes <arg> to the SYCL based target frontend that <triple> identifies.
  • -Xsycl-target-frontend <arg> โ€” passes <arg> to the SYCL based target frontend.
  • -Xsycl-target-linker=<triple> <arg> โ€” passes <arg> to the SYCL based target linker that <triple> identifies.
  • -Xsycl-target-linker <arg> โ€” passes <arg> to the SYCL based target linker.
  • -Xs <arg> โ€” passes <arg> to the offline compiler.
  • -Xs<arg> โ€” passes <arg> to the offline compiler, except it also slaps the option specifier - onto the front of <arg> first. sneaky but iconic ๐ŸŽ€
  • -Xthinlto-distributor=<arg> โ€” passes <arg> to the ThinLTO distributor process. you can drop this one multiple times, or comma-separate the values, whichever fits your vibe.
  • -x <language> โ€” treats every input file after this point as being type <language>
  • -z <arg> โ€” passes -z <arg> to the linker

๐ŸŒˆ dxc compatibility options ๐ŸŒˆ

okay so these next ones are the let's move from DXC to Clang squad, bestie ๐Ÿ’œ

  • --dxv-path=<value> โ€” DXIL validator installation path
  • -fdx-rootsignature-define=<value> โ€” overrides the entry function root signature with the root signature sitting at the given macro name.
  • -fdx-rootsignature-version=<value> โ€” Root Signature Version
  • -fspv-extension=<value> โ€” tells it which SPIR-V extensions are available. if you don't pass this one at all, then all extensions are available (greedy, love that for us). if you pass KHR, then all the KHR extensions are available. and if you pass DXC, then all the extensions implemented by the DirectX Shader compiler become available. this one is literally the move if you're migrating from DXC over to Clang.
  • -fspv-target-env=<value> โ€” specifies the target environment
  • /hlsl-all-resources-bound โ€” enables agressive flattening
  • -hlsl-entry <value> โ€” entry point name for hlsl

๐Ÿ’– SEE ALSO ๐Ÿ’–

the whole entire full documentation for clang-22 lives as a Texinfo manual. so if the info program and the clang-22 program are both properly installed on your machine, this command

info clang-22

is gonna hand you the complete manual. go get it, it's giving encyclopedia but make it cute ๐Ÿฆ‹


and that's a wrap on the whole page, bestie!! no cap, you read all of it ๐Ÿ’… this beauty comes to you from clang-22 7.0.1-0ubuntu2, dated September 2026, and it answers to the name CLANG-22(1) ๐Ÿ‘‘ mwah, go compile something iconic ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from