2 -------------------------------------------------------------------
3 NOTE: This file is automatically generated by running clang-tblgen
4 -gen-opt-docs. Do not edit this file by hand!!
5 -------------------------------------------------------------------
7 =====================================
8 Clang command line argument reference
9 =====================================
16 This page lists the command line arguments currently supported by the
17 GCC-compatible ``clang`` and ``clang++`` drivers.
21 .. option:: -B<prefix>, --prefix <arg>, --prefix=<arg>
23 Search $prefix/$triple-$file and $prefix$file for executables, libraries, includes, and data files used by the compiler. $prefix may or may not be a directory
27 Add directory to framework include search path
31 Treat source input files as Objective-C inputs
37 Treat source input files as Objective-C++ inputs
39 .. option:: -Qn, -fno-ident
41 Do not emit metadata containing compiler name and version
43 .. option:: -Qunused-arguments
45 Don't emit warning for unused driver arguments
47 .. option:: -Qy, -fident
49 Emit metadata containing compiler name and version
51 .. option:: -Wa,<arg>,<arg2>...
53 Pass the comma separated arguments in <arg> to the assembler
55 .. option:: -Wlarge-by-value-copy=<arg>
57 .. option:: -Xarch\_<arg1> <arg2>
60 .. option:: -Xarch\_device <arg>
63 Pass <arg> to the CUDA/HIP device compilation
66 .. option:: -Xarch\_host <arg>
69 Pass <arg> to the CUDA/HIP host compilation
71 .. option:: -Xcuda-fatbinary <arg>
73 Pass <arg> to fatbinary invocation
75 .. option:: -Xcuda-ptxas <arg>
77 Pass <arg> to the ptxas assembler
79 .. option:: -Xopenmp-target <arg>
81 Pass <arg> to the target offloading toolchain.
84 .. option:: -Xopenmp-target=<triple> <arg>
87 Pass <arg> to the target offloading toolchain identified by <triple>.
91 .. option:: -a<arg>, --profile-blocks
93 .. option:: -all\_load
95 .. option:: -allowable\_client <arg>
99 Run the static analyzer
101 .. option:: --analyzer-no-default-checks
103 .. option:: --analyzer-output<arg>
105 Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|sarif\|sarif-html\|text).
107 .. option:: -arch <arg>
110 .. option:: -arch\_errors\_fatal
114 .. option:: -arch\_only <arg>
117 .. option:: -arcmt-migrate-emit-errors
119 Emit ARC errors even if the migrator can fix them
121 .. option:: -arcmt-migrate-report-output <arg>
123 Output path for the plist report
125 .. option:: --autocomplete=<arg>
127 .. option:: -bind\_at\_load
132 .. option:: -bundle\_loader <arg>
135 .. option:: -client\_name<arg>
137 .. option:: -compatibility\_version<arg>
139 .. option:: --config <arg>
141 Specifies configuration file
143 .. option:: --constant-cfstrings
145 .. option:: --cuda-compile-host-device
147 Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
149 .. option:: --cuda-device-only
151 Compile CUDA code for device only
153 .. option:: --cuda-host-only
155 Compile CUDA code for host only. Has no effect on non-CUDA compilations.
157 .. option:: --cuda-include-ptx=<arg>, --no-cuda-include-ptx=<arg>
159 Include PTX for the following GPU architecture (e.g. sm\_35) or 'all'. May be specified more than once.
161 .. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
163 Enable device-side debug info generation. Disables ptxas optimizations.
165 .. option:: -cuid=<arg>
167 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.
169 .. option:: -current\_version<arg>
171 .. option:: -dead\_strip
173 .. option:: -dependency-dot <arg>
175 Filename to write DOT-formatted header dependencies to
177 .. option:: -dependency-file <arg>
179 Filename (or -) to write dependency output to
181 .. option:: -dsym-dir<dir>
183 Directory to output dSYM's (if any) to
185 .. option:: -dumpmachine
187 .. option:: -dumpversion
189 .. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
191 .. option:: -dylib\_file <arg>
193 .. option:: -dylinker
196 .. option:: -dylinker\_install\_name<arg>
201 .. option:: -dynamiclib
203 .. option:: -emit-ast
205 Emit Clang AST files for source inputs
207 .. option:: --emit-static-lib
209 Enable linker job to emit a static library.
211 .. option:: -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
213 Trivial automatic variable initialization to zero is only here for benchmarks, it'll eventually be removed, and I'm OK with that because I'm only using it to benchmark
215 .. option:: -exported\_symbols\_list <arg>
217 .. option:: -faligned-new=<arg>
219 .. option:: -ffixed-r19
221 Reserve register r19 (Hexagon only)
223 .. option:: -fgpu-flush-denormals-to-zero, -fcuda-flush-denormals-to-zero, -fno-gpu-flush-denormals-to-zero
225 Flush denormal floating point values to zero in CUDA/HIP device mode.
227 .. option:: -fheinous-gnu-extensions
229 .. option:: -flat\_namespace
231 .. option:: -fopenmp-targets=<arg1>,<arg2>...
233 Specify comma-separated list of triples OpenMP offloading targets to be supported
235 .. option:: -force\_cpusubtype\_ALL
238 .. option:: -force\_flat\_namespace
242 .. option:: -force\_load <arg>
245 .. option:: -framework <arg>
247 .. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath
249 Add -rpath with architecture-specific resource directory to the linker flags
251 .. option:: -fsanitize-system-ignorelist=<arg>, -fsanitize-system-blacklist=<arg>
253 Path to system ignorelist file for sanitizers
255 .. option:: -fshow-skipped-includes
257 #include files may be "skipped" due to include guard optimization
258 or #pragma once. This flag makes -H show also such includes.
260 .. option:: -fsystem-module
262 Build this module as a system module. Only used with -emit-module
264 .. option:: -fuse-cuid=<arg>
266 Method to generate ID's for compilation units for single source offloading languages CUDA and HIP: 'hash' (ID's generated by hashing file path and command line options) \| 'random' (ID's generated as random numbers) \| 'none' (disabled). Default is 'hash'. This option will be overridden by option '-cuid=\[ID\]' if it is specified.
268 .. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
270 Search for GCC installation in the specified directory on targets which commonly use GCC. The directory usually contains 'lib{,32,64}/gcc{,-cross}/$triple' and 'include'. If specified, sysroot is skipped for GCC detection. Note: executables (e.g. ld) used by the compiler are not overridden by the selected GCC installation
272 .. option:: -gcodeview
274 Generate CodeView debug information
276 .. option:: -gcodeview-ghash, -gno-codeview-ghash
278 Emit type record hashes in a .debug$H section
280 .. option:: --gpu-instrument-lib=<arg>
282 Instrument device library for HIP, which is a LLVM bitcode containing \_\_cyg\_profile\_func\_enter and \_\_cyg\_profile\_func\_exit
284 .. option:: --gpu-max-threads-per-block=<arg>
286 Default max threads per block for kernel launch bounds for HIP
288 .. option:: -headerpad\_max\_install\_names<arg>
290 .. option:: -help, --help
292 Display available options
294 .. option:: --help-hidden
296 Display help for hidden options
298 .. option:: --hip-link
300 Link clang-offload-bundler bundles for HIP
302 .. option:: --hip-version=<arg>
304 HIP version in the format of major.minor.patch
306 .. option:: -ibuiltininc
308 Enable builtin #include directories even when -nostdinc is used before or after -ibuiltininc. Using -nobuiltininc after the option disables it
310 .. option:: -image\_base <arg>
312 .. option:: -index-header-map
314 Make the next included directory (-I or -F) an indexer header map
316 .. option:: -init <arg>
318 .. option:: -install\_name <arg>
320 .. option:: -interface-stub-version=<arg>
322 .. option:: -keep\_private\_externs
324 .. option:: -lazy\_framework <arg>
327 .. option:: -lazy\_library <arg>
330 .. option:: -mbig-endian, -EB
332 .. option:: -mbranch-protection=<arg>
334 Enforce targets of indirect branches and function returns
336 .. option:: -menable-unsafe-fp-math
338 Allow unsafe floating-point math optimizations which may decrease precision
340 .. option:: -mharden-sls=<arg>
342 Select straight-line speculation hardening scope
344 .. option:: --migrate
348 .. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg>
350 .. option:: -mlinker-version=<arg>
352 .. option:: -mlittle-endian, -EL
354 .. option:: -mllvm <arg>
356 Additional arguments to forward to LLVM's option processing
358 .. option:: -module-dependency-dir <arg>
360 Directory to dump module dependencies to
362 .. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg>
364 .. option:: -multi\_module
366 .. option:: -multiply\_defined <arg>
369 .. option:: -multiply\_defined\_unused <arg>
372 .. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
374 .. option:: --no-cuda-version-check
376 Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
378 .. option:: -no-integrated-cpp, --no-integrated-cpp
380 .. option:: -no\_dead\_strip\_inits\_and\_terms
382 .. option:: -nobuiltininc
384 Disable builtin #include directories
386 .. option:: -nodefaultlibs
388 .. option:: -nofixprebinding
390 .. option:: -nogpuinc, -nocudainc
392 Do not add include paths for CUDA/HIP and do not include the default CUDA/HIP wrapper headers
394 .. option:: -nogpulib, -nocudalib
396 Do not link device library for CUDA/HIP device compilation
400 .. option:: -nomultidefs
402 .. option:: -nopie, -no-pie
404 .. option:: -noprebind
406 .. option:: -noprofilelib
408 .. option:: -noseglinkedit
410 .. option:: -nostdinc, --no-standard-includes
413 .. option:: -nostdinc++
416 Disable standard #include directories for the C++ standard library
418 .. option:: -nostdlib++
420 .. option:: -nostdlibinc
422 .. option:: -o<file>, --output <arg>, --output=<arg>
424 Write output to <file>
426 .. option:: -objcmt-atomic-property
428 Make migration to 'atomic' properties
430 .. option:: -objcmt-migrate-all
432 Enable migration to modern ObjC
434 .. option:: -objcmt-migrate-annotation
436 Enable migration to property and method annotations
438 .. option:: -objcmt-migrate-designated-init
440 Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
442 .. option:: -objcmt-migrate-instancetype
444 Enable migration to infer instancetype for method result type
446 .. option:: -objcmt-migrate-literals
448 Enable migration to modern ObjC literals
450 .. option:: -objcmt-migrate-ns-macros
452 Enable migration to NS\_ENUM/NS\_OPTIONS macros
454 .. option:: -objcmt-migrate-property
456 Enable migration to modern ObjC property
458 .. option:: -objcmt-migrate-property-dot-syntax
460 Enable migration of setter/getter messages to property-dot syntax
462 .. option:: -objcmt-migrate-protocol-conformance
464 Enable migration to add protocol conformance on classes
466 .. option:: -objcmt-migrate-readonly-property
468 Enable migration to modern ObjC readonly property
470 .. option:: -objcmt-migrate-readwrite-property
472 Enable migration to modern ObjC readwrite property
474 .. option:: -objcmt-migrate-subscripting
476 Enable migration to modern ObjC subscripting
478 .. option:: -objcmt-ns-nonatomic-iosonly
480 Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
482 .. option:: -objcmt-returns-innerpointer-property
484 Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
486 .. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
488 Only modify files with a filename contained in the provided directory path
492 .. option:: --offload-arch=<arg>, --cuda-gpu-arch=<arg>, --no-offload-arch=<arg>
494 CUDA offloading device architecture (e.g. sm\_35), or HIP offloading target ID in the form of a device architecture followed by target ID features delimited by a colon. Each target ID feature is a pre-defined string followed by a plus or minus sign (e.g. gfx908:xnack+:sramecc-). May be specified more than once.
496 .. option:: -p, --profile
498 .. option:: -pagezero\_size<arg>
502 Enable mcount instrumentation
504 .. option:: -pipe, --pipe
506 Use pipes between commands, when possible
511 .. option:: -prebind\_all\_twolevel\_modules
516 .. option:: --print-diagnostic-categories
518 .. option:: -print-effective-triple, --print-effective-triple
520 Print the effective target triple
522 .. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
524 Print the full library path of <file>
526 .. option:: -print-ivar-layout
528 Enable Objective-C Ivar layout bitmap print trace
530 .. option:: -print-libgcc-file-name, --print-libgcc-file-name
532 Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
534 .. option:: -print-multi-directory, --print-multi-directory
536 .. option:: -print-multi-lib, --print-multi-lib
538 .. option:: -print-multiarch, --print-multiarch
540 Print the multiarch target triple
542 .. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
544 Print the full program path of <name>
546 .. option:: -print-resource-dir, --print-resource-dir
548 Print the resource directory pathname
550 .. option:: -print-rocm-search-dirs, --print-rocm-search-dirs
552 Print the paths used for finding ROCm installation
554 .. option:: -print-runtime-dir, --print-runtime-dir
556 Print the directory pathname containing clangs runtime libraries
558 .. option:: -print-search-dirs, --print-search-dirs
560 Print the paths used for finding libraries and programs
562 .. option:: -print-target-triple, --print-target-triple
564 Print the normalized target triple
566 .. option:: -print-targets, --print-targets
568 Print the registered targets
570 .. option:: -private\_bundle
572 .. option:: -pthread, -no-pthread
574 Support POSIX threads in generated code
576 .. option:: -pthreads
578 .. option:: -read\_only\_relocs <arg>
580 .. option:: -relocatable-pch, --relocatable-pch
582 Whether to build a relocatable precompiled header
586 .. option:: -rewrite-legacy-objc
588 Rewrite Legacy Objective-C source to C++
590 .. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
592 Compiler runtime library to use
594 .. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
596 Save llvm statistics.
598 .. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
600 Save intermediate compilation results.
602 .. option:: -sectalign <arg1> <arg2> <arg3>
604 .. option:: -sectcreate <arg1> <arg2> <arg3>
606 .. option:: -sectobjectsymbols <arg1> <arg2>
608 .. option:: -sectorder <arg1> <arg2> <arg3>
610 .. option:: -seg1addr<arg>
612 .. option:: -seg\_addr\_table <arg>
615 .. option:: -seg\_addr\_table\_filename <arg>
618 .. option:: -segaddr <arg1> <arg2>
620 .. option:: -segcreate <arg1> <arg2> <arg3>
622 .. option:: -seglinkedit
624 .. option:: -segprot <arg1> <arg2> <arg3>
626 .. option:: -segs\_read\_<arg>
629 .. option:: -segs\_read\_only\_addr <arg>
633 .. option:: -segs\_read\_write\_addr <arg>
636 .. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
638 Serialize compiler diagnostics to a file
640 .. option:: -shared-libgcc
642 .. option:: -shared-libsan, -shared-libasan
644 Dynamically link the sanitizer runtime
646 .. option:: -single\_module
648 .. option:: -static-libgcc
650 .. option:: -static-libsan
652 Statically link the sanitizer runtime
654 .. option:: -static-libstdc++
656 .. option:: -static-openmp
658 Use the static host OpenMP runtime while linking.
660 .. option:: -std-default=<arg>
662 .. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
664 C++ standard library to use
666 .. option:: -sub\_library<arg>
669 .. option:: -sub\_umbrella<arg>
672 .. option:: --sysroot=<arg>, --sysroot <arg>
674 .. option:: --target-help
676 .. option:: --target=<arg>, -target <arg>
678 Generate code for the given target
682 Time individual commands
684 .. option:: -traditional, --traditional
686 .. option:: -traditional-cpp, --traditional-cpp
688 Enable some traditional CPP emulation
690 .. option:: -twolevel\_namespace
693 .. option:: -twolevel\_namespace\_hints
696 .. option:: -umbrella <arg>
698 .. option:: -unexported\_symbols\_list <arg>
700 .. option:: -unwindlib=<arg>, --unwindlib=<arg>
702 Unwind library to use
704 .. option:: -v, --verbose
706 Show commands to run and use verbose output
708 .. option:: --verify-debug-info
710 Verify the binary representation of debug output
712 .. option:: --version
714 Print version information
716 .. option:: -w, --no-warnings
718 Suppress all warnings
720 .. option:: -weak-l<arg>
722 .. option:: -weak\_framework <arg>
725 .. option:: -weak\_library <arg>
729 .. option:: -weak\_reference\_mismatches <arg>
732 .. option:: -whatsloaded
734 .. option:: -why\_load, -whyload
736 .. option:: -working-directory<arg>, -working-directory=<arg>
738 Resolve file paths relative to the specified directory
740 .. option:: -x<language>, --language <arg>, --language=<arg>
742 Treat subsequent input files as having type <language>
748 The action to perform on the input.
750 .. option:: -E, --preprocess
752 Only run the preprocessor
754 .. option:: -S, --assemble
756 Only run preprocess and compilation steps
758 .. option:: -c, --compile
760 Only run preprocess, compile, and assemble steps
762 .. option:: -emit-interface-stubs
764 Generate Interface Stub Files.
766 .. option:: -emit-llvm
768 Use the LLVM representation for assembler and object files
770 .. option:: -emit-merged-ifs
772 Generate Interface Stub Files, emit merged text not binary.
774 .. option:: -fsyntax-only
776 .. option:: -module-file-info
778 Provide information about a particular module file
780 .. option:: --precompile
782 Only precompile the input
784 .. option:: -rewrite-objc
786 Rewrite Objective-C source to C++
788 .. option:: -verify-pch
790 Load and verify that a pre-compiled header file is not stale
795 Flags controlling the behavior of Clang during compilation. These flags have
796 no effect during actions that do not perform compilation.
798 .. option:: -Xassembler <arg>
800 Pass <arg> to the assembler
802 .. option:: -Xclang <arg>
804 Pass <arg> to the clang compiler
806 .. option:: -ansi, --ansi
808 .. option:: -fc++-abi=<arg>
810 C++ ABI to use. This will override the target C++ ABI.
812 .. option:: -fclang-abi-compat=<version>
814 Attempt to match the ABI of Clang <version>
816 .. option:: -fcomment-block-commands=<arg>,<arg2>...
818 Treat each comma separated argument in <arg> as a documentation comment block command
820 .. option:: -fcomplete-member-pointers, -fno-complete-member-pointers
822 Require member pointer base types to be complete if they would be significant under the Microsoft ABI
824 .. option:: -fcrash-diagnostics-dir=<dir>
826 Put crash-report files in <dir>
828 .. option:: -fdeclspec, -fno-declspec
830 Allow \_\_declspec as a keyword
832 .. option:: -fdepfile-entry=<arg>
834 .. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
836 .. option:: -fdiagnostics-format=<arg>
838 .. option:: -fdiagnostics-parseable-fixits
840 Print fix-its in machine parseable form
842 .. option:: -fdiagnostics-print-source-range-info
844 Print source range spans in numeric form
846 .. option:: -fdiagnostics-show-category=<arg>
848 .. option:: -fdiscard-value-names, -fno-discard-value-names
850 Discard value names in LLVM IR
852 .. option:: -fexperimental-relative-c++-abi-vtables, -fno-experimental-relative-c++-abi-vtables
854 Use the experimental C++ class ABI for classes with virtual tables
856 .. option:: -fexperimental-strict-floating-point
858 Enables experimental strict floating point in LLVM.
860 .. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses
862 Use separate accesses for consecutive bitfield runs with legal widths and alignments.
864 .. option:: -fglobal-isel, -fexperimental-isel, -fno-global-isel
866 Enables the global instruction selector
868 .. option:: -finline-functions, -fno-inline-functions
870 Inline suitable functions
872 .. option:: -finline-hint-functions
874 Inline functions which are (explicitly or implicitly) marked inline
876 .. option:: -flegacy-pass-manager, -fno-experimental-new-pass-manager, -fno-legacy-pass-manager
878 Use the legacy pass manager in LLVM
880 .. option:: -fno-crash-diagnostics
882 Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
884 .. option:: -fno-sanitize-ignorelist, -fno-sanitize-blacklist
886 Don't use ignorelist file for sanitizers
888 .. option:: -fparse-all-comments
890 .. option:: -frecord-command-line, -fno-record-command-line, -frecord-gcc-switches
892 .. option:: -fsanitize-address-destructor=<arg>
894 Set destructor type used in ASan instrumentation
896 .. option:: -fsanitize-address-field-padding=<arg>
898 Level of field padding for AddressSanitizer
900 .. option:: -fsanitize-address-globals-dead-stripping
902 Enable linker dead stripping of globals in AddressSanitizer
904 .. option:: -fsanitize-address-poison-custom-array-cookie, -fno-sanitize-address-poison-custom-array-cookie
906 Enable poisoning array cookies when using custom operator new\[\] in AddressSanitizer
908 .. option:: -fsanitize-address-use-after-return=<mode>
910 Select the mode of detecting stack use-after-return in AddressSanitizer
912 .. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
914 Enable use-after-scope detection in AddressSanitizer
916 .. option:: -fsanitize-address-use-odr-indicator, -fno-sanitize-address-use-odr-indicator
918 Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized programs at the cost of an increase in binary size
920 .. option:: -fsanitize-cfi-canonical-jump-tables, -fno-sanitize-cfi-canonical-jump-tables
922 Make the jump table addresses canonical in the symbol table
924 .. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
926 Enable control flow integrity (CFI) checks for cross-DSO calls.
928 .. option:: -fsanitize-cfi-icall-generalize-pointers
930 Generalize pointers in CFI indirect call type signature checks
932 .. option:: -fsanitize-coverage-allowlist=<arg>, -fsanitize-coverage-whitelist=<arg>
934 Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones
936 .. option:: -fsanitize-coverage-ignorelist=<arg>, -fsanitize-coverage-blacklist=<arg>
938 Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones
940 .. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
942 Specify the type of coverage instrumentation for Sanitizers
944 .. option:: -fsanitize-hwaddress-abi=<arg>
946 Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused.
948 .. option:: -fsanitize-hwaddress-experimental-aliasing, -fno-sanitize-hwaddress-experimental-aliasing
950 Enable aliasing mode in HWAddressSanitizer
952 .. option:: -fsanitize-ignorelist=<arg>, -fsanitize-blacklist=<arg>
954 Path to ignorelist file for sanitizers
956 .. option:: -fsanitize-link-c++-runtime, -fno-sanitize-link-c++-runtime
958 .. option:: -fsanitize-link-runtime, -fno-sanitize-link-runtime
960 .. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
962 Enable origins tracking in MemorySanitizer
965 .. option:: -fsanitize-memory-track-origins=<arg>
968 Enable origins tracking in MemorySanitizer
970 .. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor
972 Enable use-after-destroy detection in MemorySanitizer
974 .. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime
976 .. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>..., -fsanitize-recover (equivalent to -fsanitize-recover=all)
978 Enable recovery for specified sanitizers
980 .. option:: -fsanitize-stats, -fno-sanitize-stats
982 Enable sanitizer statistics gathering.
984 .. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
986 Enable atomic operations instrumentation in ThreadSanitizer (default)
988 .. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
990 Enable function entry/exit instrumentation in ThreadSanitizer (default)
992 .. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
994 Enable memory access instrumentation in ThreadSanitizer (default)
996 .. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>..., -fsanitize-trap (equivalent to -fsanitize-trap=all), -fsanitize-undefined-trap-on-error (equivalent to -fsanitize-trap=undefined)
998 Enable trapping for specified sanitizers
1000 .. option:: -fsanitize-undefined-strip-path-components=<number>
1002 Strip (or keep only, if negative) a given number of path components when emitting check metadata.
1004 .. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
1006 Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
1008 .. option:: -moutline, -mno-outline
1010 Enable function outlining (AArch64 only)
1012 .. option:: -moutline-atomics, -mno-outline-atomics
1014 Generate local calls to out-of-line atomic operations
1016 .. option:: --param <arg>, --param=<arg>
1018 .. option:: -print-supported-cpus, --print-supported-cpus, -mcpu=?, -mtune=?
1020 Print supported cpu models for the given target (if target is not specified, it will print the supported cpus for the default target)
1022 .. option:: -std=<arg>, --std=<arg>, --std <arg>
1024 Language standard to compile for
1029 Flags controlling the behavior of the Clang preprocessor.
1031 .. option:: -C, --comments
1033 Include comments in preprocessed output
1035 .. option:: -CC, --comments-in-macros
1037 Include comments from within macros in preprocessed output
1039 .. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
1041 Define <macro> to <value> (or 1 if <value> omitted)
1043 .. option:: -H, --trace-includes
1045 Show header includes and nesting depth
1047 .. option:: -P, --no-line-commands
1049 Disable linemarker output in -E mode
1051 .. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
1053 Undefine macro <macro>
1055 .. option:: -Wp,<arg>,<arg2>...
1057 Pass the comma separated arguments in <arg> to the preprocessor
1059 .. option:: -Xpreprocessor <arg>
1061 Pass <arg> to the preprocessor
1063 .. option:: -fmacro-prefix-map=<arg>
1065 remap file source paths in predefined preprocessor macros
1067 Include path management
1068 -----------------------
1070 Flags controlling how ``#include``\s are resolved to files.
1072 .. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
1074 Add directory to include search path. For C++ inputs, if
1075 there are multiple -I options, these directories are searched
1076 in the order they are given before the standard system directories
1077 are searched. If the same directory is in the SYSTEM include search
1078 paths, for example if also specified with -isystem, the -I option
1081 .. option:: -I-, --include-barrier
1083 Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
1085 .. option:: --amdgpu-arch-tool=<arg>
1087 Tool used for detecting AMD GPU arch in the system.
1089 .. option:: --cuda-path-ignore-env
1091 Ignore environment variables to detect CUDA installation
1093 .. option:: --cuda-path=<arg>
1095 CUDA installation path
1097 .. option:: -cxx-isystem<directory>
1099 Add directory to the C++ SYSTEM include search path
1101 .. option:: -fbuild-session-file=<file>
1103 Use the last modification time of <file> as the build session timestamp
1105 .. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
1107 Time when the current build session started
1109 .. option:: -fmodule-file=\[<name>=\]<file>
1111 Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.
1113 .. option:: -fmodules-cache-path=<directory>
1115 Specify the module cache path
1117 .. option:: -fmodules-disable-diagnostic-validation
1119 Disable validation of the diagnostic options when loading the module
1121 .. option:: -fmodules-prune-after=<seconds>
1123 Specify the interval (in seconds) after which a module file will be considered unused
1125 .. option:: -fmodules-prune-interval=<seconds>
1127 Specify the interval (in seconds) between attempts to prune the module cache
1129 .. option:: -fmodules-user-build-path <directory>
1131 Specify the module user build path
1133 .. option:: -fmodules-validate-once-per-build-session
1135 Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
1137 .. option:: -fmodules-validate-system-headers, -fno-modules-validate-system-headers
1139 Validate the system headers that a module depends on when loading the module
1141 .. option:: -fprebuilt-module-path=<directory>
1143 Specify the prebuilt module path
1145 .. option:: --hip-path=<arg>
1147 HIP runtime installation path, used for finding HIP version and adding HIP include path.
1149 .. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
1151 Add directory to AFTER include search path
1153 .. option:: -iframework<arg>
1155 Add directory to SYSTEM framework search path
1157 .. option:: -iframeworkwithsysroot<directory>
1159 Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
1161 .. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
1163 Include macros from file before parsing
1165 .. option:: -include<file>, --include<file>, --include=<arg>
1167 Include file before parsing
1169 .. option:: -include-pch <file>
1171 Include precompiled header file
1173 .. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
1175 Set the -iwithprefix/-iwithprefixbefore prefix
1177 .. option:: -iquote<directory>
1179 Add directory to QUOTE include search path
1181 .. option:: -isysroot<dir>
1183 Set the system root directory (usually /)
1185 .. option:: -isystem<directory>
1187 Add directory to SYSTEM include search path
1189 .. option:: -isystem-after<directory>
1191 Add directory to end of the SYSTEM include search path
1193 .. option:: -ivfsoverlay<arg>
1195 Overlay the virtual filesystem described by file over the real file system
1197 .. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
1199 Set directory to SYSTEM include search path with prefix
1201 .. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
1203 Set directory to include search path with prefix
1205 .. option:: -iwithsysroot<directory>
1207 Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
1209 .. option:: --libomptarget-amdgcn-bc-path=<arg>
1211 Path to libomptarget-amdgcn bitcode library
1213 .. option:: --libomptarget-nvptx-bc-path=<arg>
1215 Path to libomptarget-nvptx bitcode library
1217 .. option:: --ptxas-path=<arg>
1219 Path to ptxas (used for compiling CUDA code)
1221 .. option:: --rocm-path=<arg>
1223 ROCm installation path, used for finding and automatically linking required bitcode libraries.
1226 .. option:: -stdlib++-isystem<directory>
1229 Use directory as the C++ standard library include path
1231 .. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
1233 Treat all #include paths starting with <prefix> as including a system header.
1235 Dependency file generation
1236 --------------------------
1238 Flags controlling generation of a dependency file for ``make``-like build
1241 .. option:: -M, --dependencies
1243 Like -MD, but also implies -E and writes to stdout by default
1245 .. option:: -MD, --write-dependencies
1247 Write a depfile containing user and system headers
1249 .. option:: -MF<file>
1251 Write depfile output from -MMD, -MD, -MM, or -M to <file>
1253 .. option:: -MG, --print-missing-file-dependencies
1255 Add missing headers to depfile
1257 .. option:: -MJ<arg>
1259 Write a compilation database entry per input
1261 .. option:: -MM, --user-dependencies
1263 Like -MMD, but also implies -E and writes to stdout by default
1265 .. option:: -MMD, --write-user-dependencies
1267 Write a depfile containing user headers
1271 Create phony target for each dependency (other than main file)
1273 .. option:: -MQ<arg>
1275 Specify name of main file output to quote in depfile
1277 .. option:: -MT<arg>
1279 Specify name of main file output in depfile
1283 Use NMake/Jom format for the depfile
1285 Dumping preprocessor state
1286 --------------------------
1288 Flags allowing the state of the preprocessor to be dumped in various ways.
1298 Print macro definitions in -E mode in addition to normal output
1302 Print include directives in -E mode in addition to normal output
1306 Print macro definitions in -E mode instead of normal output
1311 Flags controlling which warnings, errors, and remarks Clang will generate.
1312 See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
1314 .. option:: -R<remark>
1316 Enable the specified remark
1318 .. option:: -Rpass-analysis=<arg>
1320 Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
1322 .. option:: -Rpass-missed=<arg>
1324 Report missed transformations by optimization passes whose name matches the given POSIX regular expression
1326 .. option:: -Rpass=<arg>
1328 Report transformations performed by optimization passes whose name matches the given POSIX regular expression
1330 .. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
1332 Enable the specified warning
1334 .. option:: -Wdeprecated, -Wno-deprecated
1336 Enable warnings for deprecated constructs and define \_\_DEPRECATED
1338 .. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
1340 Target-independent compilation options
1341 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1342 .. option:: -Wframe-larger-than=<arg>
1344 .. option:: -fPIC, -fno-PIC
1346 .. option:: -fPIE, -fno-PIE
1348 .. option:: -faccess-control, -fno-access-control
1350 .. option:: -faddrsig, -fno-addrsig
1352 Emit an address-significance table
1354 .. option:: -falign-functions, -fno-align-functions
1357 .. option:: -falign-functions=<arg>
1361 .. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
1364 Enable C++17 aligned allocation functions
1366 .. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders
1368 Treat editor placeholders as valid source code
1370 .. option:: -fallow-unsupported
1372 .. option:: -faltivec, -fno-altivec
1374 .. option:: -fansi-escape-codes
1376 Use ANSI escape codes for diagnostics
1378 .. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
1380 Use Apple's kernel extensions ABI
1382 .. option:: -fapple-link-rtlib
1384 Force linking the clang builtins runtime library
1386 .. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
1388 Enable Apple gcc-compatible #pragma pack handling
1390 .. option:: -fapplication-extension, -fno-application-extension
1392 Restrict code to those available for App Extensions
1394 .. option:: -fasm, -fno-asm
1396 .. option:: -fasm-blocks, -fno-asm-blocks
1398 .. option:: -fassociative-math, -fno-associative-math
1400 .. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
1408 .. option:: -fasync-exceptions, -fno-async-exceptions
1410 Enable EH Asynchronous exceptions
1412 .. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
1414 .. option:: -fautolink, -fno-autolink
1416 .. option:: -fbasic-block-sections=<arg>
1418 Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section.
1420 .. option:: -fbinutils-version=<major.minor>
1422 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.
1424 .. option:: -fblocks, -fno-blocks
1426 Enable the 'blocks' language feature
1428 .. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
1430 .. option:: -fborland-extensions, -fno-borland-extensions
1432 Accept non-standard constructs supported by the Borland compiler
1434 .. option:: -fbracket-depth=<arg>
1436 .. option:: -fbuiltin, -fno-builtin
1438 .. option:: -fbuiltin-module-map
1440 Load the clang builtins module map file.
1443 .. option:: -fc++-static-destructors, -fno-c++-static-destructors
1446 .. option:: -fcaret-diagnostics, -fno-caret-diagnostics
1448 .. option:: -fcf-protection=<arg>, -fcf-protection (equivalent to -fcf-protection=full)
1450 Instrument control-flow architecture protection. Options: return, branch, full, none.
1452 .. option:: -fcf-runtime-abi=<arg>
1454 .. option:: -fchar8\_t, -fno-char8\_t
1456 Enable C++ builtin type char8\_t
1458 .. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
1460 .. option:: -fcolor-diagnostics, -fno-color-diagnostics
1462 Enable colors in diagnostics
1464 .. option:: -fcommon, -fno-common
1466 Place uninitialized global variables in a common block
1468 .. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
1470 .. option:: -fconstant-cfstrings, -fno-constant-cfstrings
1472 .. option:: -fconstant-string-class=<arg>
1474 .. option:: -fconstexpr-backtrace-limit=<arg>
1476 .. option:: -fconstexpr-depth=<arg>
1478 .. option:: -fconstexpr-steps=<arg>
1480 .. option:: -fconvergent-functions
1482 Assume functions may be convergent
1484 .. option:: -fcoroutines-ts, -fno-coroutines-ts
1486 Enable support for the C++ Coroutines TS
1488 .. option:: -fcoverage-compilation-dir=<arg>
1490 The compilation directory to embed in the coverage mapping.
1492 .. option:: -fcoverage-mapping, -fno-coverage-mapping
1494 Generate coverage mapping to enable code coverage analysis
1496 .. option:: -fcoverage-prefix-map=<arg>
1498 remap file source paths in coverage mapping
1500 .. option:: -fcreate-profile
1502 .. option:: -fcs-profile-generate
1504 Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1507 .. option:: -fcs-profile-generate=<directory>
1510 Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
1512 .. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
1514 Use approximate transcendental functions
1516 .. option:: -fcuda-short-ptr, -fno-cuda-short-ptr
1518 Use 32-bit pointers for accessing const/local/shared address spaces
1520 .. option:: -fcxx-exceptions, -fno-cxx-exceptions
1522 Enable C++ exceptions
1524 .. option:: -fcxx-modules, -fno-cxx-modules
1526 .. option:: -fdata-sections, -fno-data-sections
1528 Place each data in its own section
1530 .. option:: -fdebug-compilation-dir=<arg>, -fdebug-compilation-dir <arg>
1532 The compilation directory to embed in the debug info
1534 .. option:: -fdebug-default-version=<arg>
1536 Default DWARF version to use, if a -g option caused DWARF debug info to be produced
1538 .. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
1540 Emit extra debug info to make sample profile more accurate
1542 .. option:: -fdebug-macro, -fno-debug-macro
1544 Emit macro debug information
1546 .. option:: -fdebug-pass-arguments
1548 .. option:: -fdebug-pass-structure
1550 .. option:: -fdebug-prefix-map=<arg>
1552 remap file source paths in debug info
1554 .. option:: -fdebug-ranges-base-address, -fno-debug-ranges-base-address
1556 Use DWARF base address selection entries in .debug\_ranges
1558 .. option:: -fdebug-types-section, -fno-debug-types-section
1560 Place debug types in their own section (ELF Only)
1562 .. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
1564 Parse templated function definitions at the end of the translation unit
1566 .. option:: -fdelete-null-pointer-checks, -fno-delete-null-pointer-checks
1568 Treat usage of null pointers as undefined behavior (default)
1570 .. option:: -fdenormal-fp-math=<arg>
1572 .. option:: -fdiagnostics-absolute-paths
1574 Print absolute paths in diagnostics
1576 .. option:: -fdiagnostics-color, -fno-diagnostics-color
1579 .. option:: -fdiagnostics-color=<arg>
1582 .. option:: -fdiagnostics-hotness-threshold=<value>
1584 Prevent optimization remarks from being output if they do not have at least this profile count. Use 'auto' to apply the threshold from profile summary
1586 .. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
1588 Enable profile hotness information in diagnostic line
1590 .. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
1592 Display include stacks for diagnostic notes
1594 .. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
1596 Print option name with mappable diagnostics
1598 .. option:: -fdiagnostics-show-template-tree
1600 Print a template comparison tree for differing templates
1602 .. option:: -fdigraphs, -fno-digraphs
1604 Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)
1606 .. option:: -fdirect-access-external-data, -fno-direct-access-external-data
1608 Don't use GOT indirection to reference external data symbols
1610 .. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
1612 Allow '$' in identifiers
1614 .. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes
1616 Enable '\[\[\]\]' attributes in all C and C++ language modes
1618 .. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
1620 .. option:: -fdwarf-exceptions
1622 Use DWARF style exceptions
1624 .. option:: -felide-constructors, -fno-elide-constructors
1626 .. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
1628 .. option:: -feliminate-unused-debug-types, -fno-eliminate-unused-debug-types
1630 Do not emit debug info for defined but unused types
1632 .. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
1634 Embed LLVM bitcode (option: off, all, bitcode, marker)
1636 .. option:: -femit-all-decls
1638 Emit all declarations, even if unused
1640 .. option:: -femulated-tls, -fno-emulated-tls
1642 Use emutls functions to access thread\_local variables
1644 .. option:: -fenable-matrix
1646 Enable matrix data type and related builtin functions
1648 .. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
1650 .. option:: -ferror-limit=<arg>
1652 .. option:: -fescaping-block-tail-calls, -fno-escaping-block-tail-calls
1654 .. option:: -fexceptions, -fno-exceptions
1656 Enable support for exception handling
1658 .. option:: -fexec-charset=<arg>
1660 .. option:: -fexperimental-new-constant-interpreter
1662 Enable the experimental new constant interpreter
1664 .. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
1666 .. option:: -fextend-arguments=<arg>
1668 Controls how scalar integer arguments are extended in calls to unprototyped and varargs functions
1670 .. option:: -ffast-math, -fno-fast-math
1672 Allow aggressive, lossy floating-point optimizations
1674 .. option:: -ffile-compilation-dir=<arg>
1676 The compilation directory to embed in the debug info and coverage mapping.
1678 .. option:: -ffile-prefix-map=<arg>
1680 remap file source paths in debug info and predefined preprocessor macros
1682 .. option:: -ffinite-loops, -fno-finite-loops
1684 Assume all loops are finite.
1686 .. option:: -ffinite-math-only, -fno-finite-math-only
1688 .. option:: -ffixed-point, -fno-fixed-point
1690 Enable fixed point types
1692 .. option:: -ffor-scope, -fno-for-scope
1694 .. option:: -fforce-dwarf-frame, -fno-force-dwarf-frame
1696 Always emit a debug frame section
1698 .. option:: -fforce-emit-vtables, -fno-force-emit-vtables
1700 Emits more virtual tables to improve devirtualization
1702 .. option:: -fforce-enable-int128, -fno-force-enable-int128
1704 Enable support for int128\_t type
1706 .. option:: -ffp-contract=<arg>
1708 Form fused FP ops (e.g. FMAs): fast (fuses across statements disregarding pragmas) \| on (only fuses in the same statement unless dictated by pragmas) \| off (never fuses) \| fast-honor-pragmas (fuses across statements unless dictated by pragmas). Default is 'fast' for CUDA, 'fast-honor-pragmas' for HIP, and 'on' otherwise.
1710 .. option:: -ffp-exception-behavior=<arg>
1712 Specifies the exception behavior of floating-point operations.
1714 .. option:: -ffp-model=<arg>
1716 Controls the semantics of floating-point calculations.
1718 .. option:: -ffreestanding
1720 Assert that the compilation takes place in a freestanding environment
1722 .. option:: -ffunction-sections, -fno-function-sections
1724 Place each function in its own section
1726 .. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
1728 .. option:: -fgnu-keywords, -fno-gnu-keywords
1730 Allow GNU-extension keywords regardless of language standard
1732 .. option:: -fgnu-runtime
1734 Generate output compatible with the standard GNU Objective-C runtime
1736 .. option:: -fgnu89-inline, -fno-gnu89-inline
1738 Use the gnu89 inline semantics
1740 .. option:: -fgnuc-version=<arg>
1742 Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)
1744 .. option:: -fgpu-allow-device-init, -fno-gpu-allow-device-init
1746 Allow device side init function in HIP (experimental)
1748 .. option:: -fgpu-defer-diag, -fno-gpu-defer-diag
1750 Defer host/device related diagnostic messages for CUDA/HIP
1752 .. option:: -fgpu-rdc, -fcuda-rdc, -fno-gpu-rdc
1754 Generate relocatable device code, also known as separate compilation mode
1756 .. option:: -fgpu-sanitize, -fno-gpu-sanitize
1758 Enable sanitizer for AMDGPU target
1760 .. option:: -fhip-fp32-correctly-rounded-divide-sqrt, -fno-hip-fp32-correctly-rounded-divide-sqrt
1762 Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded (HIP device compilation only)
1764 .. option:: -fhip-new-launch-api, -fno-hip-new-launch-api
1766 Use new kernel launching API for HIP
1768 .. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
1770 .. option:: -fhonor-nans, -fno-honor-nans
1772 .. option:: -fhosted
1774 .. option:: -fignore-exceptions
1776 Enable support for ignoring exception handling constructs
1778 .. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
1780 Implicitly search the file system for module map files.
1782 .. option:: -fimplicit-modules, -fno-implicit-modules
1784 .. option:: -finput-charset=<arg>
1786 Specify the default character set for source files
1788 .. option:: -finstrument-function-entry-bare
1790 Instrument function entry only, after inlining, without arguments to the instrumentation call
1792 .. option:: -finstrument-functions
1794 Generate calls to instrument function entry and exit
1796 .. option:: -finstrument-functions-after-inlining
1798 Like -finstrument-functions, but insert the calls after inlining
1800 .. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
1802 Enable the integrated assembler
1804 .. option:: -fintegrated-cc1, -fno-integrated-cc1
1808 .. option:: -fjump-tables, -fno-jump-tables
1810 Use jump tables for lowering switches
1812 .. option:: -fkeep-static-consts, -fno-keep-static-consts
1814 Keep static const variables if unused
1816 .. option:: -flax-vector-conversions=<arg>, -flax-vector-conversions (equivalent to -flax-vector-conversions=integer), -fno-lax-vector-conversions (equivalent to -flax-vector-conversions=none)
1818 Enable implicit vector bit-casts
1820 .. option:: -flimited-precision=<arg>
1822 .. option:: -flto, -fno-lto
1824 Enable LTO in 'full' mode
1826 .. option:: -flto-jobs=<arg>
1828 Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
1831 .. option:: -flto=<arg>
1834 Set LTO mode to either 'full' or 'thin'
1837 .. option:: -flto=auto
1841 .. option:: -flto=jobserver
1844 .. option:: -fmacro-backtrace-limit=<arg>
1846 .. option:: -fmath-errno, -fno-math-errno
1848 Require math functions to indicate errors by setting errno
1850 .. option:: -fmax-tokens=<arg>
1852 Max total number of preprocessed tokens for -Wmax-tokens.
1854 .. option:: -fmax-type-align=<arg>
1856 Specify the maximum alignment to enforce on pointers lacking an explicit alignment
1858 .. option:: -fmemory-profile, -fno-memory-profile
1860 Enable heap memory profiling
1863 .. option:: -fmemory-profile=<directory>
1866 Enable heap memory profiling and dump results into <directory>
1868 .. option:: -fmerge-all-constants, -fno-merge-all-constants
1870 Allow merging of constants
1872 .. option:: -fmessage-length=<arg>
1874 Format message diagnostics so that they fit within N columns
1876 .. option:: -fmodule-file-deps, -fno-module-file-deps
1878 .. option:: -fmodule-map-file=<file>
1880 Load this module map file
1882 .. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>
1884 Specify the name of the module to build
1886 .. option:: -fmodules, -fno-modules
1888 Enable the 'modules' language feature
1890 .. option:: -fmodules-decluse, -fno-modules-decluse
1892 Require declaration of modules used within a module
1894 .. option:: -fmodules-ignore-macro=<arg>
1896 Ignore the definition of the given macro when building and loading modules
1898 .. option:: -fmodules-search-all, -fno-modules-search-all
1900 Search even non-imported modules to resolve references
1902 .. option:: -fmodules-strict-decluse
1904 Like -fmodules-decluse but requires all headers to be in modules
1906 .. option:: -fmodules-ts
1908 Enable support for the C++ Modules TS
1910 .. option:: -fmodules-validate-input-files-content
1912 Validate PCM input files based on content if mtime differs
1914 .. option:: -fms-compatibility, -fno-ms-compatibility
1916 Enable full Microsoft Visual C++ compatibility
1918 .. option:: -fms-compatibility-version=<arg>
1920 Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1922 .. option:: -fms-extensions, -fno-ms-extensions
1924 Accept some non-standard constructs supported by the Microsoft compiler
1926 .. option:: -fms-memptr-rep=<arg>
1928 .. option:: -fms-volatile
1930 .. option:: -fmsc-version=<arg>
1932 Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
1934 .. option:: -fmudflap
1936 .. option:: -fmudflapth
1938 .. option:: -fnested-functions
1940 .. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
1942 Specifies the largest alignment guaranteed by '::operator new(size\_t)'
1944 .. option:: -fnew-infallible
1946 Treats throwing global C++ operator new as always returning valid memory (annotates with \_\_attribute\_\_((returns\_nonnull)) and throw()). This is detectable in source.
1948 .. option:: -fnext-runtime
1950 .. option:: -fno-builtin-<arg>
1952 Disable implicit builtin knowledge of a specific function
1954 .. option:: -fno-elide-type
1956 Do not elide types when printing diagnostics
1958 .. option:: -fno-max-type-align
1960 .. option:: -fno-strict-modules-decluse
1962 .. option:: -fno-temp-file
1964 Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes
1966 .. option:: -fno-working-directory
1968 .. option:: -fno\_modules-validate-input-files-content
1971 .. option:: -fno\_pch-validate-input-files-content
1974 .. option:: -fnoxray-link-deps
1976 .. option:: -fobjc-abi-version=<arg>
1978 .. option:: -fobjc-arc, -fno-objc-arc
1980 Synthesize retain and release calls for Objective-C pointers
1982 .. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
1984 Use EH-safe code when synthesizing retains and releases in -fobjc-arc
1986 .. option:: -fobjc-convert-messages-to-runtime-calls, -fno-objc-convert-messages-to-runtime-calls
1988 .. option:: -fobjc-disable-direct-methods-for-testing
1990 Ignore attribute objc\_direct so that direct methods can be tested
1992 .. option:: -fobjc-encode-cxx-class-template-spec, -fno-objc-encode-cxx-class-template-spec
1994 Fully encode c++ class template specialization
1996 .. option:: -fobjc-exceptions, -fno-objc-exceptions
1998 Enable Objective-C exceptions
2000 .. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
2002 .. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
2004 .. option:: -fobjc-link-runtime
2006 .. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
2008 .. option:: -fobjc-nonfragile-abi-version=<arg>
2010 .. option:: -fobjc-runtime=<arg>
2012 Specify the target Objective-C runtime kind and version
2014 .. option:: -fobjc-sender-dependent-dispatch
2016 .. option:: -fobjc-weak, -fno-objc-weak
2018 Enable ARC-style weak references in Objective-C
2020 .. option:: -foffload-lto, -fno-offload-lto
2022 Enable LTO in 'full' mode for offload compilation
2025 .. option:: -foffload-lto=<arg>
2028 Set LTO mode to either 'full' or 'thin' for offload compilation
2030 .. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
2032 .. option:: -fopenmp, -fno-openmp
2034 Parse OpenMP pragmas and generate parallel code.
2036 .. option:: -fopenmp-simd, -fno-openmp-simd
2038 Emit OpenMP code only for SIMD-based constructs.
2040 .. option:: -fopenmp-version=<arg>
2043 .. option:: -fopenmp=<arg>
2046 .. option:: -foperator-arrow-depth=<arg>
2048 .. option:: -foperator-names, -fno-operator-names
2050 .. option:: -foptimization-record-file=<file>
2052 Specify the output name of the file containing the optimization remarks. Implies -fsave-optimization-record. On Darwin platforms, this cannot be used with multiple -arch <arch> options.
2054 .. option:: -foptimization-record-passes=<regex>
2056 Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)
2058 .. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
2060 .. option:: -forder-file-instrumentation
2062 Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
2064 .. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
2066 .. option:: -fpack-struct, -fno-pack-struct
2069 .. option:: -fpack-struct=<arg>
2072 Specify the default maximum struct packing alignment
2074 .. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
2076 Recognize and construct Pascal-style string literals
2078 .. option:: -fpass-plugin=<dsopath>
2080 Load pass plugin from a dynamic shared object file (only with new pass manager).
2082 .. option:: -fpatchable-function-entry=<N,M>
2084 Generate M NOPs before function entry and N-M NOPs after function entry
2086 .. option:: -fpcc-struct-return
2088 Override the default ABI to return all structs on the stack
2090 .. option:: -fpch-codegen, -fno-pch-codegen
2092 Generate code for uses of this PCH that assumes an explicit object file will be built for the PCH
2094 .. option:: -fpch-debuginfo, -fno-pch-debuginfo
2096 Generate debug info for types in an object file built from this PCH and do not generate them elsewhere
2098 .. option:: -fpch-instantiate-templates, -fno-pch-instantiate-templates
2100 Instantiate templates already while building a PCH
2102 .. option:: -fpch-preprocess
2104 .. option:: -fpch-validate-input-files-content
2106 Validate PCH input files based on content if mtime differs
2108 .. option:: -fpic, -fno-pic
2110 .. option:: -fpie, -fno-pie
2112 .. option:: -fplt, -fno-plt
2114 .. option:: -fplugin=<dsopath>
2116 Load the named plugin (dynamic shared object)
2118 .. option:: -fprebuilt-implicit-modules, -fno-prebuilt-implicit-modules
2120 Look up implicit modules in the prebuilt module path
2122 .. option:: -fpreserve-as-comments, -fno-preserve-as-comments
2124 .. option:: -fproc-stat-report<arg>
2126 Print subprocess statistics
2129 .. option:: -fproc-stat-report=<arg>
2132 Save subprocess statistics to the given file
2134 .. option:: -fprofile-arcs, -fno-profile-arcs
2136 .. option:: -fprofile-dir=<arg>
2138 .. option:: -fprofile-exclude-files=<arg>
2140 Instrument only functions from files where names don't match all the regexes separated by a semi-colon
2142 .. option:: -fprofile-filter-files=<arg>
2144 Instrument only functions from files where names match any regex separated by a semi-colon
2146 .. option:: -fprofile-generate, -fno-profile-generate
2148 Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
2151 .. option:: -fprofile-generate=<directory>
2154 Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
2156 .. option:: -fprofile-instr-generate, -fno-profile-instr-generate
2158 Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
2161 .. option:: -fprofile-instr-generate=<file>
2164 Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
2166 .. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
2169 .. option:: -fprofile-instr-use=<arg>
2172 Use instrumentation data for profile-guided optimization
2174 .. option:: -fprofile-list=<arg>
2176 Filename defining the list of functions/files to instrument
2178 .. option:: -fprofile-remapping-file=<file>
2180 Use the remappings described in <file> to match the profile data against names in the program
2182 .. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate
2184 Specifies that the sample profile is accurate. If the sample
2185 profile is accurate, callsites without profile samples are marked
2186 as cold. Otherwise, treat callsites without profile samples as if
2189 .. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
2192 .. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
2195 Enable sample-based profile guided optimizations
2197 .. option:: -fprofile-update=<method>
2199 Set update method of profile counters (atomic,prefer-atomic,single)
2202 .. option:: -fprofile-use=<pathname>
2205 Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
2207 .. option:: -fpseudo-probe-for-profiling, -fno-pseudo-probe-for-profiling
2209 Emit pseudo probes for sample profiling
2211 .. option:: -freciprocal-math, -fno-reciprocal-math
2213 Allow division operations to be reassociated
2215 .. option:: -freg-struct-return
2217 Override the default ABI to return small structs in registers
2219 .. option:: -fregister-global-dtors-with-atexit, -fno-register-global-dtors-with-atexit
2221 Use atexit or \_\_cxa\_atexit to register global destructors
2223 .. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
2225 Enable C++17 relaxed template template argument matching
2227 .. option:: -freroll-loops, -fno-reroll-loops
2229 Turn on loop reroller
2231 .. option:: -fretain-comments-from-system-headers
2233 .. option:: -frewrite-imports, -fno-rewrite-imports
2235 .. option:: -frewrite-includes, -fno-rewrite-includes
2237 .. option:: -frewrite-map-file=<arg>
2239 .. option:: -fropi, -fno-ropi
2241 Generate read-only position independent code (ARM only)
2243 .. option:: -frounding-math, -fno-rounding-math
2245 .. option:: -frtti, -fno-rtti
2247 .. option:: -frtti-data, -fno-rtti-data
2249 .. option:: -frwpi, -fno-rwpi
2251 Generate read-write position independent code (ARM only)
2253 .. option:: -fsave-optimization-record, -fno-save-optimization-record
2255 Generate a YAML optimization record file
2258 .. option:: -fsave-optimization-record=<format>
2261 Generate an optimization record file in a specific format
2263 .. option:: -fseh-exceptions
2265 Use SEH style exceptions
2267 .. option:: -fsemantic-interposition, -fno-semantic-interposition
2269 .. option:: -fshort-enums, -fno-short-enums
2271 Allocate to an enum type only as many bytes as it needs for the declared range of possible values
2273 .. option:: -fshort-wchar, -fno-short-wchar
2275 Force wchar\_t to be a short unsigned int
2277 .. option:: -fshow-column, -fno-show-column
2279 .. option:: -fshow-overloads=<arg>
2281 Which overload candidates to show when overload resolution fails: best\|all; defaults to all
2283 .. option:: -fshow-source-location, -fno-show-source-location
2285 .. option:: -fsignaling-math, -fno-signaling-math
2287 .. option:: -fsigned-bitfields
2289 .. option:: -fsigned-char, -fno-signed-char, --signed-char
2293 .. option:: -fsigned-zeros, -fno-signed-zeros
2295 .. option:: -fsized-deallocation, -fno-sized-deallocation
2297 Enable C++14 sized global deallocation functions
2299 .. option:: -fsjlj-exceptions
2301 Use SjLj style exceptions
2303 .. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
2305 Enable the superword-level parallelism vectorization passes
2307 .. option:: -fspell-checking, -fno-spell-checking
2309 .. option:: -fspell-checking-limit=<arg>
2311 .. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
2313 Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF
2315 .. option:: -fsplit-lto-unit, -fno-split-lto-unit
2317 Enables splitting of the LTO unit
2319 .. option:: -fsplit-machine-functions, -fno-split-machine-functions
2321 Enable late function splitting using profile information (x86 ELF)
2323 .. option:: -fsplit-stack, -fno-split-stack
2327 .. option:: -fstack-clash-protection, -fno-stack-clash-protection
2329 Enable stack clash protection
2331 .. option:: -fstack-protector, -fno-stack-protector
2333 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 is 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.
2335 .. option:: -fstack-protector-all
2337 Enable stack protectors for all functions
2339 .. option:: -fstack-protector-strong
2341 Enable stack protectors for some functions vulnerable to stack smashing. Compared to -fstack-protector, this uses a stronger heuristic that includes functions containing arrays of any size (and any type), as well as any calls to alloca or the taking of an address from a local variable
2343 .. option:: -fstack-size-section, -fno-stack-size-section
2345 Emit section containing metadata on function stack sizes
2347 .. option:: -fstack-usage
2349 Emit .su file containing information on function stack sizes
2351 .. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
2353 Emit full debug info for all types used by the program
2355 .. option:: -fstrict-aliasing, -fno-strict-aliasing
2357 .. option:: -fstrict-enums, -fno-strict-enums
2359 Enable optimizations based on the strict definition of an enum's value range
2361 .. option:: -fstrict-float-cast-overflow, -fno-strict-float-cast-overflow
2363 Assume that overflowing float-to-int casts are undefined (default)
2365 .. option:: -fstrict-overflow, -fno-strict-overflow
2367 .. option:: -fstrict-return, -fno-strict-return
2369 .. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
2371 Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
2373 .. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
2375 .. option:: -fsymbol-partition=<arg>
2377 .. option:: -ftabstop=<arg>
2379 .. option:: -ftemplate-backtrace-limit=<arg>
2381 .. option:: -ftemplate-depth-<arg>
2383 .. option:: -ftemplate-depth=<arg>
2385 .. option:: -ftest-coverage, -fno-test-coverage
2387 .. option:: -fthin-link-bitcode=<arg>
2389 Write minimized bitcode to <file> for the ThinLTO thin link only
2391 .. option:: -fthinlto-index=<arg>
2393 Perform ThinLTO importing using provided function summary index
2395 .. option:: -fthreadsafe-statics, -fno-threadsafe-statics
2397 .. option:: -ftime-report
2400 .. option:: -ftime-report=<arg>
2403 (For new pass manager) "per-pass": one report for each pass; "per-pass-run": one report for each pass invocation
2405 .. option:: -ftime-trace
2408 Turn on time profiler. Generates JSON file based on output filename. Results
2409 can be analyzed with chrome://tracing or `Speedscope App
2410 <https://www.speedscope.app>`_ for flamegraph visualization.
2412 .. option:: -ftime-trace-granularity=<arg>
2414 Minimum time granularity (in microseconds) traced by time profiler
2416 .. option:: -ftls-model=<arg>
2418 .. option:: -ftrap-function=<arg>
2420 Issue call to specified function rather than a trap instruction
2422 .. option:: -ftrapping-math, -fno-trapping-math
2426 Trap on integer overflow
2428 .. option:: -ftrapv-handler <arg>
2431 .. option:: -ftrapv-handler=<function name>
2434 Specify the function to be called on overflow
2436 .. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
2438 Process trigraph sequences
2440 .. option:: -ftrivial-auto-var-init-stop-after=<arg>
2442 Stop initializing trivial automatic stack variables after the specified number of instances
2444 .. option:: -ftrivial-auto-var-init=<arg>
2446 Initialize trivial automatic stack variables: uninitialized (default) \| pattern
2448 .. option:: -funique-basic-block-section-names, -fno-unique-basic-block-section-names
2450 Use unique names for basic block sections (ELF Only)
2452 .. option:: -funique-internal-linkage-names, -fno-unique-internal-linkage-names
2454 Uniqueify Internal Linkage Symbol Names by appending the MD5 hash of the module path
2456 .. option:: -funique-section-names, -fno-unique-section-names
2458 .. option:: -funit-at-a-time, -fno-unit-at-a-time
2460 .. option:: -funroll-loops, -fno-unroll-loops
2462 Turn on loop unroller
2464 .. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
2466 .. option:: -funsigned-bitfields
2468 .. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
2470 .. option:: -funwind-tables, -fno-unwind-tables
2472 .. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
2474 .. option:: -fuse-init-array, -fno-use-init-array
2476 .. option:: -fuse-ld=<arg>
2478 .. option:: -fuse-line-directives, -fno-use-line-directives
2480 Use #line in preprocessed output
2482 .. option:: -fminimize-whitespace, -fno-minimize-whitespace
2484 Ignore the whitespace from the input file when emitting preprocessor
2485 output. It will only contain whitespace when necessary, e.g. to keep two
2486 minus signs from merging into to an increment operator. Useful with the
2487 -P option to normalize whitespace such that two files with only formatting
2490 Only valid with -E on C-like inputs and incompatible with -traditional-cpp.
2492 .. option:: -fvalidate-ast-input-files-content
2494 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
2496 .. option:: -fveclib=<arg>
2498 Use the given vector functions library
2500 .. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
2502 Enable the loop vectorization passes
2504 .. option:: -fverbose-asm, -dA, -fno-verbose-asm
2506 Generate verbose assembly output
2508 .. option:: -fvirtual-function-elimination, -fno-virtual-function-elimination
2510 Enables dead virtual function elimination optimization. Requires -flto=full
2512 .. option:: -fvisibility-dllexport=<arg>
2514 The visibility for dllexport definitions \[-fvisibility-from-dllstorageclass\]
2516 .. option:: -fvisibility-externs-dllimport=<arg>
2518 The visibility for dllimport external declarations \[-fvisibility-from-dllstorageclass\]
2520 .. option:: -fvisibility-externs-nodllstorageclass=<arg>
2522 The visibility for external declarations without an explicit DLL dllstorageclass \[-fvisibility-from-dllstorageclass\]
2524 .. option:: -fvisibility-from-dllstorageclass, -fno-visibility-from-dllstorageclass
2526 Set the visibility of symbols in the generated code from their DLL storage class
2528 .. option:: -fvisibility-global-new-delete-hidden
2530 Give global C++ operator new and delete declarations hidden visibility
2532 .. option:: -fvisibility-inlines-hidden, -fno-visibility-inlines-hidden
2534 Give inline C++ member functions hidden visibility by default
2536 .. option:: -fvisibility-inlines-hidden-static-local-var, -fno-visibility-inlines-hidden-static-local-var
2538 When -fvisibility-inlines-hidden is enabled, static variables in inline C++ member functions will also be given hidden visibility by default
2540 .. option:: -fvisibility-ms-compat
2542 Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
2544 .. option:: -fvisibility-nodllstorageclass=<arg>
2546 The visibility for definitions without an explicit DLL export class \[-fvisibility-from-dllstorageclass\]
2548 .. option:: -fvisibility=<arg>
2550 Set the default symbol visibility for all global declarations
2552 .. option:: -fwarn-stack-size=<arg>
2554 .. option:: -fwasm-exceptions
2556 Use WebAssembly style exceptions
2558 .. option:: -fwhole-program-vtables, -fno-whole-program-vtables
2560 Enables whole-program vtable optimization. Requires -flto
2562 .. option:: -fwrapv, -fno-wrapv
2564 Treat signed integer overflow as two's complement
2566 .. option:: -fwritable-strings
2568 Store string literals as writable data
2570 .. option:: -fxl-pragma-pack, -fno-xl-pragma-pack
2572 Enable IBM XL #pragma pack handling
2574 .. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents
2576 Always emit \_\_xray\_customevent(...) calls even if the containing function is not always instrumented
2578 .. option:: -fxray-always-emit-typedevents, -fno-xray-always-emit-typedevents
2580 Always emit \_\_xray\_typedevent(...) calls even if the containing function is not always instrumented
2582 .. option:: -fxray-always-instrument=<arg>
2584 DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
2586 .. option:: -fxray-attr-list=<arg>
2588 Filename defining the list of functions/types for imbuing XRay attributes.
2590 .. option:: -fxray-function-groups=<arg>
2592 Only instrument 1 of N groups
2594 .. option:: -fxray-function-index, -fno-xray-function-index
2596 .. option:: -fxray-ignore-loops, -fno-xray-ignore-loops
2598 Don't instrument functions with loops unless they also meet the minimum function size
2600 .. option:: -fxray-instruction-threshold<arg>
2603 .. option:: -fxray-instruction-threshold=<arg>
2606 Sets the minimum function size to instrument with XRay
2608 .. option:: -fxray-instrument, -fno-xray-instrument
2610 Generate XRay instrumentation sleds on function entry and exit
2612 .. option:: -fxray-instrumentation-bundle=<arg>
2614 Select which XRay instrumentation points to emit. Options: all, none, function-entry, function-exit, function, custom. Default is 'all'. 'function' includes both 'function-entry' and 'function-exit'.
2616 .. option:: -fxray-link-deps
2618 Tells clang to add the link dependencies for XRay.
2620 .. option:: -fxray-modes=<arg>
2622 List of modes to link in by default into XRay instrumented binaries.
2624 .. option:: -fxray-never-instrument=<arg>
2626 DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
2628 .. option:: -fxray-selected-function-group=<arg>
2630 When using -fxray-function-groups, select which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1
2632 .. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
2634 .. option:: -fzvector, -fno-zvector, -mzvector
2636 Enable System z vector language extension
2638 .. option:: --gpu-bundle-output, --no-gpu-bundle-output
2640 Bundle output files of HIP device compilation
2642 .. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
2644 Warn on language extensions
2646 .. option:: -pedantic-errors, --pedantic-errors
2650 .. option:: -cl-denorms-are-zero
2652 OpenCL only. Allow denormals to be flushed to zero.
2654 .. option:: -cl-fast-relaxed-math
2656 OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
2658 .. option:: -cl-finite-math-only
2660 OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
2662 .. option:: -cl-fp32-correctly-rounded-divide-sqrt
2664 OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
2666 .. option:: -cl-kernel-arg-info
2668 OpenCL only. Generate kernel argument metadata.
2670 .. option:: -cl-mad-enable
2672 OpenCL only. Allow use of less precise MAD computations in the generated binary.
2674 .. option:: -cl-no-signed-zeros
2676 OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
2678 .. option:: -cl-no-stdinc
2680 OpenCL only. Disables all standard includes containing non-native compiler types and functions.
2682 .. option:: -cl-opt-disable
2684 OpenCL only. This option disables all optimizations. By default optimizations are enabled.
2686 .. option:: -cl-single-precision-constant
2688 OpenCL only. Treat double precision floating-point constant as single precision constant.
2690 .. option:: -cl-std=<arg>
2692 OpenCL language standard to compile for.
2694 .. option:: -cl-strict-aliasing
2696 OpenCL only. This option is added for compatibility with OpenCL 1.0.
2698 .. option:: -cl-uniform-work-group-size
2700 OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel
2702 .. option:: -cl-unsafe-math-optimizations
2704 OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
2708 .. option:: -fsycl, -fno-sycl
2710 Enables SYCL kernels compilation for device
2712 .. option:: -sycl-std=<arg>
2714 SYCL language standard to compile for.
2716 Target-dependent compilation options
2717 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2718 .. option:: -G<size>, -G=<arg>, -msmall-data-limit=<arg>, -msmall-data-threshold=<arg>
2720 Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
2722 .. option:: -ffixed-x1
2724 Reserve the x1 register (AArch64/RISC-V only)
2726 .. option:: -ffixed-x10
2728 Reserve the x10 register (AArch64/RISC-V only)
2730 .. option:: -ffixed-x11
2732 Reserve the x11 register (AArch64/RISC-V only)
2734 .. option:: -ffixed-x12
2736 Reserve the x12 register (AArch64/RISC-V only)
2738 .. option:: -ffixed-x13
2740 Reserve the x13 register (AArch64/RISC-V only)
2742 .. option:: -ffixed-x14
2744 Reserve the x14 register (AArch64/RISC-V only)
2746 .. option:: -ffixed-x15
2748 Reserve the x15 register (AArch64/RISC-V only)
2750 .. option:: -ffixed-x16
2752 Reserve the x16 register (AArch64/RISC-V only)
2754 .. option:: -ffixed-x17
2756 Reserve the x17 register (AArch64/RISC-V only)
2758 .. option:: -ffixed-x18
2760 Reserve the x18 register (AArch64/RISC-V only)
2762 .. option:: -ffixed-x19
2764 Reserve the x19 register (AArch64/RISC-V only)
2766 .. option:: -ffixed-x2
2768 Reserve the x2 register (AArch64/RISC-V only)
2770 .. option:: -ffixed-x20
2772 Reserve the x20 register (AArch64/RISC-V only)
2774 .. option:: -ffixed-x21
2776 Reserve the x21 register (AArch64/RISC-V only)
2778 .. option:: -ffixed-x22
2780 Reserve the x22 register (AArch64/RISC-V only)
2782 .. option:: -ffixed-x23
2784 Reserve the x23 register (AArch64/RISC-V only)
2786 .. option:: -ffixed-x24
2788 Reserve the x24 register (AArch64/RISC-V only)
2790 .. option:: -ffixed-x25
2792 Reserve the x25 register (AArch64/RISC-V only)
2794 .. option:: -ffixed-x26
2796 Reserve the x26 register (AArch64/RISC-V only)
2798 .. option:: -ffixed-x27
2800 Reserve the x27 register (AArch64/RISC-V only)
2802 .. option:: -ffixed-x28
2804 Reserve the x28 register (AArch64/RISC-V only)
2806 .. option:: -ffixed-x29
2808 Reserve the x29 register (AArch64/RISC-V only)
2810 .. option:: -ffixed-x3
2812 Reserve the x3 register (AArch64/RISC-V only)
2814 .. option:: -ffixed-x30
2816 Reserve the x30 register (AArch64/RISC-V only)
2818 .. option:: -ffixed-x31
2820 Reserve the x31 register (AArch64/RISC-V only)
2822 .. option:: -ffixed-x4
2824 Reserve the x4 register (AArch64/RISC-V only)
2826 .. option:: -ffixed-x5
2828 Reserve the x5 register (AArch64/RISC-V only)
2830 .. option:: -ffixed-x6
2832 Reserve the x6 register (AArch64/RISC-V only)
2834 .. option:: -ffixed-x7
2836 Reserve the x7 register (AArch64/RISC-V only)
2838 .. option:: -ffixed-x8
2840 Reserve the x8 register (AArch64/RISC-V only)
2842 .. option:: -ffixed-x9
2844 Reserve the x9 register (AArch64/RISC-V only)
2852 .. option:: -mabi=<arg>
2855 .. option:: -mabi=vec-default
2858 Enable the default Altivec ABI on AIX (AIX only). Uses only volatile vector registers.
2861 .. option:: -mabi=vec-extabi
2864 Enable the extended Altivec ABI on AIX (AIX only). Uses volatile and nonvolatile vector registers
2866 .. option:: -maix-struct-return
2868 Return all structs in memory (PPC32 only)
2870 .. option:: -malign-branch-boundary=<arg>
2872 Specify the boundary's size to align branches
2874 .. option:: -malign-branch=<arg1>,<arg2>...
2876 Specify types of branches to align
2878 .. option:: -malign-double
2880 Align doubles to two words in structs (x86 only)
2882 .. option:: -mamdgpu-ieee, -mno-amdgpu-ieee
2884 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)
2886 .. option:: -march=<arg>
2888 .. option:: -masm=<arg>
2890 .. option:: -mbackchain, -mno-backchain
2892 Link stack frames through backchain on System Z
2894 .. option:: -mbranches-within-32B-boundaries
2896 Align selected branches (fused, jcc, jmp) within 32-byte boundary
2898 .. option:: -mcmodel=<arg>, -mcmodel=medany (equivalent to -mcmodel=medium), -mcmodel=medlow (equivalent to -mcmodel=small)
2900 .. option:: -mcode-object-v3, -mno-code-object-v3
2902 Legacy option to specify code object ABI V3 (AMDGPU only)
2904 .. option:: -mcode-object-version=<version>
2906 Specify code object ABI version. Defaults to 3. (AMDGPU only)
2908 .. option:: -mconsole<arg>
2911 .. option:: -mcpu=<arg>, -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62), -mv65 (equivalent to -mcpu=hexagonv65), -mv66 (equivalent to -mcpu=hexagonv66), -mv67 (equivalent to -mcpu=hexagonv67), -mv67t (equivalent to -mcpu=hexagonv67t), -mv68 (equivalent to -mcpu=hexagonv68)
2914 .. option:: -mcrc, -mno-crc
2916 Allow use of CRC instructions (ARM/Mips only)
2918 .. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg>
2920 .. option:: -mdll<arg>
2922 .. option:: -mdouble=<arg>
2924 Force double to be 32 bits or 64 bits
2926 .. option:: -mdynamic-no-pic<arg>
2928 .. option:: -meabi <arg>
2930 Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
2932 .. option:: -menable-experimental-extensions
2934 Enable use of experimental RISC-V extensions.
2936 .. option:: -mfentry
2938 Insert calls to fentry at function entry (x86/SystemZ only)
2940 .. option:: -mfloat-abi=<arg>
2942 .. option:: -mfpmath=<arg>
2944 .. option:: -mfpu=<arg>
2946 .. option:: -mglobal-merge, -mno-global-merge
2948 Enable merging of globals
2950 .. option:: -mhard-float
2952 .. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
2954 .. option:: -mhwmult=<arg>
2956 .. option:: -miamcu, -mno-iamcu
2960 .. option:: -mignore-xcoff-visibility
2962 Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file
2964 .. option:: -mimplicit-float, -mno-implicit-float
2966 .. option:: -mimplicit-it=<arg>
2968 .. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
2970 (integrated-as) Emit an object file which can be used with an incremental linker
2972 .. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
2974 .. option:: -mkernel
2976 .. option:: -mlong-calls, -mno-long-calls
2978 Generate branches with extended addressability, usually via indirect jumps.
2980 .. option:: -mlvi-cfi, -mno-lvi-cfi
2982 Enable only control-flow mitigations for Load Value Injection (LVI)
2984 .. option:: -mlvi-hardening, -mno-lvi-hardening
2986 Enable all mitigations for Load Value Injection (LVI)
2988 .. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
2990 Set Mac OS X deployment target
2992 .. option:: -mmcu=<arg>
2994 .. option:: -mms-bitfields, -mno-ms-bitfields
2996 Set the default structure layout to be compatible with the Microsoft compiler standard
2998 .. option:: -mnop-mcount
3000 Generate mcount/\_\_fentry\_\_ calls as nops. To activate they need to be patched in.
3002 .. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
3004 Omit frame pointer setup for leaf functions
3006 .. option:: -moslib=<arg>
3008 .. option:: -mpacked-stack, -mno-packed-stack
3010 Use packed stack layout (SystemZ only).
3012 .. option:: -mpad-max-prefix-size=<arg>
3014 Specify maximum number of prefixes to use for padding
3016 .. option:: -mprefer-vector-width=<arg>
3018 Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.
3020 .. option:: -mqdsp6-compat
3022 Enable hexagon-qdsp6 backward compatibility
3027 .. option:: -mrecip=<arg1>,<arg2>...
3030 .. option:: -mrecord-mcount
3032 Generate a \_\_mcount\_loc section entry for each \_\_fentry\_\_ call.
3034 .. option:: -mred-zone, -mno-red-zone
3036 .. option:: -mregparm=<arg>
3038 .. option:: -mrelax, -mno-relax
3040 Enable linker relaxation
3042 .. option:: -mrelax-all, -mno-relax-all
3044 (integrated-as) Relax all machine instructions
3046 .. option:: -mretpoline, -mno-retpoline
3048 .. option:: -mrtd, -mno-rtd
3050 Make StdCall calling convention the default
3052 .. option:: -mseses, -mno-seses
3054 Enable speculative execution side effect suppression (SESES). Includes LVI control flow integrity mitigations
3056 .. option:: -msign-return-address=<arg>
3058 Select return address signing scope
3062 .. option:: -msoft-float, -mno-soft-float
3064 Use software floating point
3066 .. option:: -mspeculative-load-hardening, -mno-speculative-load-hardening
3068 .. option:: -mstack-alignment=<arg>
3070 Set the stack alignment
3072 .. option:: -mstack-arg-probe, -mno-stack-arg-probe
3076 .. option:: -mstack-probe-size=<arg>
3078 Set the stack probe size
3080 .. option:: -mstack-protector-guard-offset=<arg>
3082 Use the given offset for addressing the stack-protector guard
3084 .. option:: -mstack-protector-guard-reg=<arg>
3086 Use the given reg for addressing the stack-protector guard
3088 .. option:: -mstack-protector-guard=<arg>
3090 Use the given guard (global, tls) for addressing the stack-protector guard
3092 .. option:: -mstackrealign, -mno-stackrealign
3094 Force realign the stack at entry to every function
3096 .. option:: -msvr4-struct-return
3098 Return small structs in registers (PPC32 only)
3100 .. option:: -mthread-model <arg>
3102 The thread model to use, e.g. posix, single (posix by default)
3104 .. option:: -mthreads<arg>
3106 .. option:: -mthumb, -mno-thumb
3108 .. option:: -mtls-direct-seg-refs, -mno-tls-direct-seg-refs
3110 Enable direct TLS access through segment registers (default)
3112 .. option:: -mtls-size=<arg>
3114 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)
3117 .. option:: -mtune=<arg>
3120 Only supported on X86 and RISC-V. Otherwise accepted for compatibility with GCC.
3122 .. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
3124 .. option:: -municode<arg>
3126 .. option:: -munsafe-fp-atomics, -mno-unsafe-fp-atomics
3128 Enable unsafe floating point atomic instructions (AMDGPU only)
3130 .. option:: -mvx, -mno-vx
3132 .. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
3134 .. option:: -mwatchos-version-min=<arg>
3136 .. option:: -mwavefrontsize64, -mno-wavefrontsize64
3138 Specify wavefront size 64 mode (AMDGPU only)
3140 .. option:: -mwindows<arg>
3146 .. option:: -fcall-saved-x10
3148 Make the x10 register call-saved (AArch64 only)
3150 .. option:: -fcall-saved-x11
3152 Make the x11 register call-saved (AArch64 only)
3154 .. option:: -fcall-saved-x12
3156 Make the x12 register call-saved (AArch64 only)
3158 .. option:: -fcall-saved-x13
3160 Make the x13 register call-saved (AArch64 only)
3162 .. option:: -fcall-saved-x14
3164 Make the x14 register call-saved (AArch64 only)
3166 .. option:: -fcall-saved-x15
3168 Make the x15 register call-saved (AArch64 only)
3170 .. option:: -fcall-saved-x18
3172 Make the x18 register call-saved (AArch64 only)
3174 .. option:: -fcall-saved-x8
3176 Make the x8 register call-saved (AArch64 only)
3178 .. option:: -fcall-saved-x9
3180 Make the x9 register call-saved (AArch64 only)
3182 .. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
3184 Workaround Cortex-A53 erratum 835769 (AArch64 only)
3186 .. option:: -mgeneral-regs-only
3188 Generate code which only uses the general purpose registers (AArch64 only)
3190 .. option:: -mmark-bti-property
3192 Add .note.gnu.property with BTI to assembly files (AArch64 only)
3194 .. option:: -msve-vector-bits=<arg>
3196 Specify the size in bits of an SVE vector register. Defaults to the vector length agnostic value of "scalable". (AArch64 only)
3200 .. option:: -mcumode, -mno-cumode
3202 Specify CU wavefront execution mode (AMDGPU only)
3204 .. option:: -mtgsplit, -mno-tgsplit
3206 Enable threadgroup split execution mode (AMDGPU only)
3210 .. option:: -faapcs-bitfield-load
3212 Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).
3214 .. option:: -faapcs-bitfield-width, -fno-aapcs-bitfield-width
3216 Follow the AAPCS standard requirement stating that volatile bit-field width is dictated by the field container type. (ARM only).
3218 .. option:: -ffixed-r9
3220 Reserve the r9 register (ARM only)
3224 Allow use of CMSE (Armv8-M Security Extensions)
3226 .. option:: -mexecute-only, -mno-execute-only, -mpure-code
3228 Disallow generation of data access to code sections (ARM only)
3230 .. option:: -mno-movt
3232 Disallow use of movt/movw pairs (ARM only)
3234 .. option:: -mno-neg-immediates
3236 Disallow converting instructions with negative immediates to their negation or inversion.
3240 Disallow use of CRC instructions (ARM only)
3242 .. option:: -mrestrict-it, -mno-restrict-it
3244 Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
3246 .. option:: -mtp=<arg>
3248 Thread pointer access method (AArch32/AArch64 only)
3250 .. option:: -munaligned-access, -mno-unaligned-access
3252 Allow memory accesses to be unaligned (AArch32/AArch64 only)
3256 .. option:: -mieee-rnd-near
3258 .. option:: -mmemops, -mno-memops
3260 Enable generation of memop instructions
3262 .. option:: -mnvj, -mno-nvj
3264 Enable generation of new-value jumps
3266 .. option:: -mnvs, -mno-nvs
3268 Enable generation of new-value stores
3270 .. option:: -mpackets, -mno-packets
3272 Enable generation of instruction packets
3276 .. option:: -mhvx, -mno-hvx
3278 Enable Hexagon Vector eXtensions
3280 .. option:: -mhvx-length=<arg>
3282 Set Hexagon Vector Length
3285 .. option:: -mhvx=<arg>
3288 Enable Hexagon Vector eXtensions
3292 .. option:: -ffixed-a0
3294 Reserve the a0 register (M68k only)
3296 .. option:: -ffixed-a1
3298 Reserve the a1 register (M68k only)
3300 .. option:: -ffixed-a2
3302 Reserve the a2 register (M68k only)
3304 .. option:: -ffixed-a3
3306 Reserve the a3 register (M68k only)
3308 .. option:: -ffixed-a4
3310 Reserve the a4 register (M68k only)
3312 .. option:: -ffixed-a5
3314 Reserve the a5 register (M68k only)
3316 .. option:: -ffixed-a6
3318 Reserve the a6 register (M68k only)
3320 .. option:: -ffixed-d0
3322 Reserve the d0 register (M68k only)
3324 .. option:: -ffixed-d1
3326 Reserve the d1 register (M68k only)
3328 .. option:: -ffixed-d2
3330 Reserve the d2 register (M68k only)
3332 .. option:: -ffixed-d3
3334 Reserve the d3 register (M68k only)
3336 .. option:: -ffixed-d4
3338 Reserve the d4 register (M68k only)
3340 .. option:: -ffixed-d5
3342 Reserve the d5 register (M68k only)
3344 .. option:: -ffixed-d6
3346 Reserve the d6 register (M68k only)
3348 .. option:: -ffixed-d7
3350 Reserve the d7 register (M68k only)
3366 .. option:: -mabicalls, -mno-abicalls
3368 Enable SVR4-style position-independent code (Mips only)
3370 .. option:: -mabs=<arg>
3372 .. option:: -mcheck-zero-division, -mno-check-zero-division
3374 .. option:: -mcompact-branches=<arg>
3376 .. option:: -mdouble-float
3378 .. option:: -mdsp, -mno-dsp
3380 .. option:: -mdspr2, -mno-dspr2
3382 .. option:: -membedded-data, -mno-embedded-data
3384 Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS)
3386 .. option:: -mextern-sdata, -mno-extern-sdata
3388 Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS)
3392 Use 32-bit floating point registers (MIPS only)
3396 Use 64-bit floating point registers (MIPS only)
3398 .. option:: -mginv, -mno-ginv
3400 .. option:: -mgpopt, -mno-gpopt
3402 Use GP relative accesses for symbols known to be in a small data section (MIPS)
3404 .. option:: -mindirect-jump=<arg>
3406 Change indirect jump instructions to inhibit speculation
3410 .. option:: -mldc1-sdc1, -mno-ldc1-sdc1
3412 .. option:: -mlocal-sdata, -mno-local-sdata
3414 Extend the -G behaviour to object local data (MIPS)
3416 .. option:: -mmadd4, -mno-madd4
3418 Enable the generation of 4-operand madd.s, madd.d and related instructions.
3420 .. option:: -mmicromips, -mno-micromips
3422 .. option:: -mmsa, -mno-msa
3424 Enable MSA ASE (MIPS only)
3426 .. option:: -mmt, -mno-mt
3428 Enable MT ASE (MIPS only)
3430 .. option:: -mnan=<arg>
3432 .. option:: -mno-mips16
3434 .. option:: -msingle-float
3436 .. option:: -mvirt, -mno-virt
3438 .. option:: -mxgot, -mno-xgot
3442 .. option:: -maltivec, -mno-altivec
3444 .. option:: -mcmpb, -mno-cmpb
3446 .. option:: -mcrbits, -mno-crbits
3448 .. option:: -mcrypto, -mno-crypto
3450 .. option:: -mdirect-move, -mno-direct-move
3454 .. option:: -mfloat128, -mno-float128
3456 .. option:: -mfprnd, -mno-fprnd
3458 .. option:: -mhtm, -mno-htm
3460 .. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
3462 .. option:: -misel, -mno-isel
3464 .. option:: -mlongcall, -mno-longcall
3466 .. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
3468 .. option:: -mmma, -mno-mma
3470 .. option:: -mpaired-vector-memops, -mno-paired-vector-memops
3472 .. option:: -mpcrel, -mno-pcrel
3474 .. option:: -mpopcntd, -mno-popcntd
3476 .. option:: -mpower10-vector, -mno-power10-vector
3478 .. option:: -mpower8-vector, -mno-power8-vector
3480 .. option:: -mpower9-vector, -mno-power9-vector
3482 .. option:: -mprefixed, -mno-prefixed
3484 .. option:: -mprivileged
3486 .. option:: -mrop-protect
3488 .. option:: -msecure-plt
3490 .. option:: -mspe, -mno-spe
3492 .. option:: -mvsx, -mno-vsx
3496 .. option:: -matomics, -mno-atomics
3498 .. option:: -mbulk-memory, -mno-bulk-memory
3500 .. option:: -mexception-handling, -mno-exception-handling
3502 .. option:: -mmultivalue, -mno-multivalue
3504 .. option:: -mmutable-globals, -mno-mutable-globals
3506 .. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint
3508 .. option:: -mreference-types, -mno-reference-types
3510 .. option:: -msign-ext, -mno-sign-ext
3512 .. option:: -msimd128, -mno-simd128
3514 .. option:: -mtail-call, -mno-tail-call
3518 .. option:: -mexec-model=<arg>
3520 Execution model (WebAssembly only)
3524 .. option:: -m3dnow, -mno-3dnow
3526 .. option:: -m3dnowa, -mno-3dnowa
3528 .. option:: -madx, -mno-adx
3530 .. option:: -maes, -mno-aes
3532 .. option:: -mamx-bf16, -mno-amx-bf16
3534 .. option:: -mamx-int8, -mno-amx-int8
3536 .. option:: -mamx-tile, -mno-amx-tile
3538 .. option:: -mavx, -mno-avx
3540 .. option:: -mavx2, -mno-avx2
3542 .. option:: -mavx512bf16, -mno-avx512bf16
3544 .. option:: -mavx512bitalg, -mno-avx512bitalg
3546 .. option:: -mavx512bw, -mno-avx512bw
3548 .. option:: -mavx512cd, -mno-avx512cd
3550 .. option:: -mavx512dq, -mno-avx512dq
3552 .. option:: -mavx512er, -mno-avx512er
3554 .. option:: -mavx512f, -mno-avx512f
3556 .. option:: -mavx512fp16, -mno-avx512fp16
3558 .. option:: -mavx512ifma, -mno-avx512ifma
3560 .. option:: -mavx512pf, -mno-avx512pf
3562 .. option:: -mavx512vbmi, -mno-avx512vbmi
3564 .. option:: -mavx512vbmi2, -mno-avx512vbmi2
3566 .. option:: -mavx512vl, -mno-avx512vl
3568 .. option:: -mavx512vnni, -mno-avx512vnni
3570 .. option:: -mavx512vp2intersect, -mno-avx512vp2intersect
3572 .. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq
3574 .. option:: -mavxvnni, -mno-avxvnni
3576 .. option:: -mbmi, -mno-bmi
3578 .. option:: -mbmi2, -mno-bmi2
3580 .. option:: -mcldemote, -mno-cldemote
3582 .. option:: -mclflushopt, -mno-clflushopt
3584 .. option:: -mclwb, -mno-clwb
3586 .. option:: -mclzero, -mno-clzero
3588 .. option:: -mcx16, -mno-cx16
3590 .. option:: -menqcmd, -mno-enqcmd
3592 .. option:: -mf16c, -mno-f16c
3594 .. option:: -mfma, -mno-fma
3596 .. option:: -mfma4, -mno-fma4
3598 .. option:: -mfsgsbase, -mno-fsgsbase
3600 .. option:: -mfxsr, -mno-fxsr
3602 .. option:: -mgfni, -mno-gfni
3604 .. option:: -mhreset, -mno-hreset
3606 .. option:: -minvpcid, -mno-invpcid
3608 .. option:: -mkl, -mno-kl
3610 .. option:: -mlwp, -mno-lwp
3612 .. option:: -mlzcnt, -mno-lzcnt
3614 .. option:: -mmmx, -mno-mmx
3616 .. option:: -mmovbe, -mno-movbe
3618 .. option:: -mmovdir64b, -mno-movdir64b
3620 .. option:: -mmovdiri, -mno-movdiri
3622 .. option:: -mmwaitx, -mno-mwaitx
3624 .. option:: -mpclmul, -mno-pclmul
3626 .. option:: -mpconfig, -mno-pconfig
3628 .. option:: -mpku, -mno-pku
3630 .. option:: -mpopcnt, -mno-popcnt
3632 .. option:: -mprefetchwt1, -mno-prefetchwt1
3634 .. option:: -mprfchw, -mno-prfchw
3636 .. option:: -mptwrite, -mno-ptwrite
3638 .. option:: -mrdpid, -mno-rdpid
3640 .. option:: -mrdrnd, -mno-rdrnd
3642 .. option:: -mrdseed, -mno-rdseed
3644 .. option:: -mretpoline-external-thunk, -mno-retpoline-external-thunk
3646 .. option:: -mrtm, -mno-rtm
3648 .. option:: -msahf, -mno-sahf
3650 .. option:: -mserialize, -mno-serialize
3652 .. option:: -msgx, -mno-sgx
3654 .. option:: -msha, -mno-sha
3656 .. option:: -mshstk, -mno-shstk
3658 .. option:: -msse, -mno-sse
3660 .. option:: -msse2, -mno-sse2
3662 .. option:: -msse3, -mno-sse3
3664 .. option:: -msse4.1, -mno-sse4.1
3667 .. option:: -msse4.2, -mno-sse4.2, -msse4
3670 .. option:: -msse4a, -mno-sse4a
3672 .. option:: -mssse3, -mno-ssse3
3674 .. option:: -mtbm, -mno-tbm
3676 .. option:: -mtsxldtrk, -mno-tsxldtrk
3678 .. option:: -muintr, -mno-uintr
3680 .. option:: -mvaes, -mno-vaes
3682 .. option:: -mvpclmulqdq, -mno-vpclmulqdq
3684 .. option:: -mvzeroupper, -mno-vzeroupper
3686 .. option:: -mwaitpkg, -mno-waitpkg
3688 .. option:: -mwbnoinvd, -mno-wbnoinvd
3690 .. option:: -mwidekl, -mno-widekl
3692 .. option:: -mx87, -m80387, -mno-x87
3694 .. option:: -mxop, -mno-xop
3696 .. option:: -mxsave, -mno-xsave
3698 .. option:: -mxsavec, -mno-xsavec
3700 .. option:: -mxsaveopt, -mno-xsaveopt
3702 .. option:: -mxsaves, -mno-xsaves
3706 .. option:: -msave-restore, -mno-save-restore
3708 Enable using library calls for save and restore
3712 Selects the long double implementation
3714 .. option:: -mlong-double-128
3716 Force long double to be 128 bits
3718 .. option:: -mlong-double-64
3720 Force long double to be 64 bits
3722 .. option:: -mlong-double-80
3724 Force long double to be 80 bits, padded to 128 bits for storage
3729 Flags controlling how much optimization should be performed.
3731 .. option:: -O<arg>, -O (equivalent to -O1), --optimize, --optimize=<arg>
3733 .. option:: -Ofast<arg>
3735 Debug information generation
3736 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3738 Flags controlling how much and what kind of debug information should be
3741 Kind and level of debug information
3742 -----------------------------------
3743 .. option:: -g, --debug, --debug=<arg>
3745 Generate source-level debug information
3749 Generate source-level debug information with the default dwarf version
3751 .. option:: -gdwarf-2
3753 Generate source-level debug information with dwarf version 2
3755 .. option:: -gdwarf-3
3757 Generate source-level debug information with dwarf version 3
3759 .. option:: -gdwarf-4
3761 Generate source-level debug information with dwarf version 4
3763 .. option:: -gdwarf-5
3765 Generate source-level debug information with dwarf version 5
3767 .. option:: -gdwarf32
3769 Enables DWARF32 format for ELF binaries, if debug information emission is enabled.
3771 .. option:: -gdwarf64
3773 Enables DWARF64 format for ELF binaries, if debug information emission is enabled.
3777 .. option:: -ginline-line-tables, -gno-inline-line-tables
3797 .. option:: -gline-directives-only
3799 Emit debug line info directives only
3801 .. option:: -gline-tables-only, -g1, -gmlt
3803 Emit debug line number tables only
3805 .. option:: -gmodules
3807 Generate debug info with external references to clang modules or precompiled headers
3809 Debugger to tune debug information for
3810 ______________________________________
3819 Debug information flags
3820 -----------------------
3821 .. option:: -gcolumn-info, -gno-column-info
3823 .. option:: -gdwarf-aranges
3825 .. option:: -gembed-source, -gno-embed-source
3827 Embed source text in DWARF debug sections
3829 .. option:: -ggnu-pubnames, -gno-gnu-pubnames
3831 .. option:: -gpubnames, -gno-pubnames
3833 .. option:: -grecord-command-line, -gno-record-command-line, -grecord-gcc-switches
3835 .. option:: -gsplit-dwarf, -gno-split-dwarf
3838 .. option:: -gsplit-dwarf=<arg>
3841 Set DWARF fission mode to either 'split' or 'single'
3843 .. option:: -gstrict-dwarf, -gno-strict-dwarf
3845 .. option:: -gz=<arg>, -gz (equivalent to -gz=zlib)
3847 DWARF debug sections compression type
3849 Static analyzer flags
3850 =====================
3852 Flags controlling the behavior of the Clang Static Analyzer.
3854 .. option:: -Xanalyzer <arg>
3856 Pass <arg> to the static analyzer
3858 Fortran compilation flags
3859 =========================
3861 Flags that will be passed onto the ``gfortran`` compiler when Clang is given
3864 .. option:: -A<arg>, --assert <arg>, --assert=<arg>
3866 .. option:: -A-<arg>
3868 .. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
3870 .. option:: -falign-commons, -fno-align-commons
3872 .. option:: -fall-intrinsics, -fno-all-intrinsics
3874 .. option:: -fautomatic, -fno-automatic
3876 .. option:: -fbacktrace, -fno-backtrace
3878 .. option:: -fblas-matmul-limit=<arg>
3880 .. option:: -fbounds-check, -fno-bounds-check
3882 .. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
3884 .. option:: -fcheck=<arg>
3886 .. option:: -fcoarray=<arg>
3888 .. option:: -fconvert=<arg>
3890 .. option:: -fcray-pointer, -fno-cray-pointer
3892 .. option:: -fd-lines-as-code, -fno-d-lines-as-code
3894 .. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
3896 .. option:: -fdollar-ok, -fno-dollar-ok
3898 .. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
3900 .. option:: -fdump-fortran-original, -fno-dump-fortran-original
3902 .. option:: -fdump-parse-tree, -fno-dump-parse-tree
3904 .. option:: -fexternal-blas, -fno-external-blas
3906 .. option:: -ff2c, -fno-f2c
3908 .. option:: -ffpe-trap=<arg>
3910 .. option:: -ffree-line-length-<arg>
3912 .. option:: -ffrontend-optimize, -fno-frontend-optimize
3914 .. option:: -finit-character=<arg>
3916 .. option:: -finit-integer=<arg>
3918 .. option:: -finit-local-zero, -fno-init-local-zero
3920 .. option:: -finit-logical=<arg>
3922 .. option:: -finit-real=<arg>
3924 .. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
3926 .. option:: -fmax-array-constructor=<arg>
3928 .. option:: -fmax-errors=<arg>
3930 .. option:: -fmax-identifier-length, -fno-max-identifier-length
3932 .. option:: -fmax-stack-var-size=<arg>
3934 .. option:: -fmax-subrecord-length=<arg>
3936 .. option:: -fmodule-private, -fno-module-private
3938 .. option:: -fpack-derived, -fno-pack-derived
3940 .. option:: -fprotect-parens, -fno-protect-parens
3942 .. option:: -frange-check, -fno-range-check
3944 .. option:: -freal-4-real-10, -fno-real-4-real-10
3946 .. option:: -freal-4-real-16, -fno-real-4-real-16
3948 .. option:: -freal-4-real-8, -fno-real-4-real-8
3950 .. option:: -freal-8-real-10, -fno-real-8-real-10
3952 .. option:: -freal-8-real-16, -fno-real-8-real-16
3954 .. option:: -freal-8-real-4, -fno-real-8-real-4
3956 .. option:: -frealloc-lhs, -fno-realloc-lhs
3958 .. option:: -frecord-marker=<arg>
3960 .. option:: -frecursive, -fno-recursive
3962 .. option:: -frepack-arrays, -fno-repack-arrays
3964 .. option:: -fsecond-underscore, -fno-second-underscore
3966 .. option:: -fsign-zero, -fno-sign-zero
3968 .. option:: -fstack-arrays, -fno-stack-arrays
3970 .. option:: -funderscoring, -fno-underscoring
3972 .. option:: -fwhole-file, -fno-whole-file
3974 .. option:: -imultilib <arg>
3976 .. option:: -static-libgfortran
3980 Flags that are passed on to the linker
3982 .. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
3984 Add directory to library search path
3988 .. option:: -T<script>
3990 Specify <script> as linker script
3992 .. option:: -Tbss<addr>
3994 Set starting address of BSS to <addr>
3996 .. option:: -Tdata<addr>
3998 Set starting address of DATA to <addr>
4000 .. option:: -Ttext<addr>
4002 Set starting address of TEXT to <addr>
4004 .. option:: -Wl,<arg>,<arg2>...
4006 Pass the comma separated arguments in <arg> to the linker
4010 .. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
4012 Pass <arg> to the linker
4018 .. option:: -coverage, --coverage
4020 .. option:: -e<arg>, --entry
4022 .. option:: -filelist <arg>
4024 .. option:: --hip-device-lib=<arg>
4030 .. option:: --ld-path=<arg>
4032 .. option:: -nostartfiles
4035 .. option:: -nostdlib, --no-standard-libraries
4042 .. option:: -rdynamic
4044 .. option:: --rocm-device-lib-path=<arg>, --hip-device-lib-path=<arg>
4046 ROCm device library path. Alternative to rocm-path.
4048 .. option:: -rpath <arg>
4052 .. option:: -shared, --shared
4054 .. option:: -specs=<arg>, --specs=<arg>
4056 .. option:: -static, --static
4058 .. option:: -static-pie
4062 .. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
4066 undef all system defines
4068 .. option:: -undefined<arg>, --no-undefined
4070 .. option:: -z <arg>
4072 Pass -z <arg> to the linker