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