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