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