1.. 2 ------------------------------------------------------------------- 3 NOTE: This file is automatically generated by running clang-tblgen 4 -gen-opt-docs. Do not edit this file by hand!! 5 ------------------------------------------------------------------- 6 7===================================== 8Clang command line argument reference 9===================================== 10.. contents:: 11 :local: 12 13Introduction 14============ 15 16This page lists the command line arguments currently supported by the 17GCC-compatible ``clang`` and ``clang++`` drivers. 18 19 20.. program:: clang 21.. option:: -B<dir>, --prefix <arg>, --prefix=<arg> 22 23Add <dir> to search path for binaries and object files used implicitly 24 25.. option:: -F<arg> 26 27Add directory to framework include search path 28 29.. option:: -ObjC 30 31Treat source input files as Objective-C inputs 32 33.. program:: clang1 34.. option:: -ObjC++ 35.. program:: clang 36 37Treat source input files as Objective-C++ inputs 38 39.. option:: -Qn, -fno-ident 40 41Do not emit metadata containing compiler name and version 42 43.. option:: -Qunused-arguments 44 45Don't emit warning for unused driver arguments 46 47.. option:: -Qy, -fident 48 49Emit metadata containing compiler name and version 50 51.. option:: -Wa,<arg>,<arg2>... 52 53Pass the comma separated arguments in <arg> to the assembler 54 55.. option:: -Wlarge-by-value-copy=<arg> 56 57.. option:: -Xarch\_<arg1> <arg2> 58 59.. program:: clang1 60.. option:: -Xarch\_device <arg> 61.. program:: clang 62 63Pass <arg> to the CUDA/HIP device compilation 64 65.. program:: clang2 66.. option:: -Xarch\_host <arg> 67.. program:: clang 68 69Pass <arg> to the CUDA/HIP host compilation 70 71.. option:: -Xcuda-fatbinary <arg> 72 73Pass <arg> to fatbinary invocation 74 75.. option:: -Xcuda-ptxas <arg> 76 77Pass <arg> to the ptxas assembler 78 79.. option:: -Xopenmp-target <arg> 80 81Pass <arg> to the target offloading toolchain. 82 83.. program:: clang1 84.. option:: -Xopenmp-target=<triple> <arg> 85.. program:: clang 86 87Pass <arg> to the target offloading toolchain identified by <triple>. 88 89.. option:: -Z<arg> 90 91.. option:: -a<arg>, --profile-blocks 92 93.. option:: -all\_load 94 95.. option:: -allowable\_client <arg> 96 97.. option:: --analyze 98 99Run the static analyzer 100 101.. option:: --analyzer-no-default-checks 102 103.. option:: --analyzer-output<arg> 104 105Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|sarif\|text). 106 107.. option:: -ansi, --ansi 108 109.. option:: -arch <arg> 110 111.. program:: clang1 112.. option:: -arch\_errors\_fatal 113.. program:: clang 114 115.. program:: clang2 116.. option:: -arch\_only <arg> 117.. program:: clang 118 119.. option:: -arcmt-migrate-emit-errors 120 121Emit ARC errors even if the migrator can fix them 122 123.. option:: -arcmt-migrate-report-output <arg> 124 125Output path for the plist report 126 127.. option:: --autocomplete=<arg> 128 129.. option:: -bind\_at\_load 130 131.. option:: -bundle 132 133.. program:: clang1 134.. option:: -bundle\_loader <arg> 135.. program:: clang 136 137.. option:: -client\_name<arg> 138 139.. option:: -compatibility\_version<arg> 140 141.. option:: --config <arg> 142 143Specifies configuration file 144 145.. option:: --constant-cfstrings 146 147.. option:: --cuda-compile-host-device 148 149Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations. 150 151.. option:: --cuda-device-only 152 153Compile CUDA code for device only 154 155.. option:: --cuda-host-only 156 157Compile CUDA code for host only. Has no effect on non-CUDA compilations. 158 159.. option:: --cuda-include-ptx=<arg>, --no-cuda-include-ptx=<arg> 160 161Include PTX for the following GPU architecture (e.g. sm\_35) or 'all'. May be specified more than once. 162 163.. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug 164 165Enable device-side debug info generation. Disables ptxas optimizations. 166 167.. option:: -current\_version<arg> 168 169.. option:: -dead\_strip 170 171.. option:: -dependency-dot <arg> 172 173Filename to write DOT-formatted header dependencies to 174 175.. option:: -dependency-file <arg> 176 177Filename (or -) to write dependency output to 178 179.. option:: -dsym-dir<dir> 180 181Directory to output dSYM's (if any) to 182 183.. option:: -dumpmachine 184 185.. option:: -dumpversion 186 187.. option:: --dyld-prefix=<arg>, --dyld-prefix <arg> 188 189.. option:: -dylib\_file <arg> 190 191.. option:: -dylinker 192 193.. program:: clang1 194.. option:: -dylinker\_install\_name<arg> 195.. program:: clang 196 197.. option:: -dynamic 198 199.. option:: -dynamiclib 200 201.. option:: -emit-ast 202 203Emit Clang AST files for source inputs 204 205.. option:: --emit-static-lib 206 207Enable linker job to emit a static library. 208 209.. option:: -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang 210 211Trivial 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 212 213.. option:: -exported\_symbols\_list <arg> 214 215.. option:: -faligned-new=<arg> 216 217.. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero 218 219Flush denormal floating point values to zero in CUDA device mode. 220 221.. option:: -ffixed-r19 222 223Reserve register r19 (Hexagon only) 224 225.. option:: -fheinous-gnu-extensions 226 227.. option:: -flat\_namespace 228 229.. option:: -fopenmp-targets=<arg1>,<arg2>... 230 231Specify comma-separated list of triples OpenMP offloading targets to be supported 232 233.. option:: -force\_cpusubtype\_ALL 234 235.. program:: clang1 236.. option:: -force\_flat\_namespace 237.. program:: clang 238 239.. program:: clang2 240.. option:: -force\_load <arg> 241.. program:: clang 242 243.. option:: -framework <arg> 244 245.. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath 246 247Add -rpath with architecture-specific resource directory to the linker flags 248 249.. option:: -fsanitize-system-blacklist=<arg> 250 251Path to system blacklist file for sanitizers 252 253.. option:: -fsystem-module 254 255Build this module as a system module. Only used with -emit-module 256 257.. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg> 258 259Use the gcc toolchain at the given directory 260 261.. option:: -gcodeview 262 263Generate CodeView debug information 264 265.. option:: -gcodeview-ghash, -gno-codeview-ghash 266 267Emit type record hashes in a .debug$H section 268 269.. option:: -ginline-line-tables, -gno-inline-line-tables 270 271.. option:: --gpu-instrument-lib=<arg> 272 273Instrument device library for HIP, which is a LLVM bitcode containing \_\_cyg\_profile\_func\_enter and \_\_cyg\_profile\_func\_exit 274 275.. option:: --gpu-max-threads-per-block=<arg> 276 277Default max threads per block for kernel launch bounds for HIP 278 279.. option:: -headerpad\_max\_install\_names<arg> 280 281.. option:: -help, --help 282 283Display available options 284 285.. option:: --help-hidden 286 287Display help for hidden options 288 289.. option:: --hip-link 290 291Link clang-offload-bundler bundles for HIP 292 293.. option:: --hip-version=<arg> 294 295HIP version in the format of major.minor.patch 296 297.. option:: -ibuiltininc 298 299Enable builtin #include directories even when -nostdinc is used before or after -ibuiltininc. Using -nobuiltininc after the option disables it 300 301.. option:: -image\_base <arg> 302 303.. option:: -index-header-map 304 305Make the next included directory (-I or -F) an indexer header map 306 307.. option:: -init <arg> 308 309.. option:: -install\_name <arg> 310 311.. option:: -interface-stub-version=<arg> 312 313.. option:: -keep\_private\_externs 314 315.. option:: -lazy\_framework <arg> 316 317.. program:: clang1 318.. option:: -lazy\_library <arg> 319.. program:: clang 320 321.. option:: -mbig-endian, -EB 322 323.. option:: -mbranch-protection=<arg> 324 325Enforce targets of indirect branches and function returns 326 327.. option:: -mharden-sls=<arg> 328 329Select straight-line speculation hardening scope 330 331.. option:: --migrate 332 333Run the migrator 334 335.. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg> 336 337.. option:: -mlinker-version=<arg> 338 339.. option:: -mlittle-endian, -EL 340 341.. option:: -mllvm <arg> 342 343Additional arguments to forward to LLVM's option processing 344 345.. option:: -module-dependency-dir <arg> 346 347Directory to dump module dependencies to 348 349.. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg> 350 351.. option:: -multi\_module 352 353.. option:: -multiply\_defined <arg> 354 355.. program:: clang1 356.. option:: -multiply\_defined\_unused <arg> 357.. program:: clang 358 359.. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg> 360 361.. option:: --no-cuda-version-check 362 363Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture. 364 365.. option:: -no-integrated-cpp, --no-integrated-cpp 366 367.. option:: -no\_dead\_strip\_inits\_and\_terms 368 369.. option:: -nobuiltininc 370 371Disable builtin #include directories 372 373.. option:: -nodefaultlibs 374 375.. option:: -nofixprebinding 376 377.. option:: -nogpuinc, -nocudainc 378 379.. option:: -nogpulib, -nocudalib 380 381Do not link device library for CUDA/HIP device compilation 382 383.. option:: -nolibc 384 385.. option:: -nomultidefs 386 387.. option:: -nopie, -no-pie 388 389.. option:: -noprebind 390 391.. option:: -noprofilelib 392 393.. option:: -noseglinkedit 394 395.. option:: -nostdinc, --no-standard-includes 396 397.. program:: clang1 398.. option:: -nostdinc++ 399.. program:: clang 400 401Disable standard #include directories for the C++ standard library 402 403.. option:: -nostdlib++ 404 405.. option:: -nostdlibinc 406 407.. option:: -o<file>, --output <arg>, --output=<arg> 408 409Write output to <file> 410 411.. option:: -objcmt-atomic-property 412 413Make migration to 'atomic' properties 414 415.. option:: -objcmt-migrate-all 416 417Enable migration to modern ObjC 418 419.. option:: -objcmt-migrate-annotation 420 421Enable migration to property and method annotations 422 423.. option:: -objcmt-migrate-designated-init 424 425Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods 426 427.. option:: -objcmt-migrate-instancetype 428 429Enable migration to infer instancetype for method result type 430 431.. option:: -objcmt-migrate-literals 432 433Enable migration to modern ObjC literals 434 435.. option:: -objcmt-migrate-ns-macros 436 437Enable migration to NS\_ENUM/NS\_OPTIONS macros 438 439.. option:: -objcmt-migrate-property 440 441Enable migration to modern ObjC property 442 443.. option:: -objcmt-migrate-property-dot-syntax 444 445Enable migration of setter/getter messages to property-dot syntax 446 447.. option:: -objcmt-migrate-protocol-conformance 448 449Enable migration to add protocol conformance on classes 450 451.. option:: -objcmt-migrate-readonly-property 452 453Enable migration to modern ObjC readonly property 454 455.. option:: -objcmt-migrate-readwrite-property 456 457Enable migration to modern ObjC readwrite property 458 459.. option:: -objcmt-migrate-subscripting 460 461Enable migration to modern ObjC subscripting 462 463.. option:: -objcmt-ns-nonatomic-iosonly 464 465Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute 466 467.. option:: -objcmt-returns-innerpointer-property 468 469Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER 470 471.. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg> 472 473Only modify files with a filename contained in the provided directory path 474 475.. option:: -object 476 477.. option:: --offload-arch=<arg>, --cuda-gpu-arch=<arg>, --no-offload-arch=<arg> 478 479CUDA 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+:sram-ecc-). May be specified more than once. 480 481.. option:: -p, --profile 482 483.. option:: -pagezero\_size<arg> 484 485.. option:: -pg 486 487Enable mcount instrumentation 488 489.. option:: -pipe, --pipe 490 491Use pipes between commands, when possible 492 493.. option:: -prebind 494 495.. program:: clang1 496.. option:: -prebind\_all\_twolevel\_modules 497.. program:: clang 498 499.. option:: -preload 500 501.. option:: --print-diagnostic-categories 502 503.. option:: -print-effective-triple, --print-effective-triple 504 505Print the effective target triple 506 507.. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg> 508 509Print the full library path of <file> 510 511.. option:: -print-ivar-layout 512 513Enable Objective-C Ivar layout bitmap print trace 514 515.. option:: -print-libgcc-file-name, --print-libgcc-file-name 516 517Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a") 518 519.. option:: -print-multi-directory, --print-multi-directory 520 521.. option:: -print-multi-lib, --print-multi-lib 522 523.. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg> 524 525Print the full program path of <name> 526 527.. option:: -print-resource-dir, --print-resource-dir 528 529Print the resource directory pathname 530 531.. option:: -print-search-dirs, --print-search-dirs 532 533Print the paths used for finding libraries and programs 534 535.. option:: -print-target-triple, --print-target-triple 536 537Print the normalized target triple 538 539.. option:: -print-targets, --print-targets 540 541Print the registered targets 542 543.. option:: -private\_bundle 544 545.. option:: -pthread, -no-pthread 546 547Support POSIX threads in generated code 548 549.. option:: -pthreads 550 551.. option:: -read\_only\_relocs <arg> 552 553.. option:: -relocatable-pch, --relocatable-pch 554 555Whether to build a relocatable precompiled header 556 557.. option:: -remap 558 559.. option:: -rewrite-legacy-objc 560 561Rewrite Legacy Objective-C source to C++ 562 563.. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg> 564 565Compiler runtime library to use 566 567.. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd) 568 569Save llvm statistics. 570 571.. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd) 572 573Save intermediate compilation results. 574 575.. option:: -sectalign <arg1> <arg2> <arg3> 576 577.. option:: -sectcreate <arg1> <arg2> <arg3> 578 579.. option:: -sectobjectsymbols <arg1> <arg2> 580 581.. option:: -sectorder <arg1> <arg2> <arg3> 582 583.. option:: -seg1addr<arg> 584 585.. option:: -seg\_addr\_table <arg> 586 587.. program:: clang1 588.. option:: -seg\_addr\_table\_filename <arg> 589.. program:: clang 590 591.. option:: -segaddr <arg1> <arg2> 592 593.. option:: -segcreate <arg1> <arg2> <arg3> 594 595.. option:: -seglinkedit 596 597.. option:: -segprot <arg1> <arg2> <arg3> 598 599.. option:: -segs\_read\_<arg> 600 601.. program:: clang1 602.. option:: -segs\_read\_only\_addr <arg> 603.. program:: clang 604 605.. program:: clang2 606.. option:: -segs\_read\_write\_addr <arg> 607.. program:: clang 608 609.. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg> 610 611Serialize compiler diagnostics to a file 612 613.. option:: -shared-libgcc 614 615.. option:: -shared-libsan, -shared-libasan 616 617Dynamically link the sanitizer runtime 618 619.. option:: -single\_module 620 621.. option:: -static-libgcc 622 623.. option:: -static-libsan 624 625Statically link the sanitizer runtime 626 627.. option:: -static-libstdc++ 628 629.. option:: -static-openmp 630 631Use the static host OpenMP runtime while linking. 632 633.. option:: -std-default=<arg> 634 635.. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg> 636 637C++ standard library to use 638 639.. option:: -sub\_library<arg> 640 641.. program:: clang1 642.. option:: -sub\_umbrella<arg> 643.. program:: clang 644 645.. option:: --sysroot=<arg>, --sysroot <arg> 646 647.. option:: --target-help 648 649.. option:: --target=<arg>, -target <arg> 650 651Generate code for the given target 652 653.. option:: -time 654 655Time individual commands 656 657.. option:: -traditional, --traditional 658 659.. option:: -traditional-cpp, --traditional-cpp 660 661Enable some traditional CPP emulation 662 663.. option:: -twolevel\_namespace 664 665.. program:: clang1 666.. option:: -twolevel\_namespace\_hints 667.. program:: clang 668 669.. option:: -umbrella <arg> 670 671.. option:: -unexported\_symbols\_list <arg> 672 673.. option:: -unwindlib=<arg>, --unwindlib=<arg> 674 675Unwind library to use 676 677.. option:: -v, --verbose 678 679Show commands to run and use verbose output 680 681.. option:: --verify-debug-info 682 683Verify the binary representation of debug output 684 685.. option:: --version 686 687Print version information 688 689.. option:: -w, --no-warnings 690 691Suppress all warnings 692 693.. option:: -weak-l<arg> 694 695.. option:: -weak\_framework <arg> 696 697.. program:: clang1 698.. option:: -weak\_library <arg> 699.. program:: clang 700 701.. program:: clang2 702.. option:: -weak\_reference\_mismatches <arg> 703.. program:: clang 704 705.. option:: -whatsloaded 706 707.. option:: -whyload 708 709.. option:: -working-directory<arg>, -working-directory=<arg> 710 711Resolve file paths relative to the specified directory 712 713.. option:: -x<language>, --language <arg>, --language=<arg> 714 715Treat subsequent input files as having type <language> 716 717.. option:: -y<arg> 718 719Actions 720======= 721The action to perform on the input. 722 723.. option:: -E, --preprocess 724 725Only run the preprocessor 726 727.. option:: -S, --assemble 728 729Only run preprocess and compilation steps 730 731.. option:: -c, --compile 732 733Only run preprocess, compile, and assemble steps 734 735.. option:: -emit-interface-stubs 736 737Generate Interface Stub Files. 738 739.. option:: -emit-llvm 740 741Use the LLVM representation for assembler and object files 742 743.. option:: -emit-merged-ifs 744 745Generate Interface Stub Files, emit merged text not binary. 746 747.. option:: -fsyntax-only 748 749.. option:: -module-file-info 750 751Provide information about a particular module file 752 753.. option:: --precompile 754 755Only precompile the input 756 757.. option:: -rewrite-objc 758 759Rewrite Objective-C source to C++ 760 761.. option:: -verify-pch 762 763Load and verify that a pre-compiled header file is not stale 764 765Compilation flags 766================= 767 768Flags controlling the behavior of Clang during compilation. These flags have 769no effect during actions that do not perform compilation. 770 771.. option:: -Xassembler <arg> 772 773Pass <arg> to the assembler 774 775.. option:: -Xclang <arg> 776 777Pass <arg> to the clang compiler 778 779.. option:: -fclang-abi-compat=<version> 780 781Attempt to match the ABI of Clang <version> 782 783.. option:: -fcomment-block-commands=<arg>,<arg2>... 784 785Treat each comma separated argument in <arg> as a documentation comment block command 786 787.. option:: -fcomplete-member-pointers, -fno-complete-member-pointers 788 789Require member pointer base types to be complete if they would be significant under the Microsoft ABI 790 791.. option:: -fcrash-diagnostics-dir=<arg> 792 793.. option:: -fdeclspec, -fno-declspec 794 795Allow \_\_declspec as a keyword 796 797.. option:: -fdepfile-entry=<arg> 798 799.. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info 800 801.. option:: -fdiagnostics-format=<arg> 802 803.. option:: -fdiagnostics-parseable-fixits 804 805Print fix-its in machine parseable form 806 807.. option:: -fdiagnostics-print-source-range-info 808 809Print source range spans in numeric form 810 811.. option:: -fdiagnostics-show-category=<arg> 812 813.. option:: -fdiscard-value-names, -fno-discard-value-names 814 815Discard value names in LLVM IR 816 817.. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager 818 819Enables an experimental new pass manager in LLVM. 820 821.. option:: -fexperimental-strict-floating-point 822 823Enables experimental strict floating point in LLVM. 824 825.. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses 826 827Use separate accesses for consecutive bitfield runs with legal widths and alignments. 828 829.. option:: -fglobal-isel, -fexperimental-isel, -fno-global-isel 830 831Enables the global instruction selector 832 833.. option:: -finline-functions, -fno-inline-functions 834 835Inline suitable functions 836 837.. option:: -finline-hint-functions 838 839Inline functions which are (explicitly or implicitly) marked inline 840 841.. option:: -fno-crash-diagnostics 842 843Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash 844 845.. option:: -fno-sanitize-blacklist 846 847Don't use blacklist file for sanitizers 848 849.. option:: -fparse-all-comments 850 851.. option:: -frecord-command-line, -fno-record-command-line, -frecord-gcc-switches 852 853.. option:: -fsanitize-address-field-padding=<arg> 854 855Level of field padding for AddressSanitizer 856 857.. option:: -fsanitize-address-globals-dead-stripping 858 859Enable linker dead stripping of globals in AddressSanitizer 860 861.. option:: -fsanitize-address-poison-custom-array-cookie, -fno-sanitize-address-poison-custom-array-cookie 862 863Enable poisoning array cookies when using custom operator new\[\] in AddressSanitizer 864 865.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope 866 867Enable use-after-scope detection in AddressSanitizer 868 869.. option:: -fsanitize-address-use-odr-indicator, -fno-sanitize-address-use-odr-indicator 870 871Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized programs at the cost of an increase in binary size 872 873.. option:: -fsanitize-address-destructor-kind=<arg> 874 875Set the kind of module destructors emitted by AddressSanitizer instrumentation. 876These destructors are emitted to unregister instrumented global variables when 877code is unloaded (e.g. via `dlclose()`). 878 879Valid options are: 880 881* ``global`` - Emit module destructors that are called via a platform specific array (see `llvm.global_dtors`). 882* ``none`` - Do not emit module destructors. 883 884.. option:: -fsanitize-blacklist=<arg> 885 886Path to blacklist file for sanitizers 887 888.. option:: -fsanitize-cfi-canonical-jump-tables, -fno-sanitize-cfi-canonical-jump-tables 889 890Make the jump table addresses canonical in the symbol table 891 892.. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso 893 894Enable control flow integrity (CFI) checks for cross-DSO calls. 895 896.. option:: -fsanitize-cfi-icall-generalize-pointers 897 898Generalize pointers in CFI indirect call type signature checks 899 900.. option:: -fsanitize-coverage-allowlist=<arg>, -fsanitize-coverage-whitelist=<arg> 901 902Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones 903 904.. option:: -fsanitize-coverage-blocklist=<arg>, -fsanitize-coverage-blacklist=<arg> 905 906Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones 907 908.. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>... 909 910Specify the type of coverage instrumentation for Sanitizers 911 912.. option:: -fsanitize-hwaddress-abi=<arg> 913 914Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused. 915 916.. option:: -fsanitize-link-c++-runtime, -fno-sanitize-link-c++-runtime 917 918.. option:: -fsanitize-link-runtime, -fno-sanitize-link-runtime 919 920.. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins 921 922Enable origins tracking in MemorySanitizer 923 924.. program:: clang1 925.. option:: -fsanitize-memory-track-origins=<arg> 926.. program:: clang 927 928Enable origins tracking in MemorySanitizer 929 930.. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor 931 932Enable use-after-destroy detection in MemorySanitizer 933 934.. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime 935 936.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>..., -fsanitize-recover (equivalent to -fsanitize-recover=all) 937 938Enable recovery for specified sanitizers 939 940.. option:: -fsanitize-stats, -fno-sanitize-stats 941 942Enable sanitizer statistics gathering. 943 944.. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics 945 946Enable atomic operations instrumentation in ThreadSanitizer (default) 947 948.. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit 949 950Enable function entry/exit instrumentation in ThreadSanitizer (default) 951 952.. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access 953 954Enable memory access instrumentation in ThreadSanitizer (default) 955 956.. 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) 957 958Enable trapping for specified sanitizers 959 960.. option:: -fsanitize-undefined-strip-path-components=<number> 961 962Strip (or keep only, if negative) a given number of path components when emitting check metadata. 963 964.. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>... 965 966Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks 967 968.. option:: -moutline, -mno-outline 969 970Enable function outlining (AArch64 only) 971 972.. option:: --param <arg>, --param=<arg> 973 974.. option:: -print-supported-cpus, --print-supported-cpus, -mcpu=?, -mtune=? 975 976Print supported cpu models for the given target (if target is not specified, it will print the supported cpus for the default target) 977 978.. option:: -std=<arg>, --std=<arg>, --std <arg> 979 980Language standard to compile for 981 982Preprocessor flags 983~~~~~~~~~~~~~~~~~~ 984 985Flags controlling the behavior of the Clang preprocessor. 986 987.. option:: -C, --comments 988 989Include comments in preprocessed output 990 991.. option:: -CC, --comments-in-macros 992 993Include comments from within macros in preprocessed output 994 995.. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg> 996 997Define <macro> to <value> (or 1 if <value> omitted) 998 999.. option:: -H, --trace-includes 1000 1001Show header includes and nesting depth 1002 1003.. option:: -P, --no-line-commands 1004 1005Disable linemarker output in -E mode 1006 1007.. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg> 1008 1009Undefine macro <macro> 1010 1011.. option:: -Wp,<arg>,<arg2>... 1012 1013Pass the comma separated arguments in <arg> to the preprocessor 1014 1015.. option:: -Xpreprocessor <arg> 1016 1017Pass <arg> to the preprocessor 1018 1019.. option:: -fmacro-prefix-map=<arg> 1020 1021remap file source paths in predefined preprocessor macros 1022 1023Include path management 1024----------------------- 1025 1026Flags controlling how ``#include``\s are resolved to files. 1027 1028.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg> 1029 1030Add directory to include search path. For C++ input, if 1031there are multiple -I options, these directories are searched 1032in the order they are given before the standard system directories 1033are searched. If the same directory is in the SYSTEM include search 1034paths, for example if also specified with -isystem, the -I option 1035will be ignored 1036 1037.. option:: -I-, --include-barrier 1038 1039Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path 1040 1041.. option:: --cuda-path-ignore-env 1042 1043Ignore environment variables to detect CUDA installation 1044 1045.. option:: --cuda-path=<arg> 1046 1047CUDA installation path 1048 1049.. option:: -cxx-isystem<directory> 1050 1051Add directory to the C++ SYSTEM include search path 1052 1053.. option:: -fbuild-session-file=<file> 1054 1055Use the last modification time of <file> as the build session timestamp 1056 1057.. option:: -fbuild-session-timestamp=<time since Epoch in seconds> 1058 1059Time when the current build session started 1060 1061.. option:: -fmodule-file=\[<name>=\]<file> 1062 1063Specify the mapping of module name to precompiled module file, or load a module file if name is omitted. 1064 1065.. option:: -fmodules-cache-path=<directory> 1066 1067Specify the module cache path 1068 1069.. option:: -fmodules-disable-diagnostic-validation 1070 1071Disable validation of the diagnostic options when loading the module 1072 1073.. option:: -fmodules-prune-after=<seconds> 1074 1075Specify the interval (in seconds) after which a module file will be considered unused 1076 1077.. option:: -fmodules-prune-interval=<seconds> 1078 1079Specify the interval (in seconds) between attempts to prune the module cache 1080 1081.. option:: -fmodules-user-build-path <directory> 1082 1083Specify the module user build path 1084 1085.. option:: -fmodules-validate-once-per-build-session 1086 1087Don't verify input files for the modules if the module has been successfully validated or loaded during this build session 1088 1089.. option:: -fmodules-validate-system-headers, -fno-modules-validate-system-headers 1090 1091Validate the system headers that a module depends on when loading the module 1092 1093.. option:: -fprebuilt-module-path=<directory> 1094 1095Specify the prebuilt module path 1096 1097.. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg> 1098 1099Add directory to AFTER include search path 1100 1101.. option:: -iframework<arg> 1102 1103Add directory to SYSTEM framework search path 1104 1105.. option:: -iframeworkwithsysroot<directory> 1106 1107Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot 1108 1109.. option:: -imacros<file>, --imacros<file>, --imacros=<arg> 1110 1111Include macros from file before parsing 1112 1113.. option:: -include<file>, --include<file>, --include=<arg> 1114 1115Include file before parsing 1116 1117.. option:: -include-pch <file> 1118 1119Include precompiled header file 1120 1121.. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg> 1122 1123Set the -iwithprefix/-iwithprefixbefore prefix 1124 1125.. option:: -iquote<directory> 1126 1127Add directory to QUOTE include search path 1128 1129.. option:: -isysroot<dir> 1130 1131Set the system root directory (usually /) 1132 1133.. option:: -isystem<directory> 1134 1135Add directory to SYSTEM include search path 1136 1137.. option:: -isystem-after<directory> 1138 1139Add directory to end of the SYSTEM include search path 1140 1141.. option:: -ivfsoverlay<arg> 1142 1143Overlay the virtual filesystem described by file over the real file system 1144 1145.. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg> 1146 1147Set directory to SYSTEM include search path with prefix 1148 1149.. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg> 1150 1151Set directory to include search path with prefix 1152 1153.. option:: -iwithsysroot<directory> 1154 1155Add directory to SYSTEM include search path, absolute paths are relative to -isysroot 1156 1157.. option:: --libomptarget-nvptx-bc-path=<arg> 1158 1159Path to libomptarget-nvptx bitcode library 1160 1161.. option:: --ptxas-path=<arg> 1162 1163Path to ptxas (used for compiling CUDA code) 1164 1165.. option:: --rocm-path=<arg> 1166 1167ROCm installation path, used for finding and automatically linking required bitcode libraries. 1168 1169.. program:: clang1 1170.. option:: -stdlib++-isystem<directory> 1171.. program:: clang 1172 1173Use directory as the C++ standard library include path 1174 1175.. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg> 1176 1177Treat all #include paths starting with <prefix> as including a system header. 1178 1179Dependency file generation 1180-------------------------- 1181 1182Flags controlling generation of a dependency file for ``make``-like build 1183systems. 1184 1185.. option:: -M, --dependencies 1186 1187Like -MD, but also implies -E and writes to stdout by default 1188 1189.. option:: -MD, --write-dependencies 1190 1191Write a depfile containing user and system headers 1192 1193.. option:: -MF<file> 1194 1195Write depfile output from -MMD, -MD, -MM, or -M to <file> 1196 1197.. option:: -MG, --print-missing-file-dependencies 1198 1199Add missing headers to depfile 1200 1201.. option:: -MJ<arg> 1202 1203Write a compilation database entry per input 1204 1205.. option:: -MM, --user-dependencies 1206 1207Like -MMD, but also implies -E and writes to stdout by default 1208 1209.. option:: -MMD, --write-user-dependencies 1210 1211Write a depfile containing user headers 1212 1213.. option:: -MP 1214 1215Create phony target for each dependency (other than main file) 1216 1217.. option:: -MQ<arg> 1218 1219Specify name of main file output to quote in depfile 1220 1221.. option:: -MT<arg> 1222 1223Specify name of main file output in depfile 1224 1225.. option:: -MV 1226 1227Use NMake/Jom format for the depfile 1228 1229Dumping preprocessor state 1230-------------------------- 1231 1232Flags allowing the state of the preprocessor to be dumped in various ways. 1233 1234.. option:: -d 1235 1236.. program:: clang1 1237.. option:: -d<arg> 1238.. program:: clang 1239 1240.. option:: -dD 1241 1242Print macro definitions in -E mode in addition to normal output 1243 1244.. option:: -dI 1245 1246Print include directives in -E mode in addition to normal output 1247 1248.. option:: -dM 1249 1250Print macro definitions in -E mode instead of normal output 1251 1252Diagnostic flags 1253~~~~~~~~~~~~~~~~ 1254 1255Flags controlling which warnings, errors, and remarks Clang will generate. 1256See the :doc:`full list of warning and remark flags <DiagnosticsReference>`. 1257 1258.. option:: -R<remark> 1259 1260Enable the specified remark 1261 1262.. option:: -Rpass-analysis=<arg> 1263 1264Report transformation analysis from optimization passes whose name matches the given POSIX regular expression 1265 1266.. option:: -Rpass-missed=<arg> 1267 1268Report missed transformations by optimization passes whose name matches the given POSIX regular expression 1269 1270.. option:: -Rpass=<arg> 1271 1272Report transformations performed by optimization passes whose name matches the given POSIX regular expression 1273 1274.. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg> 1275 1276Enable the specified warning 1277 1278.. option:: -Wdeprecated, -Wno-deprecated 1279 1280Enable warnings for deprecated constructs and define \_\_DEPRECATED 1281 1282.. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg> 1283 1284Target-independent compilation options 1285~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1286.. option:: -Wframe-larger-than=<arg> 1287 1288.. option:: -fPIC, -fno-PIC 1289 1290.. option:: -fPIE, -fno-PIE 1291 1292.. option:: -faddrsig, -fno-addrsig 1293 1294Emit an address-significance table 1295 1296.. option:: -falign-functions, -fno-align-functions 1297 1298.. program:: clang1 1299.. option:: -falign-functions=<arg> 1300.. program:: clang 1301 1302.. program:: clang1 1303.. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation 1304.. program:: clang 1305 1306Enable C++17 aligned allocation functions 1307 1308.. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders 1309 1310Treat editor placeholders as valid source code 1311 1312.. option:: -fallow-unsupported 1313 1314.. option:: -faltivec, -fno-altivec 1315 1316.. option:: -fansi-escape-codes 1317 1318Use ANSI escape codes for diagnostics 1319 1320.. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables 1321 1322Use Apple's kernel extensions ABI 1323 1324.. option:: -fapple-link-rtlib 1325 1326Force linking the clang builtins runtime library 1327 1328.. option:: -fapple-pragma-pack, -fno-apple-pragma-pack 1329 1330Enable Apple gcc-compatible #pragma pack handling 1331 1332.. option:: -fapplication-extension, -fno-application-extension 1333 1334Restrict code to those available for App Extensions 1335 1336.. option:: -fasm, -fno-asm 1337 1338.. option:: -fasm-blocks, -fno-asm-blocks 1339 1340.. option:: -fassociative-math, -fno-associative-math 1341 1342.. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new 1343 1344.. option:: -fast 1345 1346.. option:: -fastcp 1347 1348.. option:: -fastf 1349 1350.. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables 1351 1352.. option:: -fautolink, -fno-autolink 1353 1354.. option:: -fbasic-block-sections=<arg> 1355 1356Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section. 1357 1358.. option:: -fblocks, -fno-blocks 1359 1360Enable the 'blocks' language feature 1361 1362.. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg> 1363 1364.. option:: -fborland-extensions, -fno-borland-extensions 1365 1366Accept non-standard constructs supported by the Borland compiler 1367 1368.. option:: -fbracket-depth=<arg> 1369 1370.. option:: -fbuiltin, -fno-builtin 1371 1372.. option:: -fbuiltin-module-map 1373 1374Load the clang builtins module map file. 1375 1376.. option:: -fc++-static-destructors, -fno-c++-static-destructors 1377 1378.. option:: -fcaret-diagnostics, -fno-caret-diagnostics 1379 1380.. option:: -fcf-protection=<arg>, -fcf-protection (equivalent to -fcf-protection=full) 1381 1382Instrument control-flow architecture protection. Options: return, branch, full, none. 1383 1384.. option:: -fcf-runtime-abi=<arg> 1385 1386.. option:: -fchar8\_t, -fno-char8\_t 1387 1388Enable C++ builtin type char8\_t 1389 1390.. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg> 1391 1392.. option:: -fcolor-diagnostics, -fno-color-diagnostics 1393 1394Enable colors in diagnostics 1395 1396.. option:: -fcommon, -fno-common 1397 1398Place uninitialized global variables in a common block 1399 1400.. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg> 1401 1402.. option:: -fconstant-cfstrings, -fno-constant-cfstrings 1403 1404.. option:: -fconstant-string-class=<arg> 1405 1406.. option:: -fconstexpr-backtrace-limit=<arg> 1407 1408.. option:: -fconstexpr-depth=<arg> 1409 1410.. option:: -fconstexpr-steps=<arg> 1411 1412.. option:: -fconvergent-functions 1413 1414Assume functions may be convergent 1415 1416.. option:: -fcoroutines-ts, -fno-coroutines-ts 1417 1418Enable support for the C++ Coroutines TS 1419 1420.. option:: -fcoverage-mapping, -fno-coverage-mapping 1421 1422Generate coverage mapping to enable code coverage analysis 1423 1424.. option:: -fcreate-profile 1425 1426.. option:: -fcs-profile-generate 1427 1428Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var) 1429 1430.. program:: clang1 1431.. option:: -fcs-profile-generate=<directory> 1432.. program:: clang 1433 1434Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var) 1435 1436.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals 1437 1438Use approximate transcendental functions 1439 1440.. option:: -fcuda-short-ptr, -fno-cuda-short-ptr 1441 1442Use 32-bit pointers for accessing const/local/shared address spaces 1443 1444.. option:: -fcxx-exceptions, -fno-cxx-exceptions 1445 1446Enable C++ exceptions 1447 1448.. option:: -fcxx-modules, -fno-cxx-modules 1449 1450.. option:: -fdata-sections, -fno-data-sections 1451 1452Place each data in its own section 1453 1454.. option:: -fdebug-compilation-dir <arg>, -fdebug-compilation-dir=<arg> 1455 1456The compilation directory to embed in the debug info. 1457 1458.. option:: -fdebug-default-version=<arg> 1459 1460Default DWARF version to use, if a -g option caused DWARF debug info to be produced 1461 1462.. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling 1463 1464Emit extra debug info to make sample profile more accurate 1465 1466.. option:: -fdebug-macro, -fno-debug-macro 1467 1468Emit macro debug information 1469 1470.. option:: -fdebug-pass-arguments 1471 1472.. option:: -fdebug-pass-structure 1473 1474.. option:: -fdebug-prefix-map=<arg> 1475 1476remap file source paths in debug info 1477 1478.. option:: -fdebug-ranges-base-address, -fno-debug-ranges-base-address 1479 1480Use DWARF base address selection entries in .debug\_ranges 1481 1482.. option:: -fdebug-types-section, -fno-debug-types-section 1483 1484Place debug types in their own section (ELF Only) 1485 1486.. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing 1487 1488Parse templated function definitions at the end of the translation unit 1489 1490.. option:: -fdelete-null-pointer-checks, -fno-delete-null-pointer-checks 1491 1492Treat usage of null pointers as undefined behavior (default) 1493 1494.. option:: -fdenormal-fp-math=<arg> 1495 1496.. option:: -fdiagnostics-absolute-paths 1497 1498Print absolute paths in diagnostics 1499 1500.. option:: -fdiagnostics-color, -fno-diagnostics-color 1501 1502.. program:: clang1 1503.. option:: -fdiagnostics-color=<arg> 1504.. program:: clang 1505 1506.. option:: -fdiagnostics-hotness-threshold=<number> 1507 1508Prevent optimization remarks from being output if they do not have at least this profile count 1509 1510.. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness 1511 1512Enable profile hotness information in diagnostic line 1513 1514.. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack 1515 1516Display include stacks for diagnostic notes 1517 1518.. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option 1519 1520Print option name with mappable diagnostics 1521 1522.. option:: -fdiagnostics-show-template-tree 1523 1524Print a template comparison tree for differing templates 1525 1526.. option:: -fdigraphs, -fno-digraphs 1527 1528Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default) 1529 1530.. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers 1531 1532Allow '$' in identifiers 1533 1534.. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes 1535 1536Enable '\[\[\]\]' attributes in all C and C++ language modes 1537 1538.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm 1539 1540.. option:: -fdwarf-exceptions 1541 1542Use DWARF style exceptions 1543 1544.. option:: -felide-constructors, -fno-elide-constructors 1545 1546.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols 1547 1548.. option:: -feliminate-unused-debug-types, -fno-eliminate-unused-debug-types 1549 1550Do not emit debug info for defined but unused types 1551 1552.. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker) 1553 1554Embed LLVM bitcode (option: off, all, bitcode, marker) 1555 1556.. option:: -femit-all-decls 1557 1558Emit all declarations, even if unused 1559 1560.. option:: -femulated-tls, -fno-emulated-tls 1561 1562Use emutls functions to access thread\_local variables 1563 1564.. option:: -fenable-matrix 1565 1566Enable matrix data type and related builtin functions 1567 1568.. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg> 1569 1570.. option:: -ferror-limit=<arg> 1571 1572.. option:: -fescaping-block-tail-calls, -fno-escaping-block-tail-calls 1573 1574.. option:: -fexceptions, -fno-exceptions 1575 1576Enable support for exception handling 1577 1578.. option:: -fexec-charset=<arg> 1579 1580.. option:: -fexperimental-new-constant-interpreter 1581 1582Enable the experimental new constant interpreter 1583 1584.. option:: -fexperimental-relative-c++-abi-vtables, -fno-experimental-relative-c++-abi-vtables 1585 1586Use the experimental C++ class ABI for classes with virtual tables 1587 1588.. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg> 1589 1590.. option:: -ffast-math, -fno-fast-math 1591 1592Allow aggressive, lossy floating-point optimizations 1593 1594.. option:: -ffile-prefix-map=<arg> 1595 1596remap file source paths in debug info and predefined preprocessor macros 1597 1598.. option:: -ffinite-math-only, -fno-finite-math-only 1599 1600.. option:: -ffixed-point, -fno-fixed-point 1601 1602Enable fixed point types 1603 1604.. option:: -ffor-scope, -fno-for-scope 1605 1606.. option:: -fforce-dwarf-frame, -fno-force-dwarf-frame 1607 1608Always emit a debug frame section 1609 1610.. option:: -fforce-emit-vtables, -fno-force-emit-vtables 1611 1612Emits more virtual tables to improve devirtualization 1613 1614.. option:: -fforce-enable-int128, -fno-force-enable-int128 1615 1616Enable support for int128\_t type 1617 1618.. option:: -ffp-contract=<arg> 1619 1620Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma) \| off (never fuse). Default is 'fast' for CUDA/HIP and 'on' otherwise. 1621 1622.. option:: -ffp-exception-behavior=<arg> 1623 1624Specifies the exception behavior of floating-point operations. 1625 1626.. option:: -ffp-model=<arg> 1627 1628Controls the semantics of floating-point calculations. 1629 1630.. option:: -ffreestanding 1631 1632Assert that the compilation takes place in a freestanding environment 1633 1634.. option:: -ffunction-sections, -fno-function-sections 1635 1636Place each function in its own section 1637 1638.. option:: -fgnu-inline-asm, -fno-gnu-inline-asm 1639 1640.. option:: -fgnu-keywords, -fno-gnu-keywords 1641 1642Allow GNU-extension keywords regardless of language standard 1643 1644.. option:: -fgnu-runtime 1645 1646Generate output compatible with the standard GNU Objective-C runtime 1647 1648.. option:: -fgnu89-inline, -fno-gnu89-inline 1649 1650Use the gnu89 inline semantics 1651 1652.. option:: -fgnuc-version=<arg> 1653 1654Sets various macros to claim compatibility with the given GCC version (default is 4.2.1) 1655 1656.. option:: -fgpu-allow-device-init, -fno-gpu-allow-device-init 1657 1658Allow device side init function in HIP 1659 1660.. option:: -fgpu-defer-diag, -fno-gpu-defer-diag 1661 1662Defer host/device related diagnostic messages for CUDA/HIP 1663 1664.. option:: -fgpu-rdc, -fcuda-rdc, -fno-gpu-rdc 1665 1666Generate relocatable device code, also known as separate compilation mode 1667 1668.. option:: -fhip-new-launch-api, -fno-hip-new-launch-api 1669 1670Use new kernel launching API for HIP 1671 1672.. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities 1673 1674.. option:: -fhonor-nans, -fno-honor-nans 1675 1676.. option:: -fhosted 1677 1678.. option:: -fignore-exceptions 1679 1680Enable support for ignoring exception handling constructs 1681 1682.. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps 1683 1684Implicitly search the file system for module map files. 1685 1686.. option:: -fimplicit-modules, -fno-implicit-modules 1687 1688.. option:: -finput-charset=<arg> 1689 1690.. option:: -finstrument-function-entry-bare 1691 1692Instrument function entry only, after inlining, without arguments to the instrumentation call 1693 1694.. option:: -finstrument-functions 1695 1696Generate calls to instrument function entry and exit 1697 1698.. option:: -finstrument-functions-after-inlining 1699 1700Like -finstrument-functions, but insert the calls after inlining 1701 1702.. option:: -fintegrated-as, -fno-integrated-as, -integrated-as 1703 1704Enable the integrated assembler 1705 1706.. option:: -fintegrated-cc1, -fno-integrated-cc1 1707 1708Run cc1 in-process 1709 1710.. option:: -fjump-tables, -fno-jump-tables 1711 1712Use jump tables for lowering switches 1713 1714.. option:: -fkeep-static-consts, -fno-keep-static-consts 1715 1716Keep static const variables if unused 1717 1718.. option:: -flax-vector-conversions=<arg>, -flax-vector-conversions (equivalent to -flax-vector-conversions=integer), -fno-lax-vector-conversions (equivalent to -flax-vector-conversions=none) 1719 1720Enable implicit vector bit-casts 1721 1722.. option:: -flimited-precision=<arg> 1723 1724.. option:: -flto, -fno-lto 1725 1726Enable LTO in 'full' mode 1727 1728.. option:: -flto-jobs=<arg> 1729 1730Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected) 1731 1732.. program:: clang1 1733.. option:: -flto=<arg> 1734.. program:: clang 1735 1736Set LTO mode to either 'full' or 'thin' 1737 1738.. option:: -fmacro-backtrace-limit=<arg> 1739 1740.. option:: -fmath-errno, -fno-math-errno 1741 1742Require math functions to indicate errors by setting errno 1743 1744.. option:: -fmax-tokens=<arg> 1745 1746Max total number of preprocessed tokens for -Wmax-tokens. 1747 1748.. option:: -fmax-type-align=<arg> 1749 1750Specify the maximum alignment to enforce on pointers lacking an explicit alignment 1751 1752.. option:: -fmemory-profile, -fno-memory-profile 1753 1754Enable heap memory profiling 1755 1756.. option:: -fmerge-all-constants, -fno-merge-all-constants 1757 1758Allow merging of constants 1759 1760.. option:: -fmessage-length=<arg> 1761 1762Format message diagnostics so that they fit within N columns 1763 1764.. option:: -fmodule-file-deps, -fno-module-file-deps 1765 1766.. option:: -fmodule-map-file=<file> 1767 1768Load this module map file 1769 1770.. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg> 1771 1772Specify the name of the module to build 1773 1774.. option:: -fmodules, -fno-modules 1775 1776Enable the 'modules' language feature 1777 1778.. option:: -fmodules-decluse, -fno-modules-decluse 1779 1780Require declaration of modules used within a module 1781 1782.. option:: -fmodules-ignore-macro=<arg> 1783 1784Ignore the definition of the given macro when building and loading modules 1785 1786.. option:: -fmodules-search-all, -fno-modules-search-all 1787 1788Search even non-imported modules to resolve references 1789 1790.. option:: -fmodules-strict-decluse 1791 1792Like -fmodules-decluse but requires all headers to be in modules 1793 1794.. option:: -fmodules-ts 1795 1796Enable support for the C++ Modules TS 1797 1798.. option:: -fmodules-validate-input-files-content 1799 1800Validate PCM input files based on content if mtime differs 1801 1802.. option:: -fms-compatibility, -fno-ms-compatibility 1803 1804Enable full Microsoft Visual C++ compatibility 1805 1806.. option:: -fms-compatibility-version=<arg> 1807 1808Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default)) 1809 1810.. option:: -fms-extensions, -fno-ms-extensions 1811 1812Accept some non-standard constructs supported by the Microsoft compiler 1813 1814.. option:: -fms-memptr-rep=<arg> 1815 1816.. option:: -fms-volatile 1817 1818.. option:: -fmsc-version=<arg> 1819 1820Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default)) 1821 1822.. option:: -fmudflap 1823 1824.. option:: -fmudflapth 1825 1826.. option:: -fnested-functions 1827 1828.. option:: -fnew-alignment=<align>, -fnew-alignment <arg> 1829 1830Specifies the largest alignment guaranteed by '::operator new(size\_t)' 1831 1832.. option:: -fnext-runtime 1833 1834.. option:: -fno-access-control, -fno-no-access-control 1835 1836.. option:: -fno-builtin-<arg> 1837 1838Disable implicit builtin knowledge of a specific function 1839 1840.. option:: -fno-elide-type 1841 1842Do not elide types when printing diagnostics 1843 1844.. option:: -fno-max-type-align 1845 1846.. option:: -fno-operator-names 1847 1848Do not treat C++ operator name keywords as synonyms for operators 1849 1850.. option:: -fno-strict-modules-decluse 1851 1852.. option:: -fno-temp-file 1853 1854Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes 1855 1856.. option:: -fno-working-directory 1857 1858.. option:: -fno\_modules-validate-input-files-content 1859 1860.. program:: clang1 1861.. option:: -fno\_pch-validate-input-files-content 1862.. program:: clang 1863 1864.. option:: -fnoxray-link-deps 1865 1866.. option:: -fobjc-abi-version=<arg> 1867 1868.. option:: -fobjc-arc, -fno-objc-arc 1869 1870Synthesize retain and release calls for Objective-C pointers 1871 1872.. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions 1873 1874Use EH-safe code when synthesizing retains and releases in -fobjc-arc 1875 1876.. option:: -fobjc-convert-messages-to-runtime-calls, -fno-objc-convert-messages-to-runtime-calls 1877 1878.. option:: -fobjc-exceptions, -fno-objc-exceptions 1879 1880Enable Objective-C exceptions 1881 1882.. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type 1883 1884.. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch 1885 1886.. option:: -fobjc-link-runtime 1887 1888.. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi 1889 1890.. option:: -fobjc-nonfragile-abi-version=<arg> 1891 1892.. option:: -fobjc-runtime=<arg> 1893 1894Specify the target Objective-C runtime kind and version 1895 1896.. option:: -fobjc-sender-dependent-dispatch 1897 1898.. option:: -fobjc-weak, -fno-objc-weak 1899 1900Enable ARC-style weak references in Objective-C 1901 1902.. option:: -fomit-frame-pointer, -fno-omit-frame-pointer 1903 1904.. option:: -fopenmp, -fno-openmp 1905 1906Parse OpenMP pragmas and generate parallel code. 1907 1908.. option:: -fopenmp-simd, -fno-openmp-simd 1909 1910Emit OpenMP code only for SIMD-based constructs. 1911 1912.. option:: -fopenmp-version=<arg> 1913 1914.. program:: clang1 1915.. option:: -fopenmp=<arg> 1916.. program:: clang 1917 1918.. option:: -foperator-arrow-depth=<arg> 1919 1920.. option:: -foptimization-record-file=<file> 1921 1922Specify 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. 1923 1924.. option:: -foptimization-record-passes=<regex> 1925 1926Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes) 1927 1928.. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls 1929 1930.. option:: -forder-file-instrumentation 1931 1932Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var) 1933 1934.. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg> 1935 1936.. option:: -fpack-struct, -fno-pack-struct 1937 1938.. program:: clang1 1939.. option:: -fpack-struct=<arg> 1940.. program:: clang 1941 1942Specify the default maximum struct packing alignment 1943 1944.. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings 1945 1946Recognize and construct Pascal-style string literals 1947 1948.. option:: -fpass-plugin=<dsopath> 1949 1950Load pass plugin from a dynamic shared object file (only with new pass manager). 1951 1952.. option:: -fpatchable-function-entry=<N,M> 1953 1954Generate M NOPs before function entry and N-M NOPs after function entry 1955 1956.. option:: -fpcc-struct-return 1957 1958Override the default ABI to return all structs on the stack 1959 1960.. option:: -fpch-codegen, -fno-pch-codegen 1961 1962Generate code for uses of this PCH that assumes an explicit object file will be built for the PCH 1963 1964.. option:: -fpch-debuginfo, -fno-pch-debuginfo 1965 1966Generate debug info for types in an object file built from this PCH and do not generate them elsewhere 1967 1968.. option:: -fpch-instantiate-templates, -fno-pch-instantiate-templates 1969 1970Instantiate templates already while building a PCH 1971 1972.. option:: -fpch-preprocess 1973 1974.. option:: -fpch-validate-input-files-content 1975 1976Validate PCH input files based on content if mtime differs 1977 1978.. option:: -fpic, -fno-pic 1979 1980.. option:: -fpie, -fno-pie 1981 1982.. option:: -fplt, -fno-plt 1983 1984.. option:: -fplugin=<dsopath> 1985 1986Load the named plugin (dynamic shared object) 1987 1988.. option:: -fpreserve-as-comments, -fno-preserve-as-comments 1989 1990.. option:: -fprofile-arcs, -fno-profile-arcs 1991 1992.. option:: -fprofile-dir=<arg> 1993 1994.. option:: -fprofile-exclude-files=<arg> 1995 1996Instrument only functions from files where names don't match all the regexes separated by a semi-colon 1997 1998.. option:: -fprofile-filter-files=<arg> 1999 2000Instrument only functions from files where names match any regex separated by a semi-colon 2001 2002.. option:: -fprofile-generate, -fno-profile-generate 2003 2004Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var) 2005 2006.. program:: clang1 2007.. option:: -fprofile-generate=<directory> 2008.. program:: clang 2009 2010Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var) 2011 2012.. option:: -fprofile-instr-generate, -fno-profile-instr-generate 2013 2014Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var) 2015 2016.. program:: clang1 2017.. option:: -fprofile-instr-generate=<file> 2018.. program:: clang 2019 2020Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var) 2021 2022.. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use 2023 2024.. program:: clang1 2025.. option:: -fprofile-instr-use=<arg> 2026.. program:: clang 2027 2028Use instrumentation data for profile-guided optimization 2029 2030.. option:: -fprofile-remapping-file=<file>, -fprofile-remapping-file <arg> 2031 2032Use the remappings described in <file> to match the profile data against names in the program 2033 2034.. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate 2035 2036Specifies that the sample profile is accurate. If the sample 2037 profile is accurate, callsites without profile samples are marked 2038 as cold. Otherwise, treat callsites without profile samples as if 2039 we have no profile 2040 2041.. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use 2042 2043.. program:: clang1 2044.. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg> 2045.. program:: clang 2046 2047Enable sample-based profile guided optimizations 2048 2049.. option:: -fprofile-update=<method> 2050 2051Set update method of profile counters (atomic,prefer-atomic,single) 2052 2053.. program:: clang1 2054.. option:: -fprofile-use=<pathname> 2055.. program:: clang 2056 2057Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>. 2058 2059.. program:: clang1 2060.. option:: -fprofile-list=<file> 2061.. program:: clang 2062 2063Filename defining the list of functions/files to instrument. The file uses the sanitizer special case list format. 2064 2065.. option:: -freciprocal-math, -fno-reciprocal-math 2066 2067Allow division operations to be reassociated 2068 2069.. option:: -freg-struct-return 2070 2071Override the default ABI to return small structs in registers 2072 2073.. option:: -fregister-global-dtors-with-atexit, -fno-register-global-dtors-with-atexit 2074 2075Use atexit or \_\_cxa\_atexit to register global destructors 2076 2077.. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args 2078 2079Enable C++17 relaxed template template argument matching 2080 2081.. option:: -freroll-loops, -fno-reroll-loops 2082 2083Turn on loop reroller 2084 2085.. option:: -fretain-comments-from-system-headers 2086 2087.. option:: -frewrite-imports, -fno-rewrite-imports 2088 2089.. option:: -frewrite-includes, -fno-rewrite-includes 2090 2091.. option:: -frewrite-map-file <arg> 2092 2093.. program:: clang1 2094.. option:: -frewrite-map-file=<arg> 2095.. program:: clang 2096 2097.. option:: -fropi, -fno-ropi 2098 2099Generate read-only position independent code (ARM only) 2100 2101.. option:: -frounding-math, -fno-rounding-math 2102 2103.. option:: -frtti, -fno-rtti 2104 2105.. option:: -frtti-data, -fno-rtti-data 2106 2107.. option:: -frwpi, -fno-rwpi 2108 2109Generate read-write position independent code (ARM only) 2110 2111.. option:: -fsave-optimization-record, -fno-save-optimization-record 2112 2113Generate a YAML optimization record file 2114 2115.. program:: clang1 2116.. option:: -fsave-optimization-record=<format> 2117.. program:: clang 2118 2119Generate an optimization record file in a specific format 2120 2121.. option:: -fseh-exceptions 2122 2123Use SEH style exceptions 2124 2125.. option:: -fsemantic-interposition, -fno-semantic-interposition 2126 2127.. option:: -fshort-enums, -fno-short-enums 2128 2129Allocate to an enum type only as many bytes as it needs for the declared range of possible values 2130 2131.. option:: -fshort-wchar, -fno-short-wchar 2132 2133Force wchar\_t to be a short unsigned int 2134 2135.. option:: -fshow-column, -fno-show-column 2136 2137.. option:: -fshow-overloads=<arg> 2138 2139Which overload candidates to show when overload resolution fails: best\|all; defaults to all 2140 2141.. option:: -fshow-source-location, -fno-show-source-location 2142 2143.. option:: -fsignaling-math, -fno-signaling-math 2144 2145.. option:: -fsigned-bitfields 2146 2147.. option:: -fsigned-char, -fno-signed-char, --signed-char 2148 2149char is signed 2150 2151.. option:: -fsigned-zeros, -fno-signed-zeros 2152 2153.. option:: -fsized-deallocation, -fno-sized-deallocation 2154 2155Enable C++14 sized global deallocation functions 2156 2157.. option:: -fsjlj-exceptions 2158 2159Use SjLj style exceptions 2160 2161.. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize 2162 2163Enable the superword-level parallelism vectorization passes 2164 2165.. option:: -fspell-checking, -fno-spell-checking 2166 2167.. option:: -fspell-checking-limit=<arg> 2168 2169.. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining 2170 2171Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF 2172 2173.. option:: -fsplit-lto-unit, -fno-split-lto-unit 2174 2175Enables splitting of the LTO unit 2176 2177.. option:: -fsplit-machine-functions, -fno-split-machine-functions 2178 2179Enable late function splitting using profile information (x86 ELF) 2180 2181.. option:: -fsplit-stack 2182 2183.. option:: -fstack-clash-protection, -fno-stack-clash-protection 2184 2185Enable stack clash protection 2186 2187.. option:: -fstack-protector, -fno-stack-protector 2188 2189Enable 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. 2190 2191.. option:: -fstack-protector-all 2192 2193Enable stack protectors for all functions 2194 2195.. option:: -fstack-protector-strong 2196 2197Enable 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 2198 2199.. option:: -fstack-size-section, -fno-stack-size-section 2200 2201Emit section containing metadata on function stack sizes 2202 2203.. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug 2204 2205Emit full debug info for all types used by the program 2206 2207.. option:: -fstrict-aliasing, -fno-strict-aliasing 2208 2209.. option:: -fstrict-enums, -fno-strict-enums 2210 2211Enable optimizations based on the strict definition of an enum's value range 2212 2213.. option:: -fstrict-float-cast-overflow, -fno-strict-float-cast-overflow 2214 2215Assume that overflowing float-to-int casts are undefined (default) 2216 2217.. option:: -fstrict-overflow, -fno-strict-overflow 2218 2219.. option:: -fstrict-return, -fno-strict-return 2220 2221.. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers 2222 2223Enable optimizations based on the strict rules for overwriting polymorphic C++ objects 2224 2225.. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa 2226 2227.. option:: -fsymbol-partition=<arg> 2228 2229.. option:: -ftabstop=<arg> 2230 2231.. option:: -ftemplate-backtrace-limit=<arg> 2232 2233.. option:: -ftemplate-depth-<arg> 2234 2235.. option:: -ftemplate-depth=<arg> 2236 2237.. option:: -ftest-coverage, -fno-test-coverage 2238 2239.. option:: -fthin-link-bitcode=<arg> 2240 2241Write minimized bitcode to <file> for the ThinLTO thin link only 2242 2243.. option:: -fthinlto-index=<arg> 2244 2245Perform ThinLTO importing using provided function summary index 2246 2247.. option:: -fthreadsafe-statics, -fno-threadsafe-statics 2248 2249.. option:: -ftime-report 2250 2251.. option:: -ftime-trace 2252 2253 2254Turn on time profiler. Generates JSON file based on output filename. Results 2255can be analyzed with chrome://tracing or `Speedscope App 2256<https://www.speedscope.app>`_ for flamegraph visualization. 2257 2258.. option:: -ftime-trace-granularity=<arg> 2259 2260Minimum time granularity (in microseconds) traced by time profiler 2261 2262.. option:: -ftls-model=<arg> 2263 2264.. option:: -ftrap-function=<arg> 2265 2266Issue call to specified function rather than a trap instruction 2267 2268.. option:: -ftrapping-math, -fno-trapping-math 2269 2270.. option:: -ftrapv 2271 2272Trap on integer overflow 2273 2274.. option:: -ftrapv-handler <arg> 2275 2276.. program:: clang1 2277.. option:: -ftrapv-handler=<function name> 2278.. program:: clang 2279 2280Specify the function to be called on overflow 2281 2282.. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs 2283 2284Process trigraph sequences 2285 2286.. option:: -ftrivial-auto-var-init-stop-after=<arg> 2287 2288Stop initializing trivial automatic stack variables after the specified number of instances 2289 2290.. option:: -ftrivial-auto-var-init=<arg> 2291 2292Initialize trivial automatic stack variables: uninitialized (default) \| pattern 2293 2294.. option:: -funique-basic-block-section-names, -fno-unique-basic-block-section-names 2295 2296Use unique names for basic block sections (ELF Only) 2297 2298.. option:: -funique-internal-linkage-names, -fno-unique-internal-linkage-names 2299 2300Uniqueify Internal Linkage Symbol Names by appending the MD5 hash of the module path 2301 2302.. option:: -funique-section-names, -fno-unique-section-names 2303 2304.. option:: -funit-at-a-time, -fno-unit-at-a-time 2305 2306.. option:: -funroll-loops, -fno-unroll-loops 2307 2308Turn on loop unroller 2309 2310.. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations 2311 2312.. option:: -funsigned-bitfields 2313 2314.. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char 2315 2316.. option:: -funwind-tables, -fno-unwind-tables 2317 2318.. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit 2319 2320.. option:: -fuse-init-array, -fno-use-init-array 2321 2322.. option:: -fuse-ld=<arg> 2323 2324.. option:: -fuse-line-directives, -fno-use-line-directives 2325 2326Use #line in preprocessed output 2327 2328.. option:: -fvalidate-ast-input-files-content 2329 2330Compute 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 2331 2332.. option:: -fveclib=<arg> 2333 2334Use the given vector functions library 2335 2336.. option:: -fvectorize, -fno-vectorize, -ftree-vectorize 2337 2338Enable the loop vectorization passes 2339 2340.. option:: -fverbose-asm, -dA, -fno-verbose-asm 2341 2342Generate verbose assembly output 2343 2344.. option:: -fvirtual-function-elimination, -fno-virtual-function-elimination 2345 2346Enables dead virtual function elimination optimization. Requires -flto=full 2347 2348.. option:: -fvisibility-global-new-delete-hidden 2349 2350Give global C++ operator new and delete declarations hidden visibility 2351 2352.. option:: -fvisibility-inlines-hidden 2353 2354Give inline C++ member functions hidden visibility by default 2355 2356.. option:: -fvisibility-inlines-hidden-static-local-var, -fno-visibility-inlines-hidden-static-local-var 2357 2358When -fvisibility-inlines-hidden is enabled, static variables in inline C++ member functions will also be given hidden visibility by default 2359 2360.. option:: -fvisibility-ms-compat 2361 2362Give global types 'default' visibility and global functions and variables 'hidden' visibility by default 2363 2364.. option:: -fvisibility=<arg> 2365 2366Set the default symbol visibility for all global declarations 2367 2368.. option:: -fwasm-exceptions 2369 2370Use WebAssembly style exceptions 2371 2372.. option:: -fwhole-program-vtables, -fno-whole-program-vtables 2373 2374Enables whole-program vtable optimization. Requires -flto 2375 2376.. option:: -fwrapv, -fno-wrapv 2377 2378Treat signed integer overflow as two's complement 2379 2380.. option:: -fwritable-strings 2381 2382Store string literals as writable data 2383 2384.. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents 2385 2386Always emit \_\_xray\_customevent(...) calls even if the containing function is not always instrumented 2387 2388.. option:: -fxray-always-emit-typedevents, -fno-xray-always-emit-typedevents 2389 2390Always emit \_\_xray\_typedevent(...) calls even if the containing function is not always instrumented 2391 2392.. option:: -fxray-always-instrument=<arg> 2393 2394DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute. 2395 2396.. option:: -fxray-attr-list=<arg> 2397 2398Filename defining the list of functions/types for imbuing XRay attributes. 2399 2400.. option:: -fxray-function-groups=<arg> 2401 2402Only instrument 1 of N groups 2403 2404.. option:: -fxray-function-index, -fno-xray-function-index 2405 2406.. option:: -fxray-ignore-loops, -fno-xray-ignore-loops 2407 2408Don't instrument functions with loops unless they also meet the minimum function size 2409 2410.. option:: -fxray-instruction-threshold<arg> 2411 2412.. program:: clang1 2413.. option:: -fxray-instruction-threshold=<arg> 2414.. program:: clang 2415 2416Sets the minimum function size to instrument with XRay 2417 2418.. option:: -fxray-instrument, -fno-xray-instrument 2419 2420Generate XRay instrumentation sleds on function entry and exit 2421 2422.. option:: -fxray-instrumentation-bundle=<arg> 2423 2424Select 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'. 2425 2426.. option:: -fxray-link-deps 2427 2428Tells clang to add the link dependencies for XRay. 2429 2430.. option:: -fxray-modes=<arg> 2431 2432List of modes to link in by default into XRay instrumented binaries. 2433 2434.. option:: -fxray-never-instrument=<arg> 2435 2436DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute. 2437 2438.. option:: -fxray-selected-function-group=<arg> 2439 2440When using -fxray-function-groups, select which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1 2441 2442.. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss 2443 2444.. option:: -fzvector, -fno-zvector, -mzvector 2445 2446Enable System z vector language extension 2447 2448.. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic 2449 2450.. option:: -pedantic-errors, --pedantic-errors 2451 2452OpenCL flags 2453------------ 2454.. option:: -cl-denorms-are-zero 2455 2456OpenCL only. Allow denormals to be flushed to zero. 2457 2458.. option:: -cl-fast-relaxed-math 2459 2460OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_. 2461 2462.. option:: -cl-finite-math-only 2463 2464OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf. 2465 2466.. option:: -cl-fp32-correctly-rounded-divide-sqrt 2467 2468OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded. 2469 2470.. option:: -cl-kernel-arg-info 2471 2472OpenCL only. Generate kernel argument metadata. 2473 2474.. option:: -cl-mad-enable 2475 2476OpenCL only. Allow use of less precise MAD computations in the generated binary. 2477 2478.. option:: -cl-no-signed-zeros 2479 2480OpenCL only. Allow use of less precise no signed zeros computations in the generated binary. 2481 2482.. option:: -cl-opt-disable 2483 2484OpenCL only. This option disables all optimizations. By default optimizations are enabled. 2485 2486.. option:: -cl-single-precision-constant 2487 2488OpenCL only. Treat double precision floating-point constant as single precision constant. 2489 2490.. option:: -cl-std=<arg> 2491 2492OpenCL language standard to compile for. 2493 2494.. option:: -cl-strict-aliasing 2495 2496OpenCL only. This option is added for compatibility with OpenCL 1.0. 2497 2498.. option:: -cl-uniform-work-group-size 2499 2500OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel 2501 2502.. option:: -cl-unsafe-math-optimizations 2503 2504OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable. 2505 2506SYCL flags 2507---------- 2508.. option:: -fsycl, -fno-sycl 2509 2510Enable SYCL kernels compilation for device 2511 2512.. option:: -sycl-std=<arg> 2513 2514SYCL language standard to compile for. 2515 2516Target-dependent compilation options 2517~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2518.. option:: -G<size>, -G=<arg>, -msmall-data-limit=<arg>, -msmall-data-threshold=<arg> 2519 2520Put objects of at most <size> bytes into small data section (MIPS / Hexagon) 2521 2522.. option:: -ffixed-x1 2523 2524Reserve the x1 register (AArch64/RISC-V only) 2525 2526.. option:: -ffixed-x10 2527 2528Reserve the x10 register (AArch64/RISC-V only) 2529 2530.. option:: -ffixed-x11 2531 2532Reserve the x11 register (AArch64/RISC-V only) 2533 2534.. option:: -ffixed-x12 2535 2536Reserve the x12 register (AArch64/RISC-V only) 2537 2538.. option:: -ffixed-x13 2539 2540Reserve the x13 register (AArch64/RISC-V only) 2541 2542.. option:: -ffixed-x14 2543 2544Reserve the x14 register (AArch64/RISC-V only) 2545 2546.. option:: -ffixed-x15 2547 2548Reserve the x15 register (AArch64/RISC-V only) 2549 2550.. option:: -ffixed-x16 2551 2552Reserve the x16 register (AArch64/RISC-V only) 2553 2554.. option:: -ffixed-x17 2555 2556Reserve the x17 register (AArch64/RISC-V only) 2557 2558.. option:: -ffixed-x18 2559 2560Reserve the x18 register (AArch64/RISC-V only) 2561 2562.. option:: -ffixed-x19 2563 2564Reserve the x19 register (AArch64/RISC-V only) 2565 2566.. option:: -ffixed-x2 2567 2568Reserve the x2 register (AArch64/RISC-V only) 2569 2570.. option:: -ffixed-x20 2571 2572Reserve the x20 register (AArch64/RISC-V only) 2573 2574.. option:: -ffixed-x21 2575 2576Reserve the x21 register (AArch64/RISC-V only) 2577 2578.. option:: -ffixed-x22 2579 2580Reserve the x22 register (AArch64/RISC-V only) 2581 2582.. option:: -ffixed-x23 2583 2584Reserve the x23 register (AArch64/RISC-V only) 2585 2586.. option:: -ffixed-x24 2587 2588Reserve the x24 register (AArch64/RISC-V only) 2589 2590.. option:: -ffixed-x25 2591 2592Reserve the x25 register (AArch64/RISC-V only) 2593 2594.. option:: -ffixed-x26 2595 2596Reserve the x26 register (AArch64/RISC-V only) 2597 2598.. option:: -ffixed-x27 2599 2600Reserve the x27 register (AArch64/RISC-V only) 2601 2602.. option:: -ffixed-x28 2603 2604Reserve the x28 register (AArch64/RISC-V only) 2605 2606.. option:: -ffixed-x29 2607 2608Reserve the x29 register (AArch64/RISC-V only) 2609 2610.. option:: -ffixed-x3 2611 2612Reserve the x3 register (AArch64/RISC-V only) 2613 2614.. option:: -ffixed-x30 2615 2616Reserve the x30 register (AArch64/RISC-V only) 2617 2618.. option:: -ffixed-x31 2619 2620Reserve the x31 register (AArch64/RISC-V only) 2621 2622.. option:: -ffixed-x4 2623 2624Reserve the x4 register (AArch64/RISC-V only) 2625 2626.. option:: -ffixed-x5 2627 2628Reserve the x5 register (AArch64/RISC-V only) 2629 2630.. option:: -ffixed-x6 2631 2632Reserve the x6 register (AArch64/RISC-V only) 2633 2634.. option:: -ffixed-x7 2635 2636Reserve the x7 register (AArch64/RISC-V only) 2637 2638.. option:: -ffixed-x8 2639 2640Reserve the x8 register (AArch64/RISC-V only) 2641 2642.. option:: -ffixed-x9 2643 2644Reserve the x9 register (AArch64/RISC-V only) 2645 2646.. option:: -m16 2647 2648.. option:: -m32 2649 2650.. option:: -m64 2651 2652.. option:: -mabi=<arg> 2653 2654.. option:: -maix-struct-return 2655 2656Return all structs in memory (PPC32 only) 2657 2658.. option:: -malign-branch-boundary=<arg> 2659 2660Specify the boundary's size to align branches 2661 2662.. option:: -malign-branch=<arg1>,<arg2>... 2663 2664Specify types of branches to align 2665 2666.. option:: -malign-double 2667 2668Align doubles to two words in structs (x86 only) 2669 2670.. option:: -march=<arg> 2671 2672.. option:: -masm=<arg> 2673 2674.. option:: -mbackchain, -mno-backchain 2675 2676Link stack frames through backchain on System Z 2677 2678.. option:: -mbranches-within-32B-boundaries 2679 2680Align selected branches (fused, jcc, jmp) within 32-byte boundary 2681 2682.. option:: -mcmodel=<arg>, -mcmodel=medany (equivalent to -mcmodel=medium), -mcmodel=medlow (equivalent to -mcmodel=small) 2683 2684.. option:: -mcode-object-v3, -mno-code-object-v3 2685 2686Legacy option to specify code object ABI V2 (-mnocode-object-v3) or V3 (-mcode-object-v3) (AMDGPU only) 2687 2688.. option:: -mcode-object-version=<version> 2689 2690Specify code object ABI version. Defaults to 4. (AMDGPU only) 2691 2692.. option:: -mconsole<arg> 2693 2694.. program:: clang1 2695.. 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) 2696.. program:: clang 2697 2698.. option:: -mcrc, -mno-crc 2699 2700Allow use of CRC instructions (ARM/Mips only) 2701 2702.. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg> 2703 2704.. option:: -mdll<arg> 2705 2706.. option:: -mdouble=<arg> 2707 2708Force double to be 32 bits or 64 bits 2709 2710.. option:: -mdynamic-no-pic<arg> 2711 2712.. option:: -meabi <arg> 2713 2714Set EABI type, e.g. 4, 5 or gnu (default depends on triple) 2715 2716.. option:: -menable-experimental-extensions 2717 2718Enable use of experimental RISC-V extensions. 2719 2720.. option:: -mfentry 2721 2722Insert calls to fentry at function entry (x86/SystemZ only) 2723 2724.. option:: -mfloat-abi=<arg> 2725 2726.. option:: -mfpmath=<arg> 2727 2728.. option:: -mfpu=<arg> 2729 2730.. option:: -mglobal-merge, -mno-global-merge 2731 2732Enable merging of globals 2733 2734.. option:: -mhard-float 2735 2736.. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg> 2737 2738.. option:: -mhwmult=<arg> 2739 2740.. option:: -miamcu, -mno-iamcu 2741 2742Use Intel MCU ABI 2743 2744.. option:: -mignore-xcoff-visibility 2745 2746Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file 2747 2748.. option:: -mimplicit-float, -mno-implicit-float 2749 2750.. option:: -mimplicit-it=<arg> 2751 2752.. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible 2753 2754(integrated-as) Emit an object file which can be used with an incremental linker 2755 2756.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg> 2757 2758.. option:: -mkernel 2759 2760.. option:: -mlong-calls, -mno-long-calls 2761 2762Generate branches with extended addressability, usually via indirect jumps. 2763 2764.. option:: -mlvi-cfi, -mno-lvi-cfi 2765 2766Enable only control-flow mitigations for Load Value Injection (LVI) 2767 2768.. option:: -mlvi-hardening, -mno-lvi-hardening 2769 2770Enable all mitigations for Load Value Injection (LVI) 2771 2772.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg> 2773 2774Set Mac OS X deployment target 2775 2776.. option:: -mmcu=<arg> 2777 2778.. option:: -mms-bitfields, -mno-ms-bitfields 2779 2780Set the default structure layout to be compatible with the Microsoft compiler standard 2781 2782.. option:: -mnop-mcount 2783 2784Generate mcount/\_\_fentry\_\_ calls as nops. To activate they need to be patched in. 2785 2786.. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer 2787 2788Omit frame pointer setup for leaf functions 2789 2790.. option:: -moslib=<arg> 2791 2792.. option:: -mpacked-stack, -mno-packed-stack 2793 2794Use packed stack layout (SystemZ only). 2795 2796.. option:: -mpad-max-prefix-size=<arg> 2797 2798Specify maximum number of prefixes to use for padding 2799 2800.. option:: -mpie-copy-relocations, -mno-pie-copy-relocations 2801 2802Use copy relocations support for PIE builds 2803 2804.. option:: -mprefer-vector-width=<arg> 2805 2806Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions. 2807 2808.. option:: -mqdsp6-compat 2809 2810Enable hexagon-qdsp6 backward compatibility 2811 2812.. option:: -mrecip 2813 2814.. program:: clang1 2815.. option:: -mrecip=<arg1>,<arg2>... 2816.. program:: clang 2817 2818.. option:: -mrecord-mcount 2819 2820Generate a \_\_mcount\_loc section entry for each \_\_fentry\_\_ call. 2821 2822.. option:: -mred-zone, -mno-red-zone 2823 2824.. option:: -mregparm=<arg> 2825 2826.. option:: -mrelax, -mno-relax 2827 2828Enable linker relaxation 2829 2830.. option:: -mrelax-all, -mno-relax-all 2831 2832(integrated-as) Relax all machine instructions 2833 2834.. option:: -mretpoline, -mno-retpoline 2835 2836.. option:: -mrtd, -mno-rtd 2837 2838Make StdCall calling convention the default 2839 2840.. option:: -mseses, -mno-seses 2841 2842Enable speculative execution side effect suppression (SESES). Includes LVI control flow integrity mitigations 2843 2844.. option:: -msign-return-address=<arg> 2845 2846Select return address signing scope 2847 2848.. option:: -msim 2849 2850.. option:: -msoft-float, -mno-soft-float 2851 2852Use software floating point 2853 2854.. option:: -mspeculative-load-hardening, -mno-speculative-load-hardening 2855 2856.. option:: -mstack-alignment=<arg> 2857 2858Set the stack alignment 2859 2860.. option:: -mstack-arg-probe, -mno-stack-arg-probe 2861 2862Enable stack probes 2863 2864.. option:: -mstack-probe-size=<arg> 2865 2866Set the stack probe size 2867 2868.. option:: -mstack-protector-guard-offset=<arg> 2869 2870Use the given offset for addressing the stack-protector guard 2871 2872.. option:: -mstack-protector-guard-reg=<arg> 2873 2874Use the given reg for addressing the stack-protector guard 2875 2876.. option:: -mstack-protector-guard=<arg> 2877 2878Use the given guard (global, tls) for addressing the stack-protector guard 2879 2880.. option:: -mstackrealign, -mno-stackrealign 2881 2882Force realign the stack at entry to every function 2883 2884.. option:: -msvr4-struct-return 2885 2886Return small structs in registers (PPC32 only) 2887 2888.. option:: -mthread-model <arg> 2889 2890The thread model to use, e.g. posix, single (posix by default) 2891 2892.. option:: -mthreads<arg> 2893 2894.. option:: -mthumb, -mno-thumb 2895 2896.. option:: -mtls-direct-seg-refs, -mno-tls-direct-seg-refs 2897 2898Enable direct TLS access through segment registers (default) 2899 2900.. option:: -mtls-size=<arg> 2901 2902Specify 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) 2903 2904.. program:: clang1 2905.. option:: -mtune=<arg> 2906.. program:: clang 2907 2908Only supported on X86 and RISC-V. Otherwise accepted for compatibility with GCC. 2909 2910.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg> 2911 2912.. option:: -municode<arg> 2913 2914.. option:: -mabi=vec-extabi, -mabi=vec-default 2915 2916Only supported on AIX. Specify usage of the extended vector ABI on AIX and of non-volatile vector registers. Defaults to '-mabi=default' when Altivec is enabled. 2917 2918.. option:: -mvx, -mno-vx 2919 2920.. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings 2921 2922.. option:: -mwatchos-version-min=<arg> 2923 2924.. option:: -mwavefrontsize64, -mno-wavefrontsize64 2925 2926Specify wavefront size 64 mode (AMDGPU only) 2927 2928.. option:: -mwindows<arg> 2929 2930.. option:: -mx32 2931 2932AARCH64 2933------- 2934.. option:: -fcall-saved-x10 2935 2936Make the x10 register call-saved (AArch64 only) 2937 2938.. option:: -fcall-saved-x11 2939 2940Make the x11 register call-saved (AArch64 only) 2941 2942.. option:: -fcall-saved-x12 2943 2944Make the x12 register call-saved (AArch64 only) 2945 2946.. option:: -fcall-saved-x13 2947 2948Make the x13 register call-saved (AArch64 only) 2949 2950.. option:: -fcall-saved-x14 2951 2952Make the x14 register call-saved (AArch64 only) 2953 2954.. option:: -fcall-saved-x15 2955 2956Make the x15 register call-saved (AArch64 only) 2957 2958.. option:: -fcall-saved-x18 2959 2960Make the x18 register call-saved (AArch64 only) 2961 2962.. option:: -fcall-saved-x8 2963 2964Make the x8 register call-saved (AArch64 only) 2965 2966.. option:: -fcall-saved-x9 2967 2968Make the x9 register call-saved (AArch64 only) 2969 2970.. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769 2971 2972Workaround Cortex-A53 erratum 835769 (AArch64 only) 2973 2974.. option:: -mgeneral-regs-only 2975 2976Generate code which only uses the general purpose registers (AArch64 only) 2977 2978.. option:: -mmark-bti-property 2979 2980Add .note.gnu.property with BTI to assembly files (AArch64 only) 2981 2982.. option:: -msve-vector-bits=<arg> 2983 2984Specify the size in bits of an SVE vector register. Defaults to the vector length agnostic value of "scalable". (AArch64 only) 2985 2986AMDGPU 2987------ 2988.. option:: -mcumode, -mno-cumode 2989 2990Specify CU (-mcumode) or WGP (-mno-cumode) wavefront execution mode (AMDGPU only) 2991 2992.. option:: -msram-ecc, -mno-sram-ecc 2993 2994Specify SRAM ECC mode (AMDGPU only) 2995 2996.. option:: -mtgsplit, -mno-tgsplit 2997 2998Enable threadgroup split execution mode (AMDGPU only) 2999 3000.. option:: -mxnack, -mno-xnack 3001 3002Specify XNACK mode (AMDGPU only) 3003 3004ARM 3005--- 3006.. option:: -faapcs-bitfield-load 3007 3008Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only). 3009 3010.. option:: -faapcs-bitfield-width, -fno-aapcs-bitfield-width 3011 3012Follow the AAPCS standard requirement stating that volatile bit-field width is dictated by the field container type. (ARM only). 3013 3014.. option:: -ffixed-r9 3015 3016Reserve the r9 register (ARM only) 3017 3018.. option:: -mcmse 3019 3020Allow use of CMSE (Armv8-M Security Extensions) 3021 3022.. option:: -mexecute-only, -mno-execute-only, -mpure-code 3023 3024Disallow generation of data access to code sections (ARM only) 3025 3026.. option:: -mno-movt 3027 3028Disallow use of movt/movw pairs (ARM only) 3029 3030.. option:: -mno-neg-immediates 3031 3032Disallow converting instructions with negative immediates to their negation or inversion. 3033 3034.. option:: -mnocrc 3035 3036Disallow use of CRC instructions (ARM only) 3037 3038.. option:: -mrestrict-it, -mno-restrict-it 3039 3040Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode. 3041 3042.. option:: -mtp=<arg> 3043 3044Thread pointer access method (AArch32/AArch64 only) 3045 3046.. option:: -munaligned-access, -mno-unaligned-access 3047 3048Allow memory accesses to be unaligned (AArch32/AArch64 only) 3049 3050Hexagon 3051------- 3052.. option:: -mieee-rnd-near 3053 3054.. option:: -mmemops, -mno-memops 3055 3056Enable generation of memop instructions 3057 3058.. option:: -mnvj, -mno-nvj 3059 3060Enable generation of new-value jumps 3061 3062.. option:: -mnvs, -mno-nvs 3063 3064Enable generation of new-value stores 3065 3066.. option:: -mpackets, -mno-packets 3067 3068Enable generation of instruction packets 3069 3070Hexagon 3071------- 3072.. option:: -mhvx, -mno-hvx 3073 3074Enable Hexagon Vector eXtensions 3075 3076.. option:: -mhvx-length=<arg> 3077 3078Set Hexagon Vector Length 3079 3080.. program:: clang1 3081.. option:: -mhvx=<arg> 3082.. program:: clang 3083 3084Enable Hexagon Vector eXtensions 3085 3086MIPS 3087---- 3088.. option:: -mabicalls, -mno-abicalls 3089 3090Enable SVR4-style position-independent code (Mips only) 3091 3092.. option:: -mabs=<arg> 3093 3094.. option:: -mcheck-zero-division, -mno-check-zero-division 3095 3096.. option:: -mcompact-branches=<arg> 3097 3098.. option:: -mdouble-float 3099 3100.. option:: -mdsp, -mno-dsp 3101 3102.. option:: -mdspr2, -mno-dspr2 3103 3104.. option:: -membedded-data, -mno-embedded-data 3105 3106Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS) 3107 3108.. option:: -mextern-sdata, -mno-extern-sdata 3109 3110Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS) 3111 3112.. option:: -mfp32 3113 3114Use 32-bit floating point registers (MIPS only) 3115 3116.. option:: -mfp64 3117 3118Use 64-bit floating point registers (MIPS only) 3119 3120.. option:: -mginv, -mno-ginv 3121 3122.. option:: -mgpopt, -mno-gpopt 3123 3124Use GP relative accesses for symbols known to be in a small data section (MIPS) 3125 3126.. option:: -mindirect-jump=<arg> 3127 3128Change indirect jump instructions to inhibit speculation 3129 3130.. option:: -mips16 3131 3132.. option:: -mldc1-sdc1, -mno-ldc1-sdc1 3133 3134.. option:: -mlocal-sdata, -mno-local-sdata 3135 3136Extend the -G behaviour to object local data (MIPS) 3137 3138.. option:: -mmadd4, -mno-madd4 3139 3140Enable the generation of 4-operand madd.s, madd.d and related instructions. 3141 3142.. option:: -mmicromips, -mno-micromips 3143 3144.. option:: -mmsa, -mno-msa 3145 3146Enable MSA ASE (MIPS only) 3147 3148.. option:: -mmt, -mno-mt 3149 3150Enable MT ASE (MIPS only) 3151 3152.. option:: -mnan=<arg> 3153 3154.. option:: -mno-mips16 3155 3156.. option:: -msingle-float 3157 3158.. option:: -mvirt, -mno-virt 3159 3160.. option:: -mxgot, -mno-xgot 3161 3162PowerPC 3163------- 3164.. option:: -maltivec, -mno-altivec 3165 3166.. option:: -mcmpb, -mno-cmpb 3167 3168.. option:: -mcrbits, -mno-crbits 3169 3170.. option:: -mcrypto, -mno-crypto 3171 3172.. option:: -mdirect-move, -mno-direct-move 3173 3174.. option:: -mefpu2 3175 3176.. option:: -mfloat128, -mno-float128 3177 3178.. option:: -mfprnd, -mno-fprnd 3179 3180.. option:: -mhtm, -mno-htm 3181 3182.. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors 3183 3184.. option:: -misel, -mno-isel 3185 3186.. option:: -mlongcall, -mno-longcall 3187 3188.. option:: -mmfocrf, -mmfcrf, -mno-mfocrf 3189 3190.. option:: -mmma, -mno-mma 3191 3192.. option:: -mpaired-vector-memops, -mno-paired-vector-memops 3193 3194.. option:: -mpcrel, -mno-pcrel 3195 3196.. option:: -mpopcntd, -mno-popcntd 3197 3198.. option:: -mpower10-vector, -mno-power10-vector 3199 3200.. option:: -mpower8-vector, -mno-power8-vector 3201 3202.. option:: -mpower9-vector, -mno-power9-vector 3203 3204.. option:: -msecure-plt 3205 3206.. option:: -mspe, -mno-spe 3207 3208.. option:: -mvsx, -mno-vsx 3209 3210WebAssembly 3211----------- 3212.. option:: -matomics, -mno-atomics 3213 3214.. option:: -mbulk-memory, -mno-bulk-memory 3215 3216.. option:: -mexception-handling, -mno-exception-handling 3217 3218.. option:: -mmultivalue, -mno-multivalue 3219 3220.. option:: -mmutable-globals, -mno-mutable-globals 3221 3222.. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint 3223 3224.. option:: -mreference-types, -mno-reference-types 3225 3226.. option:: -msign-ext, -mno-sign-ext 3227 3228.. option:: -msimd128, -mno-simd128 3229 3230.. option:: -mtail-call, -mno-tail-call 3231 3232.. option:: -munimplemented-simd128, -mno-unimplemented-simd128 3233 3234WebAssembly Driver 3235------------------ 3236.. option:: -mexec-model=<arg> 3237 3238Execution model (WebAssembly only) 3239 3240X86 3241--- 3242.. option:: -m3dnow, -mno-3dnow 3243 3244.. option:: -m3dnowa, -mno-3dnowa 3245 3246.. option:: -madx, -mno-adx 3247 3248.. option:: -maes, -mno-aes 3249 3250.. option:: -mamx-bf16, -mno-amx-bf16 3251 3252.. option:: -mamx-int8, -mno-amx-int8 3253 3254.. option:: -mamx-tile, -mno-amx-tile 3255 3256.. option:: -mavx, -mno-avx 3257 3258.. option:: -mavx2, -mno-avx2 3259 3260.. option:: -mavx512bf16, -mno-avx512bf16 3261 3262.. option:: -mavx512bitalg, -mno-avx512bitalg 3263 3264.. option:: -mavx512bw, -mno-avx512bw 3265 3266.. option:: -mavx512cd, -mno-avx512cd 3267 3268.. option:: -mavx512dq, -mno-avx512dq 3269 3270.. option:: -mavx512er, -mno-avx512er 3271 3272.. option:: -mavx512f, -mno-avx512f 3273 3274.. option:: -mavx512ifma, -mno-avx512ifma 3275 3276.. option:: -mavx512pf, -mno-avx512pf 3277 3278.. option:: -mavx512vbmi, -mno-avx512vbmi 3279 3280.. option:: -mavx512vbmi2, -mno-avx512vbmi2 3281 3282.. option:: -mavx512vl, -mno-avx512vl 3283 3284.. option:: -mavx512vnni, -mno-avx512vnni 3285 3286.. option:: -mavx512vp2intersect, -mno-avx512vp2intersect 3287 3288.. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq 3289 3290.. option:: -mavxvnni, -mno-avxvnni 3291 3292.. option:: -mbmi, -mno-bmi 3293 3294.. option:: -mbmi2, -mno-bmi2 3295 3296.. option:: -mcldemote, -mno-cldemote 3297 3298.. option:: -mclflushopt, -mno-clflushopt 3299 3300.. option:: -mclwb, -mno-clwb 3301 3302.. option:: -mclzero, -mno-clzero 3303 3304.. option:: -mcx16, -mno-cx16 3305 3306.. option:: -menqcmd, -mno-enqcmd 3307 3308.. option:: -mf16c, -mno-f16c 3309 3310.. option:: -mfma, -mno-fma 3311 3312.. option:: -mfma4, -mno-fma4 3313 3314.. option:: -mfsgsbase, -mno-fsgsbase 3315 3316.. option:: -mfxsr, -mno-fxsr 3317 3318.. option:: -mgfni, -mno-gfni 3319 3320.. option:: -mhreset, -mno-hreset 3321 3322.. option:: -minvpcid, -mno-invpcid 3323 3324.. option:: -mkl, -mno-kl 3325 3326.. option:: -mlwp, -mno-lwp 3327 3328.. option:: -mlzcnt, -mno-lzcnt 3329 3330.. option:: -mmmx, -mno-mmx 3331 3332.. option:: -mmovbe, -mno-movbe 3333 3334.. option:: -mmovdir64b, -mno-movdir64b 3335 3336.. option:: -mmovdiri, -mno-movdiri 3337 3338.. option:: -mmwaitx, -mno-mwaitx 3339 3340.. option:: -mpclmul, -mno-pclmul 3341 3342.. option:: -mpconfig, -mno-pconfig 3343 3344.. option:: -mpku, -mno-pku 3345 3346.. option:: -mpopcnt, -mno-popcnt 3347 3348.. option:: -mprefetchwt1, -mno-prefetchwt1 3349 3350.. option:: -mprfchw, -mno-prfchw 3351 3352.. option:: -mptwrite, -mno-ptwrite 3353 3354.. option:: -mrdpid, -mno-rdpid 3355 3356.. option:: -mrdrnd, -mno-rdrnd 3357 3358.. option:: -mrdseed, -mno-rdseed 3359 3360.. option:: -mretpoline-external-thunk, -mno-retpoline-external-thunk 3361 3362.. option:: -mrtm, -mno-rtm 3363 3364.. option:: -msahf, -mno-sahf 3365 3366.. option:: -mserialize, -mno-serialize 3367 3368.. option:: -msgx, -mno-sgx 3369 3370.. option:: -msha, -mno-sha 3371 3372.. option:: -mshstk, -mno-shstk 3373 3374.. option:: -msse, -mno-sse 3375 3376.. option:: -msse2, -mno-sse2 3377 3378.. option:: -msse3, -mno-sse3 3379 3380.. option:: -msse4.1, -mno-sse4.1 3381 3382.. program:: clang1 3383.. option:: -msse4.2, -mno-sse4.2, -msse4 3384.. program:: clang 3385 3386.. option:: -msse4a, -mno-sse4a 3387 3388.. option:: -mssse3, -mno-ssse3 3389 3390.. option:: -mtbm, -mno-tbm 3391 3392.. option:: -mtsxldtrk, -mno-tsxldtrk 3393 3394.. option:: -muintr, -mno-uintr 3395 3396.. option:: -mvaes, -mno-vaes 3397 3398.. option:: -mvpclmulqdq, -mno-vpclmulqdq 3399 3400.. option:: -mvzeroupper, -mno-vzeroupper 3401 3402.. option:: -mwaitpkg, -mno-waitpkg 3403 3404.. option:: -mwbnoinvd, -mno-wbnoinvd 3405 3406.. option:: -mwidekl, -mno-widekl 3407 3408.. option:: -mx87, -m80387, -mno-x87 3409 3410.. option:: -mxop, -mno-xop 3411 3412.. option:: -mxsave, -mno-xsave 3413 3414.. option:: -mxsavec, -mno-xsavec 3415 3416.. option:: -mxsaveopt, -mno-xsaveopt 3417 3418.. option:: -mxsaves, -mno-xsaves 3419 3420RISCV 3421----- 3422.. option:: -msave-restore, -mno-save-restore 3423 3424Enable using library calls for save and restore 3425 3426Long double flags 3427----------------- 3428Selects the long double implementation 3429 3430.. option:: -mlong-double-128 3431 3432Force long double to be 128 bits 3433 3434.. option:: -mlong-double-64 3435 3436Force long double to be 64 bits 3437 3438.. option:: -mlong-double-80 3439 3440Force long double to be 80 bits, padded to 128 bits for storage 3441 3442Optimization level 3443~~~~~~~~~~~~~~~~~~ 3444 3445Flags controlling how much optimization should be performed. 3446 3447.. option:: -O<arg>, -O (equivalent to -O1), --optimize, --optimize=<arg> 3448 3449.. option:: -Ofast<arg> 3450 3451Debug information generation 3452~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3453 3454Flags controlling how much and what kind of debug information should be 3455generated. 3456 3457Kind and level of debug information 3458----------------------------------- 3459.. option:: -g, --debug, --debug=<arg> 3460 3461Generate source-level debug information 3462 3463.. option:: -gdwarf 3464 3465Generate source-level debug information with the default dwarf version 3466 3467.. option:: -gdwarf-2 3468 3469Generate source-level debug information with dwarf version 2 3470 3471.. option:: -gdwarf-3 3472 3473Generate source-level debug information with dwarf version 3 3474 3475.. option:: -gdwarf-4 3476 3477Generate source-level debug information with dwarf version 4 3478 3479.. option:: -gdwarf-5 3480 3481Generate source-level debug information with dwarf version 5 3482 3483.. option:: -gfull 3484 3485.. option:: -gused 3486 3487Debug level 3488___________ 3489.. option:: -g0 3490 3491.. option:: -g2 3492 3493.. option:: -g3 3494 3495.. option:: -ggdb0 3496 3497.. option:: -ggdb1 3498 3499.. option:: -ggdb2 3500 3501.. option:: -ggdb3 3502 3503.. option:: -gline-directives-only 3504 3505Emit debug line info directives only 3506 3507.. option:: -gline-tables-only, -g1, -gmlt 3508 3509Emit debug line number tables only 3510 3511.. option:: -gmodules 3512 3513Generate debug info with external references to clang modules or precompiled headers 3514 3515Debugger to tune debug information for 3516______________________________________ 3517.. option:: -ggdb 3518 3519.. option:: -glldb 3520 3521.. option:: -gsce 3522 3523Debug information flags 3524----------------------- 3525.. option:: -gcolumn-info, -gno-column-info 3526 3527.. option:: -gdwarf-aranges 3528 3529.. option:: -gembed-source, -gno-embed-source 3530 3531Embed source text in DWARF debug sections 3532 3533.. option:: -ggnu-pubnames, -gno-gnu-pubnames 3534 3535.. option:: -gpubnames, -gno-pubnames 3536 3537.. option:: -grecord-command-line, -gno-record-command-line, -grecord-gcc-switches 3538 3539.. option:: -gsplit-dwarf 3540 3541.. program:: clang1 3542.. option:: -gsplit-dwarf=<arg> 3543.. program:: clang 3544 3545Set DWARF fission mode to either 'split' or 'single' 3546 3547.. option:: -gstrict-dwarf, -gno-strict-dwarf 3548 3549.. option:: -gz=<arg>, -gz (equivalent to -gz=zlib) 3550 3551DWARF debug sections compression type 3552 3553Static analyzer flags 3554===================== 3555 3556Flags controlling the behavior of the Clang Static Analyzer. 3557 3558.. option:: -Xanalyzer <arg> 3559 3560Pass <arg> to the static analyzer 3561 3562Fortran compilation flags 3563========================= 3564 3565Flags that will be passed onto the ``gfortran`` compiler when Clang is given 3566a Fortran input. 3567 3568.. option:: -A<arg>, --assert <arg>, --assert=<arg> 3569 3570.. option:: -A-<arg> 3571 3572.. option:: -J<arg> 3573 3574.. option:: -cpp 3575 3576.. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination 3577 3578.. option:: -falign-commons, -fno-align-commons 3579 3580.. option:: -fall-intrinsics, -fno-all-intrinsics 3581 3582.. option:: -fautomatic, -fno-automatic 3583 3584.. option:: -fbackslash, -fno-backslash 3585 3586.. option:: -fbacktrace, -fno-backtrace 3587 3588.. option:: -fblas-matmul-limit=<arg> 3589 3590.. option:: -fbounds-check, -fno-bounds-check 3591 3592.. option:: -fcheck-array-temporaries, -fno-check-array-temporaries 3593 3594.. option:: -fcheck=<arg> 3595 3596.. option:: -fcoarray=<arg> 3597 3598.. option:: -fconvert=<arg> 3599 3600.. option:: -fcray-pointer, -fno-cray-pointer 3601 3602.. option:: -fd-lines-as-code, -fno-d-lines-as-code 3603 3604.. option:: -fd-lines-as-comments, -fno-d-lines-as-comments 3605 3606.. option:: -fdefault-double-8, -fno-default-double-8 3607 3608.. option:: -fdefault-integer-8, -fno-default-integer-8 3609 3610.. option:: -fdefault-real-8, -fno-default-real-8 3611 3612.. option:: -fdollar-ok, -fno-dollar-ok 3613 3614.. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized 3615 3616.. option:: -fdump-fortran-original, -fno-dump-fortran-original 3617 3618.. option:: -fdump-parse-tree, -fno-dump-parse-tree 3619 3620.. option:: -fexternal-blas, -fno-external-blas 3621 3622.. option:: -ff2c, -fno-f2c 3623 3624.. option:: -ffixed-form, -fno-fixed-form 3625 3626.. option:: -ffixed-line-length-<arg> 3627 3628.. option:: -ffpe-trap=<arg> 3629 3630.. option:: -ffree-form, -fno-free-form 3631 3632.. option:: -ffree-line-length-<arg> 3633 3634.. option:: -ffrontend-optimize, -fno-frontend-optimize 3635 3636.. option:: -fimplicit-none, -fno-implicit-none 3637 3638.. option:: -finit-character=<arg> 3639 3640.. option:: -finit-integer=<arg> 3641 3642.. option:: -finit-local-zero, -fno-init-local-zero 3643 3644.. option:: -finit-logical=<arg> 3645 3646.. option:: -finit-real=<arg> 3647 3648.. option:: -finteger-4-integer-8, -fno-integer-4-integer-8 3649 3650.. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path 3651 3652.. option:: -fmax-array-constructor=<arg> 3653 3654.. option:: -fmax-errors=<arg> 3655 3656.. option:: -fmax-identifier-length, -fno-max-identifier-length 3657 3658.. option:: -fmax-stack-var-size=<arg> 3659 3660.. option:: -fmax-subrecord-length=<arg> 3661 3662.. option:: -fmodule-private, -fno-module-private 3663 3664.. option:: -fpack-derived, -fno-pack-derived 3665 3666.. option:: -fprotect-parens, -fno-protect-parens 3667 3668.. option:: -frange-check, -fno-range-check 3669 3670.. option:: -freal-4-real-10, -fno-real-4-real-10 3671 3672.. option:: -freal-4-real-16, -fno-real-4-real-16 3673 3674.. option:: -freal-4-real-8, -fno-real-4-real-8 3675 3676.. option:: -freal-8-real-10, -fno-real-8-real-10 3677 3678.. option:: -freal-8-real-16, -fno-real-8-real-16 3679 3680.. option:: -freal-8-real-4, -fno-real-8-real-4 3681 3682.. option:: -frealloc-lhs, -fno-realloc-lhs 3683 3684.. option:: -frecord-marker=<arg> 3685 3686.. option:: -frecursive, -fno-recursive 3687 3688.. option:: -frepack-arrays, -fno-repack-arrays 3689 3690.. option:: -fsecond-underscore, -fno-second-underscore 3691 3692.. option:: -fsign-zero, -fno-sign-zero 3693 3694.. option:: -fstack-arrays, -fno-stack-arrays 3695 3696.. option:: -funderscoring, -fno-underscoring 3697 3698.. option:: -fwhole-file, -fno-whole-file 3699 3700.. option:: -imultilib <arg> 3701 3702.. option:: -nocpp 3703 3704.. option:: -static-libgfortran 3705 3706Linker flags 3707============ 3708Flags that are passed on to the linker 3709 3710.. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg> 3711 3712Add directory to library search path 3713 3714.. option:: -Mach 3715 3716.. option:: -T<script> 3717 3718Specify <script> as linker script 3719 3720.. option:: -Tbss<addr> 3721 3722Set starting address of BSS to <addr> 3723 3724.. option:: -Tdata<addr> 3725 3726Set starting address of DATA to <addr> 3727 3728.. option:: -Ttext<addr> 3729 3730Set starting address of TEXT to <addr> 3731 3732.. option:: -Wl,<arg>,<arg2>... 3733 3734Pass the comma separated arguments in <arg> to the linker 3735 3736.. option:: -X 3737 3738.. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg> 3739 3740Pass <arg> to the linker 3741 3742.. program:: clang1 3743.. option:: -Z 3744.. program:: clang 3745 3746.. option:: -coverage, --coverage 3747 3748.. option:: -e<arg>, --entry 3749 3750.. option:: -filelist <arg> 3751 3752.. option:: --hip-device-lib=<arg> 3753 3754HIP device library 3755 3756.. option:: -l<arg> 3757 3758.. option:: --ld-path=<arg> 3759 3760.. option:: -nostartfiles 3761 3762.. program:: clang1 3763.. option:: -nostdlib, --no-standard-libraries 3764.. program:: clang 3765 3766.. option:: -pie 3767 3768.. option:: -r 3769 3770.. option:: -rdynamic 3771 3772.. option:: --rocm-device-lib-path=<arg>, --hip-device-lib-path=<arg> 3773 3774ROCm device library path. Alternative to rocm-path. 3775 3776.. option:: -rpath <arg> 3777 3778.. option:: -s 3779 3780.. option:: -shared, --shared 3781 3782.. option:: -specs=<arg>, --specs=<arg> 3783 3784.. option:: -static, --static 3785 3786.. option:: -static-pie 3787 3788.. option:: -t 3789 3790.. option:: -u<arg>, --force-link <arg>, --force-link=<arg> 3791 3792.. option:: -undef 3793 3794undef all system defines 3795 3796.. option:: -undefined<arg>, --no-undefined 3797 3798.. option:: -z <arg> 3799 3800Pass -z <arg> to the linker 3801 3802