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