ClangCommandLineReference.rst 72 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116
  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. Clang command line argument reference
  8. =====================================
  9. .. contents::
  10. :local:
  11. Introduction
  12. ============
  13. This page lists the command line arguments currently supported by the
  14. GCC-compatible ``clang`` and ``clang++`` drivers.
  15. .. program:: clang
  16. .. option:: -B<dir>, --prefix <arg>, --prefix=<arg>
  17. Add <dir> to search path for binaries and object files used implicitly
  18. .. option:: -F<arg>
  19. Add directory to framework include search path
  20. .. option:: -ObjC
  21. Treat source input files as Objective-C inputs
  22. .. program:: clang1
  23. .. option:: -ObjC++
  24. .. program:: clang
  25. Treat source input files as Objective-C++ inputs
  26. .. option:: -Qn, -fno-ident
  27. Do not emit metadata containing compiler name and version
  28. .. option:: -Qunused-arguments
  29. Don't emit warning for unused driver arguments
  30. .. option:: -Qy, -fident
  31. Emit metadata containing compiler name and version
  32. .. option:: -Wa,<arg>,<arg2>...
  33. Pass the comma separated arguments in <arg> to the assembler
  34. .. option:: -Wlarge-by-value-copy=<arg>
  35. .. option:: -Xarch\_<arg1> <arg2>
  36. .. option:: -Xcuda-fatbinary <arg>
  37. Pass <arg> to fatbinary invocation
  38. .. option:: -Xcuda-ptxas <arg>
  39. Pass <arg> to the ptxas assembler
  40. .. option:: -Xopenmp-target <arg>
  41. Pass <arg> to the target offloading toolchain.
  42. .. program:: clang1
  43. .. option:: -Xopenmp-target=<triple> <arg>
  44. .. program:: clang
  45. Pass <arg> to the target offloading toolchain identified by <triple>.
  46. .. option:: -Z<arg>
  47. .. option:: -a<arg>, --profile-blocks
  48. .. option:: -all\_load
  49. .. option:: -allowable\_client <arg>
  50. .. option:: --analyze
  51. Run the static analyzer
  52. .. option:: --analyzer-no-default-checks
  53. .. option:: --analyzer-output<arg>
  54. Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|text).
  55. .. option:: -ansi, --ansi
  56. .. option:: -arch <arg>
  57. .. program:: clang1
  58. .. option:: -arch\_errors\_fatal
  59. .. program:: clang
  60. .. program:: clang2
  61. .. option:: -arch\_only <arg>
  62. .. program:: clang
  63. .. option:: -arcmt-migrate-emit-errors
  64. Emit ARC errors even if the migrator can fix them
  65. .. option:: -arcmt-migrate-report-output <arg>
  66. Output path for the plist report
  67. .. option:: --autocomplete=<arg>
  68. .. option:: -bind\_at\_load
  69. .. option:: -bundle
  70. .. program:: clang1
  71. .. option:: -bundle\_loader <arg>
  72. .. program:: clang
  73. .. option:: -cfguard
  74. Emit tables required for Windows Control Flow Guard.
  75. .. option:: -client\_name<arg>
  76. .. option:: -compatibility\_version<arg>
  77. .. option:: --config <arg>
  78. Specifies configuration file
  79. .. option:: --constant-cfstrings
  80. .. option:: -coverage, --coverage
  81. .. option:: --cuda-compile-host-device
  82. Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.
  83. .. option:: --cuda-device-only
  84. Compile CUDA code for device only
  85. .. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg>
  86. CUDA GPU architecture (e.g. sm\_35). May be specified more than once.
  87. .. option:: --cuda-host-only
  88. Compile CUDA code for host only. Has no effect on non-CUDA compilations.
  89. .. option:: --cuda-include-ptx=<arg>, --no-cuda-include-ptx=<arg>
  90. Include PTX for the following GPU architecture (e.g. sm\_35) or 'all'. May be specified more than once.
  91. .. option:: --cuda-noopt-device-debug, --no-cuda-noopt-device-debug
  92. Enable device-side debug info generation. Disables ptxas optimizations.
  93. .. option:: -current\_version<arg>
  94. .. option:: -dead\_strip
  95. .. option:: -dependency-dot <arg>
  96. Filename to write DOT-formatted header dependencies to
  97. .. option:: -dependency-file <arg>
  98. Filename (or -) to write dependency output to
  99. .. option:: -dumpmachine
  100. .. option:: -dumpversion
  101. .. option:: --dyld-prefix=<arg>, --dyld-prefix <arg>
  102. .. option:: -dylib\_file <arg>
  103. .. option:: -dylinker
  104. .. program:: clang1
  105. .. option:: -dylinker\_install\_name<arg>
  106. .. program:: clang
  107. .. option:: -dynamic
  108. .. option:: -dynamiclib
  109. .. option:: -emit-ast
  110. Emit Clang AST files for source inputs
  111. .. option:: -exported\_symbols\_list <arg>
  112. .. option:: -faligned-new=<arg>
  113. .. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
  114. Use approximate transcendental functions
  115. .. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
  116. Flush denormal floating point values to zero in CUDA device mode.
  117. .. option:: -fcuda-rdc, -fno-cuda-rdc
  118. Generate relocatable device code, also known as separate compilation mode.
  119. .. option:: -fcuda-short-ptr, -fno-cuda-short-ptr
  120. Use 32-bit pointers for accessing const/local/shared address spaces.
  121. .. option:: -ffixed-r19
  122. Reserve register r19 (Hexagon only)
  123. .. option:: -fheinous-gnu-extensions
  124. .. option:: -flat\_namespace
  125. .. option:: -fopenmp-targets=<arg1>,<arg2>...
  126. Specify comma-separated list of triples OpenMP offloading targets to be supported
  127. .. option:: -force\_cpusubtype\_ALL
  128. .. program:: clang1
  129. .. option:: -force\_flat\_namespace
  130. .. program:: clang
  131. .. program:: clang2
  132. .. option:: -force\_load <arg>
  133. .. program:: clang
  134. .. option:: -framework <arg>
  135. .. option:: -frtlib-add-rpath, -fno-rtlib-add-rpath
  136. Add -rpath with architecture-specific resource directory to the linker flags
  137. .. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
  138. Use the gcc toolchain at the given directory
  139. .. option:: -gcodeview
  140. Generate CodeView debug information
  141. .. option:: -headerpad\_max\_install\_names<arg>
  142. .. option:: -help, --help
  143. Display available options
  144. .. option:: --help-hidden
  145. Display help for hidden options
  146. .. option:: --hip-link
  147. Link clang-offload-bundler bundles for HIP
  148. .. option:: -image\_base <arg>
  149. .. option:: -index-header-map
  150. Make the next included directory (-I or -F) an indexer header map
  151. .. option:: -init <arg>
  152. .. option:: -install\_name <arg>
  153. .. option:: -keep\_private\_externs
  154. .. option:: -lazy\_framework <arg>
  155. .. program:: clang1
  156. .. option:: -lazy\_library <arg>
  157. .. program:: clang
  158. .. option:: -mbig-endian, -EB
  159. .. option:: --migrate
  160. Run the migrator
  161. .. option:: -mios-simulator-version-min=<arg>, -miphonesimulator-version-min=<arg>
  162. .. option:: -mlinker-version=<arg>
  163. .. option:: -mlittle-endian, -EL
  164. .. option:: -mllvm <arg>
  165. Additional arguments to forward to LLVM's option processing
  166. .. option:: -module-dependency-dir <arg>
  167. Directory to dump module dependencies to
  168. .. option:: -mtvos-simulator-version-min=<arg>, -mappletvsimulator-version-min=<arg>
  169. .. option:: -multi\_module
  170. .. option:: -multiply\_defined <arg>
  171. .. program:: clang1
  172. .. option:: -multiply\_defined\_unused <arg>
  173. .. program:: clang
  174. .. option:: -mwatchos-simulator-version-min=<arg>, -mwatchsimulator-version-min=<arg>
  175. .. option:: --no-cuda-version-check
  176. Don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture.
  177. .. option:: -no-integrated-cpp, --no-integrated-cpp
  178. .. option:: -no\_dead\_strip\_inits\_and\_terms
  179. .. option:: -nobuiltininc
  180. Disable builtin #include directories
  181. .. option:: -nocudainc
  182. .. option:: -nocudalib
  183. .. option:: -nodefaultlibs
  184. .. option:: -nofixprebinding
  185. .. option:: -nolibc
  186. .. option:: -nomultidefs
  187. .. option:: -nopie, -no-pie
  188. .. option:: -noprebind
  189. .. option:: -noprofilelib
  190. .. option:: -noseglinkedit
  191. .. option:: -nostartfiles
  192. .. option:: -nostdinc, --no-standard-includes
  193. .. program:: clang1
  194. .. option:: -nostdinc++
  195. .. program:: clang
  196. Disable standard #include directories for the C++ standard library
  197. .. option:: -nostdlib, --no-standard-libraries
  198. .. program:: clang1
  199. .. option:: -nostdlib++
  200. .. program:: clang
  201. .. option:: -nostdlibinc
  202. .. option:: -o<file>, --output <arg>, --output=<arg>
  203. Write output to <file>
  204. .. option:: -objcmt-atomic-property
  205. Make migration to 'atomic' properties
  206. .. option:: -objcmt-migrate-all
  207. Enable migration to modern ObjC
  208. .. option:: -objcmt-migrate-annotation
  209. Enable migration to property and method annotations
  210. .. option:: -objcmt-migrate-designated-init
  211. Enable migration to infer NS\_DESIGNATED\_INITIALIZER for initializer methods
  212. .. option:: -objcmt-migrate-instancetype
  213. Enable migration to infer instancetype for method result type
  214. .. option:: -objcmt-migrate-literals
  215. Enable migration to modern ObjC literals
  216. .. option:: -objcmt-migrate-ns-macros
  217. Enable migration to NS\_ENUM/NS\_OPTIONS macros
  218. .. option:: -objcmt-migrate-property
  219. Enable migration to modern ObjC property
  220. .. option:: -objcmt-migrate-property-dot-syntax
  221. Enable migration of setter/getter messages to property-dot syntax
  222. .. option:: -objcmt-migrate-protocol-conformance
  223. Enable migration to add protocol conformance on classes
  224. .. option:: -objcmt-migrate-readonly-property
  225. Enable migration to modern ObjC readonly property
  226. .. option:: -objcmt-migrate-readwrite-property
  227. Enable migration to modern ObjC readwrite property
  228. .. option:: -objcmt-migrate-subscripting
  229. Enable migration to modern ObjC subscripting
  230. .. option:: -objcmt-ns-nonatomic-iosonly
  231. Enable migration to use NS\_NONATOMIC\_IOSONLY macro for setting property's 'atomic' attribute
  232. .. option:: -objcmt-returns-innerpointer-property
  233. Enable migration to annotate property with NS\_RETURNS\_INNER\_POINTER
  234. .. option:: -objcmt-whitelist-dir-path=<arg>, -objcmt-white-list-dir-path=<arg>
  235. Only modify files with a filename contained in the provided directory path
  236. .. option:: -object
  237. .. option:: -p, --profile
  238. .. option:: -pagezero\_size<arg>
  239. .. option:: -pg
  240. Enable mcount instrumentation
  241. .. option:: -pie
  242. .. option:: -pipe, --pipe
  243. Use pipes between commands, when possible
  244. .. option:: -prebind
  245. .. program:: clang1
  246. .. option:: -prebind\_all\_twolevel\_modules
  247. .. program:: clang
  248. .. option:: -preload
  249. .. option:: --print-diagnostic-categories
  250. .. option:: -print-effective-triple, --print-effective-triple
  251. Print the effective target triple
  252. .. option:: -print-file-name=<file>, --print-file-name=<file>, --print-file-name <arg>
  253. Print the full library path of <file>
  254. .. option:: -print-ivar-layout
  255. Enable Objective-C Ivar layout bitmap print trace
  256. .. option:: -print-libgcc-file-name, --print-libgcc-file-name
  257. Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang\_rt.builtins.\*.a")
  258. .. option:: -print-multi-directory, --print-multi-directory
  259. .. option:: -print-multi-lib, --print-multi-lib
  260. .. option:: -print-prog-name=<name>, --print-prog-name=<name>, --print-prog-name <arg>
  261. Print the full program path of <name>
  262. .. option:: -print-resource-dir, --print-resource-dir
  263. Print the resource directory pathname
  264. .. option:: -print-search-dirs, --print-search-dirs
  265. Print the paths used for finding libraries and programs
  266. .. option:: -print-target-triple, --print-target-triple
  267. Print the normalized target triple
  268. .. option:: -private\_bundle
  269. .. option:: -pthread, -no-pthread
  270. Support POSIX threads in generated code
  271. .. option:: -pthreads
  272. .. option:: -rdynamic
  273. .. option:: -read\_only\_relocs <arg>
  274. .. option:: -relocatable-pch, --relocatable-pch
  275. Whether to build a relocatable precompiled header
  276. .. option:: -remap
  277. .. option:: -rewrite-legacy-objc
  278. Rewrite Legacy Objective-C source to C++
  279. .. option:: -rtlib=<arg>, --rtlib=<arg>, --rtlib <arg>
  280. Compiler runtime library to use
  281. .. option:: -save-stats=<arg>, --save-stats=<arg>, -save-stats (equivalent to -save-stats=cwd), --save-stats (equivalent to -save-stats=cwd)
  282. Save llvm statistics.
  283. .. option:: -save-temps=<arg>, --save-temps=<arg>, -save-temps (equivalent to -save-temps=cwd), --save-temps (equivalent to -save-temps=cwd)
  284. Save intermediate compilation results.
  285. .. option:: -sectalign <arg1> <arg2> <arg3>
  286. .. option:: -sectcreate <arg1> <arg2> <arg3>
  287. .. option:: -sectobjectsymbols <arg1> <arg2>
  288. .. option:: -sectorder <arg1> <arg2> <arg3>
  289. .. option:: -seg1addr<arg>
  290. .. option:: -seg\_addr\_table <arg>
  291. .. program:: clang1
  292. .. option:: -seg\_addr\_table\_filename <arg>
  293. .. program:: clang
  294. .. option:: -segaddr <arg1> <arg2>
  295. .. option:: -segcreate <arg1> <arg2> <arg3>
  296. .. option:: -seglinkedit
  297. .. option:: -segprot <arg1> <arg2> <arg3>
  298. .. option:: -segs\_read\_<arg>
  299. .. program:: clang1
  300. .. option:: -segs\_read\_only\_addr <arg>
  301. .. program:: clang
  302. .. program:: clang2
  303. .. option:: -segs\_read\_write\_addr <arg>
  304. .. program:: clang
  305. .. option:: -serialize-diagnostics <arg>, --serialize-diagnostics <arg>
  306. Serialize compiler diagnostics to a file
  307. .. option:: -shared, --shared
  308. .. option:: -shared-libgcc
  309. .. option:: -shared-libsan, -shared-libasan
  310. Dynamically link the sanitizer runtime
  311. .. option:: -single\_module
  312. .. option:: -specs=<arg>, --specs=<arg>
  313. .. option:: -static, --static
  314. .. option:: -static-libgcc
  315. .. option:: -static-libsan
  316. Statically link the sanitizer runtime
  317. .. option:: -static-libstdc++
  318. .. option:: -std-default=<arg>
  319. .. option:: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
  320. C++ standard library to use
  321. .. option:: -sub\_library<arg>
  322. .. program:: clang1
  323. .. option:: -sub\_umbrella<arg>
  324. .. program:: clang
  325. .. option:: --sysroot=<arg>, --sysroot <arg>
  326. .. option:: --target-help
  327. .. option:: --target=<arg>, -target <arg>
  328. Generate code for the given target
  329. .. option:: --print-supported-cpus
  330. Print supported cpu models for the given target
  331. .. option:: -time
  332. Time individual commands
  333. .. option:: -traditional, --traditional
  334. .. option:: -traditional-cpp, --traditional-cpp
  335. Enable some traditional CPP emulation
  336. .. option:: -twolevel\_namespace
  337. .. program:: clang1
  338. .. option:: -twolevel\_namespace\_hints
  339. .. program:: clang
  340. .. option:: -umbrella <arg>
  341. .. option:: -unexported\_symbols\_list <arg>
  342. .. option:: -v, --verbose
  343. Show commands to run and use verbose output
  344. .. option:: --verify-debug-info
  345. Verify the binary representation of debug output
  346. .. option:: --version
  347. Print version information
  348. .. option:: -w, --no-warnings
  349. Suppress all warnings
  350. .. option:: -weak-l<arg>
  351. .. option:: -weak\_framework <arg>
  352. .. program:: clang1
  353. .. option:: -weak\_library <arg>
  354. .. program:: clang
  355. .. program:: clang2
  356. .. option:: -weak\_reference\_mismatches <arg>
  357. .. program:: clang
  358. .. option:: -whatsloaded
  359. .. option:: -whyload
  360. .. option:: -working-directory<arg>, -working-directory=<arg>
  361. Resolve file paths relative to the specified directory
  362. .. option:: -x<language>, --language <arg>, --language=<arg>
  363. Treat subsequent input files as having type <language>
  364. .. option:: -y<arg>
  365. Actions
  366. =======
  367. The action to perform on the input.
  368. .. option:: -E, --preprocess
  369. Only run the preprocessor
  370. .. option:: -S, --assemble
  371. Only run preprocess and compilation steps
  372. .. option:: -c, --compile
  373. Only run preprocess, compile, and assemble steps
  374. .. option:: -emit-llvm
  375. Use the LLVM representation for assembler and object files
  376. .. option:: -fsyntax-only
  377. .. option:: -module-file-info
  378. Provide information about a particular module file
  379. .. option:: --precompile
  380. Only precompile the input
  381. .. option:: -rewrite-objc
  382. Rewrite Objective-C source to C++
  383. .. option:: -verify-pch
  384. Load and verify that a pre-compiled header file is not stale
  385. Compilation flags
  386. =================
  387. Flags controlling the behavior of Clang during compilation. These flags have
  388. no effect during actions that do not perform compilation.
  389. .. option:: -Xassembler <arg>
  390. Pass <arg> to the assembler
  391. .. option:: -Xclang <arg>
  392. Pass <arg> to the clang compiler
  393. .. option:: -fclang-abi-compat=<version>
  394. Attempt to match the ABI of Clang <version>
  395. .. option:: -fcomment-block-commands=<arg>,<arg2>...
  396. Treat each comma separated argument in <arg> as a documentation comment block command
  397. .. option:: -fcomplete-member-pointers, -fno-complete-member-pointers
  398. Require member pointer base types to be complete if they would be significant under the Microsoft ABI
  399. .. option:: -fcrash-diagnostics-dir=<arg>
  400. .. option:: -fdeclspec, -fno-declspec
  401. Allow \_\_declspec as a keyword
  402. .. option:: -fdepfile-entry=<arg>
  403. .. option:: -fdiagnostics-fixit-info, -fno-diagnostics-fixit-info
  404. .. option:: -fdiagnostics-format=<arg>
  405. .. option:: -fdiagnostics-parseable-fixits
  406. Print fix-its in machine parseable form
  407. .. option:: -fdiagnostics-print-source-range-info
  408. Print source range spans in numeric form
  409. .. option:: -fdiagnostics-show-category=<arg>
  410. .. option:: -fdiscard-value-names, -fno-discard-value-names
  411. Discard value names in LLVM IR
  412. .. option:: -fexperimental-isel, -fno-experimental-isel
  413. Enables the experimental global instruction selector
  414. .. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
  415. Enables an experimental new pass manager in LLVM.
  416. .. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses
  417. Use separate accesses for consecutive bitfield runs with legal widths and alignments.
  418. .. option:: -finline-functions, -fno-inline-functions
  419. Inline suitable functions
  420. .. option:: -finline-hint-functions
  421. Inline functions which are (explicitly or implicitly) marked inline
  422. .. option:: -fno-crash-diagnostics
  423. Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash
  424. .. option:: -fno-sanitize-blacklist
  425. Don't use blacklist file for sanitizers
  426. .. option:: -fparse-all-comments
  427. .. option:: -frecord-command-line, -frecord-gcc-switches, -fno-record-command-line, -fno-record-gcc-switches
  428. Generate a section named ".GCC.command.line" containing the clang driver
  429. command-line. After linking, the section may contain multiple command lines,
  430. which will be individually terminated by null bytes. Separate arguments within
  431. a command line are combined with spaces; spaces and backslashes within an
  432. argument are escaped with backslashes. This format differs from the format of
  433. the equivalent section produced by GCC with the -frecord-gcc-switches flag.
  434. This option is currently only supported on ELF targets.
  435. .. option:: -fsanitize-address-field-padding=<arg>
  436. Level of field padding for AddressSanitizer
  437. .. option:: -fsanitize-address-globals-dead-stripping
  438. Enable linker dead stripping of globals in AddressSanitizer
  439. .. option:: -fsanitize-address-use-odr-indicator, -fno-sanitize-address-use-odr-indicator
  440. Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized programs at the cost of an increase in binary size
  441. .. option:: -fsanitize-address-poison-custom-array-cookie, -fno-sanitize-address-poison-custom-array-cookie
  442. Enable "poisoning" array cookies when allocating arrays with a custom operator new\[\] in Address Sanitizer, preventing accesses to the cookies from user code. An array cookie is a small implementation-defined header added to certain array allocations to record metadata such as the length of the array. Accesses to array cookies from user code are technically allowed by the standard but are more likely to be the result of an out-of-bounds array access.
  443. An operator new\[\] is "custom" if it is not one of the allocation functions provided by the C++ standard library. Array cookies from non-custom allocation functions are always poisoned.
  444. .. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
  445. Enable use-after-scope detection in AddressSanitizer
  446. .. option:: -fsanitize-blacklist=<arg>
  447. Path to blacklist file for sanitizers
  448. .. option:: -fsanitize-cfi-cross-dso, -fno-sanitize-cfi-cross-dso
  449. Enable control flow integrity (CFI) checks for cross-DSO calls.
  450. .. option:: -fsanitize-cfi-icall-generalize-pointers
  451. Generalize pointers in CFI indirect call type signature checks
  452. .. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
  453. Specify the type of coverage instrumentation for Sanitizers
  454. .. option:: -fsanitize-link-c++-runtime
  455. .. option:: -fsanitize-memory-track-origins, -fno-sanitize-memory-track-origins
  456. Enable origins tracking in MemorySanitizer
  457. .. program:: clang1
  458. .. option:: -fsanitize-memory-track-origins=<arg>
  459. .. program:: clang
  460. Enable origins tracking in MemorySanitizer
  461. .. option:: -fsanitize-memory-use-after-dtor, -fno-sanitize-memory-use-after-dtor
  462. Enable use-after-destroy detection in MemorySanitizer
  463. .. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime
  464. .. option:: -fsanitize-recover, -fno-sanitize-recover
  465. .. program:: clang1
  466. .. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
  467. .. program:: clang
  468. Enable recovery for specified sanitizers
  469. .. option:: -fsanitize-stats, -fno-sanitize-stats
  470. Enable sanitizer statistics gathering.
  471. .. option:: -fsanitize-thread-atomics, -fno-sanitize-thread-atomics
  472. Enable atomic operations instrumentation in ThreadSanitizer (default)
  473. .. option:: -fsanitize-thread-func-entry-exit, -fno-sanitize-thread-func-entry-exit
  474. Enable function entry/exit instrumentation in ThreadSanitizer (default)
  475. .. option:: -fsanitize-thread-memory-access, -fno-sanitize-thread-memory-access
  476. Enable memory access instrumentation in ThreadSanitizer (default)
  477. .. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
  478. Enable trapping for specified sanitizers
  479. .. option:: -fsanitize-undefined-strip-path-components=<number>
  480. Strip (or keep only, if negative) a given number of path components when emitting check metadata.
  481. .. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
  482. .. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
  483. Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
  484. .. option:: -moutline, -mno-outline
  485. Enable function outlining (AArch64 only)
  486. .. option:: --param <arg>, --param=<arg>
  487. .. option:: -std=<arg>, --std=<arg>, --std <arg>
  488. Language standard to compile for
  489. Preprocessor flags
  490. ~~~~~~~~~~~~~~~~~~
  491. Flags controlling the behavior of the Clang preprocessor.
  492. .. option:: -C, --comments
  493. Include comments in preprocessed output
  494. .. option:: -CC, --comments-in-macros
  495. Include comments from within macros in preprocessed output
  496. .. option:: -D<macro>=<value>, --define-macro <arg>, --define-macro=<arg>
  497. Define <macro> to <value> (or 1 if <value> omitted)
  498. .. option:: -H, --trace-includes
  499. Show header includes and nesting depth
  500. .. option:: -P, --no-line-commands
  501. Disable linemarker output in -E mode
  502. .. option:: -U<macro>, --undefine-macro <arg>, --undefine-macro=<arg>
  503. Undefine macro <macro>
  504. .. option:: -Wp,<arg>,<arg2>...
  505. Pass the comma separated arguments in <arg> to the preprocessor
  506. .. option:: -Xpreprocessor <arg>
  507. Pass <arg> to the preprocessor
  508. Include path management
  509. -----------------------
  510. Flags controlling how ``#include``\s are resolved to files.
  511. .. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
  512. Add directory to include search path
  513. .. option:: -I-, --include-barrier
  514. Restrict all prior -I flags to double-quoted inclusion and remove current directory from include path
  515. .. option:: --cuda-path-ignore-env
  516. Ignore environment variables to detect CUDA installation
  517. .. option:: --cuda-path=<arg>
  518. CUDA installation path
  519. .. option:: -cxx-isystem<directory>
  520. Add directory to the C++ SYSTEM include search path
  521. .. option:: -fbuild-session-file=<file>
  522. Use the last modification time of <file> as the build session timestamp
  523. .. option:: -fbuild-session-timestamp=<time since Epoch in seconds>
  524. Time when the current build session started
  525. .. option:: -fmodule-file=\[<name>=\]<file>
  526. Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.
  527. .. option:: -fmodules-cache-path=<directory>
  528. Specify the module cache path
  529. .. option:: -fmodules-disable-diagnostic-validation
  530. Disable validation of the diagnostic options when loading the module
  531. .. option:: -fmodules-prune-after=<seconds>
  532. Specify the interval (in seconds) after which a module file will be considered unused
  533. .. option:: -fmodules-prune-interval=<seconds>
  534. Specify the interval (in seconds) between attempts to prune the module cache
  535. .. option:: -fmodules-user-build-path <directory>
  536. Specify the module user build path
  537. .. option:: -fmodules-validate-once-per-build-session
  538. Don't verify input files for the modules if the module has been successfully validated or loaded during this build session
  539. .. option:: -fmodules-validate-system-headers, -fno-modules-validate-system-headers
  540. Validate the system headers that a module depends on when loading the module
  541. .. option:: -fprebuilt-module-path=<directory>
  542. Specify the prebuilt module path
  543. .. option:: -idirafter<arg>, --include-directory-after <arg>, --include-directory-after=<arg>
  544. Add directory to AFTER include search path
  545. .. option:: -iframework<arg>
  546. Add directory to SYSTEM framework search path
  547. .. option:: -iframeworkwithsysroot<directory>
  548. Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
  549. .. option:: -imacros<file>, --imacros<file>, --imacros=<arg>
  550. Include macros from file before parsing
  551. .. option:: -include<file>, --include<file>, --include=<arg>
  552. Include file before parsing
  553. .. option:: -include-pch <file>
  554. Include precompiled header file
  555. .. option:: -iprefix<dir>, --include-prefix <arg>, --include-prefix=<arg>
  556. Set the -iwithprefix/-iwithprefixbefore prefix
  557. .. option:: -iquote<directory>
  558. Add directory to QUOTE include search path
  559. .. option:: -isysroot<dir>
  560. Set the system root directory (usually /)
  561. .. option:: -isystem<directory>
  562. Add directory to SYSTEM include search path
  563. .. option:: -isystem-after<directory>
  564. Add directory to end of the SYSTEM include search path
  565. .. option:: -ivfsoverlay<arg>
  566. Overlay the virtual filesystem described by file over the real file system
  567. .. option:: -iwithprefix<dir>, --include-with-prefix <arg>, --include-with-prefix-after <arg>, --include-with-prefix-after=<arg>, --include-with-prefix=<arg>
  568. Set directory to SYSTEM include search path with prefix
  569. .. option:: -iwithprefixbefore<dir>, --include-with-prefix-before <arg>, --include-with-prefix-before=<arg>
  570. Set directory to include search path with prefix
  571. .. option:: -iwithsysroot<directory>
  572. Add directory to SYSTEM include search path, absolute paths are relative to -isysroot
  573. .. option:: --ptxas-path=<arg>
  574. Path to ptxas (used for compiling CUDA code)
  575. .. option:: --system-header-prefix=<prefix>, --no-system-header-prefix=<prefix>, --system-header-prefix <arg>
  576. Treat all #include paths starting with <prefix> as including a system header.
  577. Dependency file generation
  578. --------------------------
  579. Flags controlling generation of a dependency file for ``make``-like build
  580. systems.
  581. .. option:: -M, --dependencies
  582. Like -MD, but also implies -E and writes to stdout by default
  583. .. option:: -MD, --write-dependencies
  584. Write a depfile containing user and system headers
  585. .. option:: -MF<file>
  586. Write depfile output from -MMD, -MD, -MM, or -M to <file>
  587. .. option:: -MG, --print-missing-file-dependencies
  588. Add missing headers to depfile
  589. .. option:: -MJ<arg>
  590. Write a compilation database entry per input
  591. .. option:: -MM, --user-dependencies
  592. Like -MMD, but also implies -E and writes to stdout by default
  593. .. option:: -MMD, --write-user-dependencies
  594. Write a depfile containing user headers
  595. .. option:: -MP
  596. Create phony target for each dependency (other than main file)
  597. .. option:: -MQ<arg>
  598. Specify name of main file output to quote in depfile
  599. .. option:: -MT<arg>
  600. Specify name of main file output in depfile
  601. .. option:: -MV
  602. Use NMake/Jom format for the depfile
  603. Dumping preprocessor state
  604. --------------------------
  605. Flags allowing the state of the preprocessor to be dumped in various ways.
  606. .. option:: -d
  607. .. program:: clang1
  608. .. option:: -d<arg>
  609. .. program:: clang
  610. .. option:: -dD
  611. Print macro definitions in -E mode in addition to normal output
  612. .. option:: -dI
  613. Print include directives in -E mode in addition to normal output
  614. .. option:: -dM
  615. Print macro definitions in -E mode instead of normal output
  616. Diagnostic flags
  617. ~~~~~~~~~~~~~~~~
  618. Flags controlling which warnings, errors, and remarks Clang will generate.
  619. See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.
  620. .. option:: -R<remark>
  621. Enable the specified remark
  622. .. option:: -Rpass-analysis=<arg>
  623. Report transformation analysis from optimization passes whose name matches the given POSIX regular expression
  624. .. option:: -Rpass-missed=<arg>
  625. Report missed transformations by optimization passes whose name matches the given POSIX regular expression
  626. .. option:: -Rpass=<arg>
  627. Report transformations performed by optimization passes whose name matches the given POSIX regular expression
  628. .. option:: -W<warning>, --extra-warnings, --warn-<arg>, --warn-=<arg>
  629. Enable the specified warning
  630. .. option:: -Wdeprecated, -Wno-deprecated
  631. Enable warnings for deprecated constructs and define \_\_DEPRECATED
  632. .. option:: -Wnonportable-cfstrings<arg>, -Wno-nonportable-cfstrings<arg>
  633. Target-independent compilation options
  634. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  635. .. option:: -Wframe-larger-than=<arg>
  636. .. option:: -fPIC, -fno-PIC
  637. .. option:: -fPIE, -fno-PIE
  638. .. option:: -faccess-control, -fno-access-control
  639. .. option:: -faddrsig, -fno-addrsig
  640. Emit an address-significance table
  641. .. option:: -falign-functions, -fno-align-functions
  642. .. program:: clang1
  643. .. option:: -falign-functions=<arg>
  644. .. program:: clang
  645. .. program:: clang1
  646. .. option:: -faligned-allocation, -faligned-new, -fno-aligned-allocation
  647. .. program:: clang
  648. Enable C++17 aligned allocation functions
  649. .. option:: -fallow-editor-placeholders, -fno-allow-editor-placeholders
  650. Treat editor placeholders as valid source code
  651. .. option:: -fallow-unsupported
  652. .. option:: -faltivec, -fno-altivec
  653. .. option:: -fansi-escape-codes
  654. Use ANSI escape codes for diagnostics
  655. .. option:: -fapple-kext, -findirect-virtual-calls, -fterminated-vtables
  656. Use Apple's kernel extensions ABI
  657. .. option:: -fapple-pragma-pack, -fno-apple-pragma-pack
  658. Enable Apple gcc-compatible #pragma pack handling
  659. .. option:: -fapplication-extension, -fno-application-extension
  660. Restrict code to those available for App Extensions
  661. .. option:: -fasm, -fno-asm
  662. .. option:: -fasm-blocks, -fno-asm-blocks
  663. .. option:: -fassociative-math, -fno-associative-math
  664. .. option:: -fassume-sane-operator-new, -fno-assume-sane-operator-new
  665. .. option:: -fast
  666. .. option:: -fastcp
  667. .. option:: -fastf
  668. .. option:: -fasynchronous-unwind-tables, -fno-asynchronous-unwind-tables
  669. .. option:: -fautolink, -fno-autolink
  670. .. option:: -fblocks, -fno-blocks
  671. Enable the 'blocks' language feature
  672. .. option:: -fbootclasspath=<arg>, --bootclasspath <arg>, --bootclasspath=<arg>
  673. .. option:: -fborland-extensions, -fno-borland-extensions
  674. Accept non-standard constructs supported by the Borland compiler
  675. .. option:: -fbracket-depth=<arg>
  676. .. option:: -fbuiltin, -fno-builtin
  677. .. option:: -fbuiltin-module-map
  678. Load the clang builtins module map file.
  679. .. option:: -fc++-static-destructors, -fno-c++-static-destructors
  680. Enable C++ static destructor registration (the default)
  681. .. option:: -fcaret-diagnostics, -fno-caret-diagnostics
  682. .. option:: -fcf-protection=<arg>, -fcf-protection (equivalent to -fcf-protection=full)
  683. Instrument control-flow architecture protection. Options: return, branch, full, none.
  684. .. option:: -fchar8\_t, -fno-char8\_t
  685. Enable C++ builtin type char8\_t
  686. .. option:: -fclasspath=<arg>, --CLASSPATH <arg>, --CLASSPATH=<arg>, --classpath <arg>, --classpath=<arg>
  687. .. option:: -fcolor-diagnostics, -fno-color-diagnostics
  688. Use colors in diagnostics
  689. .. option:: -fcommon, -fno-common
  690. .. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
  691. .. option:: -fconstant-cfstrings, -fno-constant-cfstrings
  692. .. option:: -fconstant-string-class=<arg>
  693. .. option:: -fconstexpr-backtrace-limit=<arg>
  694. .. option:: -fconstexpr-depth=<arg>
  695. .. option:: -fconstexpr-steps=<arg>
  696. .. option:: -fcoroutines-ts, -fno-coroutines-ts
  697. Enable support for the C++ Coroutines TS
  698. .. option:: -fcoverage-mapping, -fno-coverage-mapping
  699. Generate coverage mapping to enable code coverage analysis
  700. .. option:: -fcreate-profile
  701. .. option:: -fcxx-exceptions, -fno-cxx-exceptions
  702. Enable C++ exceptions
  703. .. option:: -fcxx-modules, -fno-cxx-modules
  704. .. option:: -fdata-sections, -fno-data-sections
  705. Place each data in its own section (ELF Only)
  706. .. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
  707. Emit extra debug info to make sample profile more accurate.
  708. .. option:: -fdebug-macro, -fno-debug-macro
  709. Emit macro debug information
  710. .. option:: -fdebug-pass-arguments
  711. .. option:: -fdebug-pass-structure
  712. .. option:: -fdebug-prefix-map=<arg>
  713. remap file source paths in debug info
  714. .. option:: -fdebug-types-section, -fno-debug-types-section
  715. Place debug types in their own section (ELF Only)
  716. .. option:: -fdelayed-template-parsing, -fno-delayed-template-parsing
  717. Parse templated function definitions at the end of the translation unit
  718. .. option:: -fdelete-null-pointer-checks, -fno-delete-null-pointer-checks
  719. Treat usage of null pointers as undefined behavior.
  720. .. option:: -fdenormal-fp-math=<arg>
  721. .. option:: -fdiagnostics-absolute-paths
  722. Print absolute paths in diagnostics
  723. .. option:: -fdiagnostics-color, -fno-diagnostics-color
  724. .. program:: clang1
  725. .. option:: -fdiagnostics-color=<arg>
  726. .. program:: clang
  727. .. option:: -fdiagnostics-hotness-threshold=<number>
  728. Prevent optimization remarks from being output if they do not have at least this profile count
  729. .. option:: -fdiagnostics-show-hotness, -fno-diagnostics-show-hotness
  730. Enable profile hotness information in diagnostic line
  731. .. option:: -fdiagnostics-show-note-include-stack, -fno-diagnostics-show-note-include-stack
  732. Display include stacks for diagnostic notes
  733. .. option:: -fdiagnostics-show-option, -fno-diagnostics-show-option
  734. Print option name with mappable diagnostics
  735. .. option:: -fdiagnostics-show-template-tree
  736. Print a template comparison tree for differing templates
  737. .. option:: -fdigraphs, -fno-digraphs
  738. Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)
  739. .. option:: -fdollars-in-identifiers, -fno-dollars-in-identifiers
  740. Allow '$' in identifiers
  741. .. option:: -fdouble-square-bracket-attributes, -fno-double-square-bracket-attributes
  742. Enable '\[\[\]\]' attributes in all C and C++ language modes
  743. .. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm
  744. .. option:: -fdwarf-exceptions
  745. Use DWARF style exceptions
  746. .. option:: -felide-constructors, -fno-elide-constructors
  747. .. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
  748. .. option:: -fembed-bitcode=<option>, -fembed-bitcode (equivalent to -fembed-bitcode=all), -fembed-bitcode-marker (equivalent to -fembed-bitcode=marker)
  749. Embed LLVM bitcode (option: off, all, bitcode, marker)
  750. .. option:: -femit-all-decls
  751. Emit all declarations, even if unused
  752. .. option:: -femulated-tls, -fno-emulated-tls
  753. Use emutls functions to access thread\_local variables
  754. .. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
  755. .. option:: -ferror-limit=<arg>
  756. .. option:: -fescaping-block-tail-calls, -fno-escaping-block-tail-calls
  757. .. option:: -fexceptions, -fno-exceptions
  758. Enable support for exception handling
  759. .. option:: -fexec-charset=<arg>
  760. .. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
  761. .. option:: -ffast-math, -fno-fast-math
  762. Allow aggressive, lossy floating-point optimizations
  763. .. option:: -ffinite-math-only, -fno-finite-math-only
  764. .. option:: -ffixed-point, -fno-fixed-point
  765. Enable fixed point types
  766. .. option:: -ffor-scope, -fno-for-scope
  767. .. option:: -fforce-emit-vtables, -fno-force-emit-vtables
  768. Emits more virtual tables to improve devirtualization
  769. .. option:: -fforce-enable-int128, -fno-force-enable-int128
  770. Enable support for int128\_t type
  771. .. option:: -ffp-contract=<arg>
  772. Form fused FP ops (e.g. FMAs): fast (everywhere) \| on (according to FP\_CONTRACT pragma, default) \| off (never fuse)
  773. .. option:: -ffreestanding
  774. Assert that the compilation takes place in a freestanding environment
  775. .. option:: -ffunction-sections, -fno-function-sections
  776. Place each function in its own section (ELF Only)
  777. .. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
  778. .. option:: -fgnu-keywords, -fno-gnu-keywords
  779. Allow GNU-extension keywords regardless of language standard
  780. .. option:: -fgnu-runtime
  781. Generate output compatible with the standard GNU Objective-C runtime
  782. .. option:: -fgnu89-inline, -fno-gnu89-inline
  783. Use the gnu89 inline semantics
  784. .. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
  785. .. option:: -fhonor-nans, -fno-honor-nans
  786. .. option:: -fhosted
  787. .. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
  788. Implicitly search the file system for module map files.
  789. .. option:: -fimplicit-modules, -fno-implicit-modules
  790. .. option:: -finput-charset=<arg>
  791. .. option:: -finstrument-function-entry-bare
  792. Instrument function entry only, after inlining, without arguments to the instrumentation call
  793. .. option:: -finstrument-functions
  794. Generate calls to instrument function entry and exit
  795. .. option:: -finstrument-functions-after-inlining
  796. Like -finstrument-functions, but insert the calls after inlining
  797. .. option:: -fintegrated-as, -fno-integrated-as, -integrated-as
  798. Enable the integrated assembler
  799. .. option:: -fjump-tables, -fno-jump-tables
  800. .. option:: -fkeep-static-consts
  801. Keep static const variables even if unused
  802. .. option:: -flax-vector-conversions, -fno-lax-vector-conversions
  803. .. option:: -flimited-precision=<arg>
  804. .. option:: -flto, -fno-lto
  805. Enable LTO in 'full' mode
  806. .. option:: -flto-jobs=<arg>
  807. Controls the backend parallelism of -flto=thin (default of 0 means the number of threads will be derived from the number of CPUs detected)
  808. .. program:: clang1
  809. .. option:: -flto=<arg>
  810. .. program:: clang
  811. Set LTO mode to either 'full' or 'thin'
  812. .. option:: -fmacro-backtrace-limit=<arg>
  813. .. option:: -fmath-errno, -fno-math-errno
  814. Require math functions to indicate errors by setting errno
  815. .. option:: -fmax-type-align=<arg>
  816. Specify the maximum alignment to enforce on pointers lacking an explicit alignment
  817. .. option:: -fmerge-all-constants, -fno-merge-all-constants
  818. Allow merging of constants
  819. .. option:: -fmessage-length=<arg>
  820. .. option:: -fmodule-file-deps, -fno-module-file-deps
  821. .. option:: -fmodule-map-file=<file>
  822. Load this module map file
  823. .. option:: -fmodule-name=<name>, -fmodule-implementation-of <arg>, -fmodule-name <arg>
  824. Specify the name of the module to build
  825. .. option:: -fmodules, -fno-modules
  826. Enable the 'modules' language feature
  827. .. option:: -fmodules-decluse, -fno-modules-decluse
  828. Require declaration of modules used within a module
  829. .. option:: -fmodules-ignore-macro=<arg>
  830. Ignore the definition of the given macro when building and loading modules
  831. .. option:: -fmodules-search-all, -fno-modules-search-all
  832. Search even non-imported modules to resolve references
  833. .. option:: -fmodules-strict-decluse
  834. Like -fmodules-decluse but requires all headers to be in modules
  835. .. option:: -fmodules-ts
  836. Enable support for the C++ Modules TS
  837. .. option:: -fms-compatibility, -fno-ms-compatibility
  838. Enable full Microsoft Visual C++ compatibility
  839. .. option:: -fms-compatibility-version=<arg>
  840. Dot-separated value representing the Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
  841. .. option:: -fms-extensions, -fno-ms-extensions
  842. Accept some non-standard constructs supported by the Microsoft compiler
  843. .. option:: -fms-memptr-rep=<arg>
  844. .. option:: -fms-volatile<arg>
  845. .. option:: -fmsc-version=<arg>
  846. Microsoft compiler version number to report in \_MSC\_VER (0 = don't define it (default))
  847. .. option:: -fmudflap
  848. .. option:: -fmudflapth
  849. .. option:: -fnested-functions
  850. .. option:: -fnew-alignment=<align>, -fnew-alignment <arg>
  851. Specifies the largest alignment guaranteed by '::operator new(size\_t)'
  852. .. option:: -fnext-runtime
  853. .. option:: -fno-builtin-<arg>
  854. Disable implicit builtin knowledge of a specific function
  855. .. option:: -fno-elide-type
  856. Do not elide types when printing diagnostics
  857. .. option:: -fno-max-type-align
  858. .. option:: -fno-operator-names
  859. Do not treat C++ operator name keywords as synonyms for operators
  860. .. option:: -fno-rtti-data
  861. Control emission of RTTI data
  862. .. option:: -fno-strict-modules-decluse
  863. .. option:: -fno-working-directory
  864. .. option:: -fnoxray-link-deps
  865. .. option:: -fobjc-abi-version=<arg>
  866. .. option:: -fobjc-arc, -fno-objc-arc
  867. Synthesize retain and release calls for Objective-C pointers
  868. .. option:: -fobjc-arc-exceptions, -fno-objc-arc-exceptions
  869. Use EH-safe code when synthesizing retains and releases in -fobjc-arc
  870. .. option:: -fobjc-exceptions, -fno-objc-exceptions
  871. Enable Objective-C exceptions
  872. .. option:: -fobjc-infer-related-result-type, -fno-objc-infer-related-result-type
  873. .. option:: -fobjc-legacy-dispatch, -fno-objc-legacy-dispatch
  874. .. option:: -fobjc-link-runtime
  875. .. option:: -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi
  876. .. option:: -fobjc-nonfragile-abi-version=<arg>
  877. .. option:: -fobjc-runtime=<arg>
  878. Specify the target Objective-C runtime kind and version
  879. .. option:: -fobjc-sender-dependent-dispatch
  880. .. option:: -fobjc-weak, -fno-objc-weak
  881. Enable ARC-style weak references in Objective-C
  882. .. option:: -fomit-frame-pointer, -fno-omit-frame-pointer
  883. .. option:: -fopenmp, -fno-openmp
  884. Parse OpenMP pragmas and generate parallel code.
  885. .. option:: -fopenmp-simd, -fno-openmp-simd
  886. Emit OpenMP code only for SIMD-based constructs.
  887. .. option:: -fopenmp-version=<arg>
  888. .. program:: clang1
  889. .. option:: -fopenmp=<arg>
  890. .. program:: clang
  891. .. option:: -foperator-arrow-depth=<arg>
  892. .. option:: -foptimization-record-file=<arg>
  893. Specify the file name of any generated YAML optimization record
  894. .. option:: -foptimize-sibling-calls, -fno-optimize-sibling-calls
  895. .. option:: -foutput-class-dir=<arg>, --output-class-directory <arg>, --output-class-directory=<arg>
  896. .. option:: -fpack-struct, -fno-pack-struct
  897. .. program:: clang1
  898. .. option:: -fpack-struct=<arg>
  899. .. program:: clang
  900. Specify the default maximum struct packing alignment
  901. .. option:: -fpascal-strings, -fno-pascal-strings, -mpascal-strings
  902. Recognize and construct Pascal-style string literals
  903. .. option:: -fpcc-struct-return
  904. Override the default ABI to return all structs on the stack
  905. .. option:: -fpch-preprocess
  906. .. option:: -fpic, -fno-pic
  907. .. option:: -fpie, -fno-pie
  908. .. option:: -fplt, -fno-plt
  909. Use the PLT to make function calls
  910. .. option:: -fplugin=<dsopath>
  911. Load the named plugin (dynamic shared object)
  912. .. option:: -fpreserve-as-comments, -fno-preserve-as-comments
  913. .. option:: -fprofile-arcs, -fno-profile-arcs
  914. .. option:: -fprofile-dir=<arg>
  915. .. option:: -fprofile-generate, -fno-profile-generate
  916. Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
  917. .. program:: clang1
  918. .. option:: -fprofile-generate=<directory>
  919. .. program:: clang
  920. Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
  921. .. option:: -fprofile-instr-generate, -fno-profile-instr-generate
  922. Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM\_PROFILE\_FILE env var)
  923. .. program:: clang1
  924. .. option:: -fprofile-instr-generate=<file>
  925. .. program:: clang
  926. Generate instrumented code to collect execution counts into <file> (overridden by LLVM\_PROFILE\_FILE env var)
  927. .. option:: -fprofile-instr-use, -fno-profile-instr-use, -fprofile-use
  928. .. program:: clang1
  929. .. option:: -fprofile-instr-use=<arg>
  930. .. program:: clang
  931. Use instrumentation data for profile-guided optimization
  932. .. option:: -fprofile-sample-accurate, -fauto-profile-accurate, -fno-profile-sample-accurate
  933. Specifies that the sample profile is accurate. If the sample
  934. profile is accurate, callsites without profile samples are marked
  935. as cold. Otherwise, treat callsites without profile samples as if
  936. we have no profile
  937. .. option:: -fprofile-sample-use, -fauto-profile, -fno-profile-sample-use
  938. .. program:: clang1
  939. .. option:: -fprofile-sample-use=<arg>, -fauto-profile=<arg>
  940. .. program:: clang
  941. Enable sample-based profile guided optimizations
  942. .. program:: clang1
  943. .. option:: -fprofile-use=<pathname>
  944. .. program:: clang
  945. Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.
  946. .. option:: -freciprocal-math, -fno-reciprocal-math
  947. Allow division operations to be reassociated
  948. .. option:: -freg-struct-return
  949. Override the default ABI to return small structs in registers
  950. .. option:: -fregister-global-dtors-with-atexit, -fno-register-global-dtors-with-atexit
  951. Use atexit or \_\_cxa\_atexit to register global destructors
  952. .. option:: -frelaxed-template-template-args, -fno-relaxed-template-template-args
  953. Enable C++17 relaxed template template argument matching
  954. .. option:: -freroll-loops, -fno-reroll-loops
  955. Turn on loop reroller
  956. .. option:: -fretain-comments-from-system-headers
  957. .. option:: -frewrite-imports, -fno-rewrite-imports
  958. .. option:: -frewrite-includes, -fno-rewrite-includes
  959. .. option:: -frewrite-map-file <arg>
  960. .. program:: clang1
  961. .. option:: -frewrite-map-file=<arg>
  962. .. program:: clang
  963. .. option:: -fropi, -fno-ropi
  964. .. option:: -frtti, -fno-rtti
  965. .. option:: -frwpi, -fno-rwpi
  966. .. option:: -fsave-optimization-record, -fno-save-optimization-record
  967. Generate a YAML optimization record file
  968. .. option:: -fseh-exceptions
  969. Use SEH style exceptions
  970. .. option:: -fshort-enums, -fno-short-enums
  971. Allocate to an enum type only as many bytes as it needs for the declared range of possible values
  972. .. option:: -fshort-wchar, -fno-short-wchar
  973. Force wchar\_t to be a short unsigned int
  974. .. option:: -fshow-column, -fno-show-column
  975. .. option:: -fshow-overloads=<arg>
  976. Which overload candidates to show when overload resolution fails: best\|all; defaults to all
  977. .. option:: -fshow-source-location, -fno-show-source-location
  978. .. option:: -fsignaling-math, -fno-signaling-math
  979. .. option:: -fsigned-bitfields
  980. .. option:: -fsigned-char, -fno-signed-char, --signed-char
  981. .. option:: -fsigned-zeros, -fno-signed-zeros
  982. .. option:: -fsized-deallocation, -fno-sized-deallocation
  983. Enable C++14 sized global deallocation functions
  984. .. option:: -fsjlj-exceptions
  985. Use SjLj style exceptions
  986. .. option:: -fslp-vectorize, -fno-slp-vectorize, -ftree-slp-vectorize
  987. Enable the superword-level parallelism vectorization passes
  988. .. option:: -fspell-checking, -fno-spell-checking
  989. .. option:: -fspell-checking-limit=<arg>
  990. .. option:: -fsplit-dwarf-inlining, -fno-split-dwarf-inlining
  991. Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF
  992. .. option:: -fsplit-stack
  993. .. option:: -fstack-protector, -fno-stack-protector
  994. Enable stack protectors for functions potentially vulnerable to stack smashing
  995. .. option:: -fstack-protector-all
  996. Force the usage of stack protectors for all functions
  997. .. option:: -fstack-protector-strong
  998. Use a strong heuristic to apply stack protectors to functions
  999. .. option:: -fstack-size-section, -fno-stack-size-section
  1000. Emit section containing metadata on function stack sizes
  1001. .. option:: -fstandalone-debug, -fno-limit-debug-info, -fno-standalone-debug
  1002. Emit full debug info for all types used by the program
  1003. .. option:: -fstrict-aliasing, -fno-strict-aliasing
  1004. .. option:: -fstrict-enums, -fno-strict-enums
  1005. Enable optimizations based on the strict definition of an enum's value range
  1006. .. option:: -fstrict-float-cast-overflow, -fno-strict-float-cast-overflow
  1007. Assume that overflowing float-to-int casts are undefined (default)
  1008. .. option:: -fstrict-overflow, -fno-strict-overflow
  1009. .. option:: -fstrict-return, -fno-strict-return
  1010. Always treat control flow paths that fall off the end of a non-void function as unreachable
  1011. .. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
  1012. Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
  1013. .. option:: -fstruct-path-tbaa, -fno-struct-path-tbaa
  1014. .. option:: -ftabstop=<arg>
  1015. .. option:: -ftemplate-backtrace-limit=<arg>
  1016. .. option:: -ftemplate-depth-<arg>
  1017. .. option:: -ftemplate-depth=<arg>
  1018. .. option:: -ftest-coverage
  1019. .. option:: -fthinlto-index=<arg>
  1020. Perform ThinLTO importing using provided function summary index
  1021. .. option:: -fthreadsafe-statics, -fno-threadsafe-statics
  1022. .. option:: -ftime-report
  1023. .. option:: -ftime-trace
  1024. Turn on time profiler. Results can be analyzed with chrome://tracing or
  1025. `Speedscope App <https://www.speedscope.app>`_ for flamegraph visualization
  1026. .. option:: -ftime-trace-granularity=<arg>
  1027. Minimum time granularity (in microseconds) traced by time profiler
  1028. .. option:: -ftls-model=<arg>
  1029. .. option:: -ftrap-function=<arg>
  1030. Issue call to specified function rather than a trap instruction
  1031. .. option:: -ftrapping-math, -fno-trapping-math
  1032. .. option:: -ftrapv
  1033. Trap on integer overflow
  1034. .. option:: -ftrapv-handler <arg>
  1035. .. program:: clang1
  1036. .. option:: -ftrapv-handler=<function name>
  1037. .. program:: clang
  1038. Specify the function to be called on overflow
  1039. .. option:: -ftrigraphs, -fno-trigraphs, -trigraphs, --trigraphs
  1040. Process trigraph sequences
  1041. .. option:: -funique-section-names, -fno-unique-section-names
  1042. Use unique names for text and data sections (ELF Only)
  1043. .. option:: -funit-at-a-time, -fno-unit-at-a-time
  1044. .. option:: -funroll-loops, -fno-unroll-loops
  1045. Turn on loop unroller
  1046. .. option:: -funsafe-math-optimizations, -fno-unsafe-math-optimizations
  1047. .. option:: -funsigned-bitfields
  1048. .. option:: -funsigned-char, -fno-unsigned-char, --unsigned-char
  1049. .. option:: -funwind-tables, -fno-unwind-tables
  1050. .. option:: -fuse-cxa-atexit, -fno-use-cxa-atexit
  1051. .. option:: -fuse-init-array, -fno-use-init-array
  1052. Use .init\_array instead of .ctors
  1053. .. option:: -fuse-ld=<arg>
  1054. .. option:: -fuse-line-directives, -fno-use-line-directives
  1055. .. option:: -fveclib=<arg>
  1056. Use the given vector functions library
  1057. .. option:: -fvectorize, -fno-vectorize, -ftree-vectorize
  1058. Enable the loop vectorization passes
  1059. .. option:: -fverbose-asm, -fno-verbose-asm, -dA
  1060. .. option:: -fvisibility-inlines-hidden
  1061. Give inline C++ member functions hidden visibility by default
  1062. .. option:: -fvisibility-ms-compat
  1063. Give global types 'default' visibility and global functions and variables 'hidden' visibility by default
  1064. .. option:: -fvisibility=<arg>
  1065. Set the default symbol visibility for all global declarations
  1066. .. option:: -fwhole-program-vtables, -fno-whole-program-vtables
  1067. Enables whole-program vtable optimization. Requires -flto
  1068. .. option:: -fwrapv, -fno-wrapv
  1069. Treat signed integer overflow as two's complement
  1070. .. option:: -fwritable-strings
  1071. Store string literals as writable data
  1072. .. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents
  1073. Determine whether to always emit \_\_xray\_customevent(...) calls even if the function it appears in is not always instrumented.
  1074. .. option:: -fxray-always-emit-typedevents, -fno-xray-always-emit-typedevents
  1075. Determine whether to always emit \_\_xray\_typedevent(...) calls even if the function it appears in is not always instrumented.
  1076. .. option:: -fxray-always-instrument=<arg>
  1077. DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
  1078. .. option:: -fxray-attr-list=<arg>
  1079. Filename defining the list of functions/types for imbuing XRay attributes.
  1080. .. option:: -fxray-instruction-threshold<arg>
  1081. .. program:: clang1
  1082. .. option:: -fxray-instruction-threshold=<arg>
  1083. .. program:: clang
  1084. Sets the minimum function size to instrument with XRay
  1085. .. option:: -fxray-instrument, -fno-xray-instrument
  1086. Generate XRay instrumentation sleds on function entry and exit
  1087. .. option:: -fxray-instrumentation-bundle=<arg>
  1088. Select which XRay instrumentation points to emit. Options: all, none, function, custom. Default is 'all'.
  1089. .. option:: -fxray-link-deps
  1090. Tells clang to add the link dependencies for XRay.
  1091. .. option:: -fxray-modes=<arg>
  1092. List of modes to link in by default into XRay instrumented binaries.
  1093. .. option:: -fxray-never-instrument=<arg>
  1094. DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.
  1095. .. option:: -fzero-initialized-in-bss, -fno-zero-initialized-in-bss
  1096. .. option:: -fzvector, -fno-zvector, -mzvector
  1097. Enable System z vector language extension
  1098. .. option:: -pedantic, --pedantic, -no-pedantic, --no-pedantic
  1099. .. option:: -pedantic-errors, --pedantic-errors
  1100. OpenCL flags
  1101. ------------
  1102. .. option:: -cl-denorms-are-zero
  1103. OpenCL only. Allow denormals to be flushed to zero.
  1104. .. option:: -cl-fast-relaxed-math
  1105. OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines \_\_FAST\_RELAXED\_MATH\_\_.
  1106. .. option:: -cl-finite-math-only
  1107. OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.
  1108. .. option:: -cl-fp32-correctly-rounded-divide-sqrt
  1109. OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.
  1110. .. option:: -cl-kernel-arg-info
  1111. OpenCL only. Generate kernel argument metadata.
  1112. .. option:: -cl-mad-enable
  1113. OpenCL only. Allow use of less precise MAD computations in the generated binary.
  1114. .. option:: -cl-no-signed-zeros
  1115. OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.
  1116. .. option:: -cl-opt-disable
  1117. OpenCL only. This option disables all optimizations. By default optimizations are enabled.
  1118. .. option:: -cl-single-precision-constant
  1119. OpenCL only. Treat double precision floating-point constant as single precision constant.
  1120. .. option:: -cl-std=<arg>
  1121. OpenCL language standard to compile for.
  1122. .. option:: -cl-strict-aliasing
  1123. OpenCL only. This option is added for compatibility with OpenCL 1.0.
  1124. .. option:: -cl-uniform-work-group-size
  1125. OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel
  1126. .. option:: -cl-unsafe-math-optimizations
  1127. OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.
  1128. Target-dependent compilation options
  1129. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1130. .. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg>
  1131. Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
  1132. .. option:: -m16
  1133. .. option:: -m32
  1134. .. option:: -m64
  1135. .. option:: -mabi=<arg>
  1136. .. option:: -malign-double
  1137. Align doubles to two words in structs (x86 only)
  1138. .. option:: -march=<arg>
  1139. .. option:: -masm=<arg>
  1140. .. option:: -mbackchain, -mno-backchain
  1141. Link stack frames through backchain on System Z
  1142. .. option:: -mcmodel=<arg>
  1143. .. option:: -mconsole<arg>
  1144. .. 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)
  1145. Use -mcpu=? to see a list of supported cpu models.
  1146. .. option:: -mcrc, -mno-crc
  1147. Allow use of CRC instructions (ARM/Mips only)
  1148. .. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg>
  1149. .. option:: -mdll<arg>
  1150. .. option:: -mdynamic-no-pic<arg>
  1151. .. option:: -meabi <arg>
  1152. Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
  1153. .. option:: -mfentry
  1154. Insert calls to fentry at function entry (x86/SystemZ only)
  1155. .. option:: -mfloat-abi=<arg>
  1156. .. option:: -mfpmath=<arg>
  1157. .. option:: -mfpu=<arg>
  1158. .. option:: -mglobal-merge, -mno-global-merge
  1159. Enable merging of globals
  1160. .. option:: -mhard-float
  1161. .. option:: -mhwdiv=<arg>, --mhwdiv <arg>, --mhwdiv=<arg>
  1162. .. option:: -miamcu, -mno-iamcu
  1163. Use Intel MCU ABI
  1164. .. option:: -mimplicit-float, -mno-implicit-float
  1165. .. option:: -mimplicit-it=<arg>
  1166. .. option:: -mincremental-linker-compatible, -mno-incremental-linker-compatible
  1167. (integrated-as) Emit an object file which can be used with an incremental linker
  1168. .. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
  1169. .. option:: -mkernel
  1170. .. option:: -mlong-calls, -mno-long-calls
  1171. Generate branches with extended addressability, usually via indirect jumps.
  1172. .. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
  1173. Set macOS deployment target
  1174. .. option:: -mmcu=<arg>
  1175. .. option:: -mms-bitfields, -mno-ms-bitfields
  1176. Set the default structure layout to be compatible with the Microsoft compiler standard
  1177. .. option:: -momit-leaf-frame-pointer, -mno-omit-leaf-frame-pointer
  1178. Omit frame pointer setup for leaf functions
  1179. .. option:: -moslib=<arg>
  1180. .. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
  1181. Use copy relocations support for PIE builds
  1182. .. option:: -mprefer-vector-width=<arg>
  1183. Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.
  1184. .. option:: -mqdsp6-compat
  1185. Enable hexagon-qdsp6 backward compatibility
  1186. .. option:: -mrecip
  1187. .. program:: clang1
  1188. .. option:: -mrecip=<arg1>,<arg2>...
  1189. .. program:: clang
  1190. .. option:: -mred-zone, -mno-red-zone
  1191. .. option:: -mregparm=<arg>
  1192. .. option:: -mrelax-all, -mno-relax-all
  1193. (integrated-as) Relax all machine instructions
  1194. .. option:: -mretpoline, -mno-retpoline
  1195. .. option:: -mrtd, -mno-rtd
  1196. Make StdCall calling convention the default
  1197. .. option:: -msign-return-address=<arg>
  1198. Select return address signing scope
  1199. .. option:: -msoft-float, -mno-soft-float
  1200. Use software floating point
  1201. .. option:: -mstack-alignment=<arg>
  1202. Set the stack alignment
  1203. .. option:: -mstack-arg-probe, -mno-stack-arg-probe
  1204. Enable stack probes
  1205. .. option:: -mstack-probe-size=<arg>
  1206. Set the stack probe size
  1207. .. option:: -mstackrealign, -mno-stackrealign
  1208. Force realign the stack at entry to every function
  1209. .. option:: -mthread-model <arg>
  1210. The thread model to use, e.g. posix, single (posix by default)
  1211. .. option:: -mthreads<arg>
  1212. .. option:: -mthumb, -mno-thumb
  1213. .. option:: -mtune=<arg>
  1214. Use -mtune=? to see a list of supported cpu models.
  1215. .. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
  1216. .. option:: -municode<arg>
  1217. .. option:: -mvx, -mno-vx
  1218. .. option:: -mwarn-nonportable-cfstrings, -mno-warn-nonportable-cfstrings
  1219. .. option:: -mwatchos-version-min=<arg>
  1220. .. option:: -mwindows<arg>
  1221. .. option:: -mx32
  1222. AARCH64
  1223. -------
  1224. .. option:: -ffixed-x1
  1225. Reserve the x1 register (AArch64 only)
  1226. .. option:: -ffixed-x2
  1227. Reserve the x2 register (AArch64 only)
  1228. .. option:: -ffixed-x3
  1229. Reserve the x3 register (AArch64 only)
  1230. .. option:: -ffixed-x4
  1231. Reserve the x4 register (AArch64 only)
  1232. .. option:: -ffixed-x5
  1233. Reserve the x5 register (AArch64 only)
  1234. .. option:: -ffixed-x6
  1235. Reserve the x6 register (AArch64 only)
  1236. .. option:: -ffixed-x7
  1237. Reserve the x7 register (AArch64 only)
  1238. .. option:: -ffixed-x18
  1239. Reserve the x18 register (AArch64 only)
  1240. .. option:: -ffixed-x20
  1241. Reserve the x20 register (AArch64 only)
  1242. .. option:: -fcall-saved-x8
  1243. Make the x8 register call-saved (AArch64 only)
  1244. .. option:: -fcall-saved-x9
  1245. Make the x9 register call-saved (AArch64 only)
  1246. .. option:: -fcall-saved-x10
  1247. Make the x10 register call-saved (AArch64 only)
  1248. .. option:: -fcall-saved-x11
  1249. Make the x11 register call-saved (AArch64 only)
  1250. .. option:: -fcall-saved-x12
  1251. Make the x12 register call-saved (AArch64 only)
  1252. .. option:: -fcall-saved-x13
  1253. Make the x13 register call-saved (AArch64 only)
  1254. .. option:: -fcall-saved-x14
  1255. Make the x14 register call-saved (AArch64 only)
  1256. .. option:: -fcall-saved-x15
  1257. Make the x15 register call-saved (AArch64 only)
  1258. .. option:: -fcall-saved-x18
  1259. Make the x18 register call-saved (AArch64 only)
  1260. .. option:: -mfix-cortex-a53-835769, -mno-fix-cortex-a53-835769
  1261. Workaround Cortex-A53 erratum 835769 (AArch64 only)
  1262. .. option:: -mgeneral-regs-only
  1263. Generate code which only uses the general purpose registers (AArch64 only)
  1264. AMDGPU
  1265. ------
  1266. .. option:: -mcumode, -mno-cumode
  1267. CU wavefront execution mode is used if enabled and WGP wavefront execution mode
  1268. is used if disabled (AMDGPU only)
  1269. .. option:: -mwavefrontsize64, -mno-wavefrontsize64
  1270. Wavefront size 64 is used if enabled and wavefront size 32 if disabled (AMDGPU only)
  1271. .. option:: -mxnack, -mno-xnack
  1272. Enable XNACK (AMDGPU only)
  1273. ARM
  1274. ---
  1275. .. option:: -ffixed-r9
  1276. Reserve the r9 register (ARM only)
  1277. .. option:: -mexecute-only, -mno-execute-only, -mpure-code
  1278. Disallow generation of data access to code sections (ARM only)
  1279. .. option:: -mno-movt
  1280. Disallow use of movt/movw pairs (ARM only)
  1281. .. option:: -mno-neg-immediates
  1282. Disallow converting instructions with negative immediates to their negation or inversion.
  1283. .. option:: -mnocrc
  1284. Disallow use of CRC instructions (ARM only)
  1285. .. option:: -mrestrict-it, -mno-restrict-it
  1286. Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.
  1287. .. option:: -mtp=<arg>
  1288. Read thread pointer from coprocessor register (ARM only)
  1289. .. option:: -munaligned-access, -mno-unaligned-access
  1290. Allow memory accesses to be unaligned (AArch32/AArch64 only)
  1291. Hexagon
  1292. -------
  1293. .. option:: -mieee-rnd-near
  1294. .. option:: -mmemops, -mno-memops
  1295. Enable generation of memop instructions
  1296. .. option:: -mnvj, -mno-nvj
  1297. Enable generation of new-value jumps
  1298. .. option:: -mnvs, -mno-nvs
  1299. Enable generation of new-value stores
  1300. .. option:: -mpackets, -mno-packets
  1301. Enable generation of instruction packets
  1302. Hexagon
  1303. -------
  1304. .. option:: -mhvx, -mno-hvx
  1305. Enable Hexagon Vector eXtensions
  1306. .. option:: -mhvx-length=<arg>
  1307. Set Hexagon Vector Length
  1308. .. program:: clang1
  1309. .. option:: -mhvx=<arg>
  1310. .. program:: clang
  1311. Enable Hexagon Vector eXtensions
  1312. MIPS
  1313. ----
  1314. .. option:: -mabicalls, -mno-abicalls
  1315. Enable SVR4-style position-independent code (Mips only)
  1316. .. option:: -mabs=<arg>
  1317. .. option:: -mcheck-zero-division, -mno-check-zero-division
  1318. .. option:: -mcompact-branches=<arg>
  1319. .. option:: -mdouble-float
  1320. .. option:: -mdsp, -mno-dsp
  1321. .. option:: -mdspr2, -mno-dspr2
  1322. .. option:: -membedded-data, -mno-embedded-data
  1323. Place constants in the .rodata section instead of the .sdata section even if they meet the -G <size> threshold (MIPS)
  1324. .. option:: -mextern-sdata, -mno-extern-sdata
  1325. Assume that externally defined data is in the small data if it meets the -G <size> threshold (MIPS)
  1326. .. option:: -mfp32
  1327. Use 32-bit floating point registers (MIPS only)
  1328. .. option:: -mfp64
  1329. Use 64-bit floating point registers (MIPS only)
  1330. .. option:: -mginv, -mno-ginv
  1331. .. option:: -mgpopt, -mno-gpopt
  1332. Use GP relative accesses for symbols known to be in a small data section (MIPS)
  1333. .. option:: -mindirect-jump=<arg>
  1334. Change indirect jump instructions to inhibit speculation
  1335. .. option:: -mips16
  1336. .. option:: -mldc1-sdc1, -mno-ldc1-sdc1
  1337. .. option:: -mlocal-sdata, -mno-local-sdata
  1338. Extend the -G behaviour to object local data (MIPS)
  1339. .. option:: -mmadd4, -mno-madd4
  1340. Enable the generation of 4-operand madd.s, madd.d and related instructions.
  1341. .. option:: -mmicromips, -mno-micromips
  1342. .. option:: -mmsa, -mno-msa
  1343. Enable MSA ASE (MIPS only)
  1344. .. option:: -mmt, -mno-mt
  1345. Enable MT ASE (MIPS only)
  1346. .. option:: -mnan=<arg>
  1347. .. option:: -mno-mips16
  1348. .. option:: -msingle-float
  1349. .. option:: -mvirt, -mno-virt
  1350. .. option:: -mxgot, -mno-xgot
  1351. PowerPC
  1352. -------
  1353. .. option:: -maltivec, -mno-altivec
  1354. .. option:: -mcmpb, -mno-cmpb
  1355. .. option:: -mcrbits, -mno-crbits
  1356. .. option:: -mcrypto, -mno-crypto
  1357. .. option:: -mdirect-move, -mno-direct-move
  1358. .. option:: -mfloat128, -mno-float128
  1359. .. option:: -mfprnd, -mno-fprnd
  1360. .. option:: -mhtm, -mno-htm
  1361. .. option:: -minvariant-function-descriptors, -mno-invariant-function-descriptors
  1362. .. option:: -misel, -mno-isel
  1363. .. option:: -mlongcall, -mno-longcall
  1364. .. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
  1365. .. option:: -mpopcntd, -mno-popcntd
  1366. .. option:: -mpower8-vector, -mno-power8-vector
  1367. .. option:: -mpower9-vector, -mno-power9-vector
  1368. .. option:: -mqpx, -mno-qpx
  1369. .. option:: -msecure-plt
  1370. .. option:: -mvsx, -mno-vsx
  1371. WebAssembly
  1372. -----------
  1373. .. option:: -mexception-handling, -mno-exception-handling
  1374. .. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint
  1375. .. option:: -msign-ext, -mno-sign-ext
  1376. .. option:: -msimd128, -mno-simd128
  1377. X86
  1378. ---
  1379. .. option:: -m3dnow, -mno-3dnow
  1380. .. option:: -m3dnowa, -mno-3dnowa
  1381. .. option:: -madx, -mno-adx
  1382. .. option:: -maes, -mno-aes
  1383. .. option:: -mavx, -mno-avx
  1384. .. option:: -mavx2, -mno-avx2
  1385. .. option:: -mavx512bitalg, -mno-avx512bitalg
  1386. .. option:: -mavx512bf16, -mno-avx512bf16
  1387. .. option:: -mavx512bw, -mno-avx512bw
  1388. .. option:: -mavx512cd, -mno-avx512cd
  1389. .. option:: -mavx512dq, -mno-avx512dq
  1390. .. option:: -mavx512er, -mno-avx512er
  1391. .. option:: -mavx512f, -mno-avx512f
  1392. .. option:: -mavx512ifma, -mno-avx512ifma
  1393. .. option:: -mavx512pf, -mno-avx512pf
  1394. .. option:: -mavx512vbmi, -mno-avx512vbmi
  1395. .. option:: -mavx512vbmi2, -mno-avx512vbmi2
  1396. .. option:: -mavx512vl, -mno-avx512vl
  1397. .. option:: -mavx512vnni, -mno-avx512vnni
  1398. .. option:: -mavx512vp2intersect, -mno-avx512vp2intersect
  1399. .. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq
  1400. .. option:: -mbmi, -mno-bmi
  1401. .. option:: -mbmi2, -mno-bmi2
  1402. .. option:: -mcldemote, -mno-cldemote
  1403. .. option:: -mclflushopt, -mno-clflushopt
  1404. .. option:: -mclwb, -mno-clwb
  1405. .. option:: -mclzero, -mno-clzero
  1406. .. option:: -mcx16, -mno-cx16
  1407. .. option:: -menqcmd, -mno-enqcmd
  1408. .. option:: -mf16c, -mno-f16c
  1409. .. option:: -mfma, -mno-fma
  1410. .. option:: -mfma4, -mno-fma4
  1411. .. option:: -mfsgsbase, -mno-fsgsbase
  1412. .. option:: -mfxsr, -mno-fxsr
  1413. .. option:: -mgfni, -mno-gfni
  1414. .. option:: -minvpcid, -mno-invpcid
  1415. .. option:: -mlwp, -mno-lwp
  1416. .. option:: -mlzcnt, -mno-lzcnt
  1417. .. option:: -mmmx, -mno-mmx
  1418. .. option:: -mmovbe, -mno-movbe
  1419. .. option:: -mmovdir64b, -mno-movdir64b
  1420. .. option:: -mmovdiri, -mno-movdiri
  1421. .. option:: -mmpx, -mno-mpx
  1422. .. option:: -mmwaitx, -mno-mwaitx
  1423. .. option:: -mpclmul, -mno-pclmul
  1424. .. option:: -mpconfig, -mno-pconfig
  1425. .. option:: -mpku, -mno-pku
  1426. .. option:: -mpopcnt, -mno-popcnt
  1427. .. option:: -mprefetchwt1, -mno-prefetchwt1
  1428. .. option:: -mprfchw, -mno-prfchw
  1429. .. option:: -mptwrite, -mno-ptwrite
  1430. .. option:: -mrdpid, -mno-rdpid
  1431. .. option:: -mrdrnd, -mno-rdrnd
  1432. .. option:: -mrdseed, -mno-rdseed
  1433. .. option:: -mretpoline-external-thunk, -mno-retpoline-external-thunk
  1434. .. option:: -mrtm, -mno-rtm
  1435. .. option:: -msahf, -mno-sahf
  1436. .. option:: -msgx, -mno-sgx
  1437. .. option:: -msha, -mno-sha
  1438. .. option:: -mshstk, -mno-shstk
  1439. .. option:: -msse, -mno-sse
  1440. .. option:: -msse2, -mno-sse2
  1441. .. option:: -msse3, -mno-sse3
  1442. .. option:: -msse4.1, -mno-sse4.1
  1443. .. program:: clang1
  1444. .. option:: -msse4.2, -mno-sse4.2, -msse4
  1445. .. program:: clang
  1446. .. option:: -msse4a, -mno-sse4a
  1447. .. option:: -mssse3, -mno-ssse3
  1448. .. option:: -mtbm, -mno-tbm
  1449. .. option:: -mvaes, -mno-vaes
  1450. .. option:: -mvpclmulqdq, -mno-vpclmulqdq
  1451. .. option:: -mwaitpkg, -mno-waitpkg
  1452. .. option:: -mwbnoinvd, -mno-wbnoinvd
  1453. .. option:: -mx87, -m80387, -mno-x87
  1454. .. option:: -mxop, -mno-xop
  1455. .. option:: -mxsave, -mno-xsave
  1456. .. option:: -mxsavec, -mno-xsavec
  1457. .. option:: -mxsaveopt, -mno-xsaveopt
  1458. .. option:: -mxsaves, -mno-xsaves
  1459. RISCV
  1460. -----
  1461. .. option:: -mrelax, -mno-relax
  1462. Enable linker relaxation
  1463. Optimization level
  1464. ~~~~~~~~~~~~~~~~~~
  1465. Flags controlling how much optimization should be performed.
  1466. .. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
  1467. .. option:: -Ofast<arg>
  1468. Debug information generation
  1469. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1470. Flags controlling how much and what kind of debug information should be
  1471. generated.
  1472. Kind and level of debug information
  1473. -----------------------------------
  1474. .. option:: -g, --debug, --debug=<arg>
  1475. Generate source-level debug information
  1476. .. option:: -gdwarf-2
  1477. Generate source-level debug information with dwarf version 2
  1478. .. option:: -gdwarf-3
  1479. Generate source-level debug information with dwarf version 3
  1480. .. option:: -gdwarf-4, -gdwarf
  1481. Generate source-level debug information with dwarf version 4
  1482. .. option:: -gdwarf-5
  1483. Generate source-level debug information with dwarf version 5
  1484. .. option:: -gfull
  1485. .. option:: -gused
  1486. Debug level
  1487. ___________
  1488. .. option:: -g0
  1489. .. option:: -g2
  1490. .. option:: -g3
  1491. .. option:: -ggdb0
  1492. .. option:: -ggdb1
  1493. .. option:: -ggdb2
  1494. .. option:: -ggdb3
  1495. .. option:: -gline-tables-only, -g1, -gmlt
  1496. Emit debug line number tables only
  1497. .. option:: -gmodules
  1498. Generate debug info with external references to clang modules or precompiled headers
  1499. Debugger to tune debug information for
  1500. ______________________________________
  1501. .. option:: -ggdb
  1502. .. option:: -glldb
  1503. .. option:: -gsce
  1504. Debug information flags
  1505. -----------------------
  1506. .. option:: -gcolumn-info, -gno-column-info
  1507. .. option:: -gdwarf-aranges
  1508. .. option:: -gembed-source, -gno-embed-source
  1509. Embed source text in DWARF debug sections
  1510. .. option:: -ggnu-pubnames, -gno-gnu-pubnames
  1511. .. option:: -gpubnames, -gno-pubnames
  1512. .. option:: -grecord-command-line, -grecord-gcc-switches, -gno-record-command-line, -gno-record-gcc-switches
  1513. .. option:: -gsplit-dwarf
  1514. .. option:: -gstrict-dwarf, -gno-strict-dwarf
  1515. .. option:: -gz
  1516. DWARF debug sections compression type
  1517. .. program:: clang1
  1518. .. option:: -gz=<arg>
  1519. .. program:: clang
  1520. DWARF debug sections compression type
  1521. Static analyzer flags
  1522. =====================
  1523. Flags controlling the behavior of the Clang Static Analyzer.
  1524. .. option:: -Xanalyzer <arg>
  1525. Pass <arg> to the static analyzer
  1526. Fortran compilation flags
  1527. =========================
  1528. Flags that will be passed onto the ``gfortran`` compiler when Clang is given
  1529. a Fortran input.
  1530. .. option:: -A<arg>, --assert <arg>, --assert=<arg>
  1531. .. option:: -A-<arg>
  1532. .. option:: -J<arg>
  1533. .. option:: -cpp
  1534. .. option:: -faggressive-function-elimination, -fno-aggressive-function-elimination
  1535. .. option:: -falign-commons, -fno-align-commons
  1536. .. option:: -fall-intrinsics, -fno-all-intrinsics
  1537. .. option:: -fautomatic, -fno-automatic
  1538. .. option:: -fbackslash, -fno-backslash
  1539. .. option:: -fbacktrace, -fno-backtrace
  1540. .. option:: -fblas-matmul-limit=<arg>
  1541. .. option:: -fbounds-check, -fno-bounds-check
  1542. .. option:: -fcheck-array-temporaries, -fno-check-array-temporaries
  1543. .. option:: -fcheck=<arg>
  1544. .. option:: -fcoarray=<arg>
  1545. .. option:: -fconvert=<arg>
  1546. .. option:: -fcray-pointer, -fno-cray-pointer
  1547. .. option:: -fd-lines-as-code, -fno-d-lines-as-code
  1548. .. option:: -fd-lines-as-comments, -fno-d-lines-as-comments
  1549. .. option:: -fdefault-double-8, -fno-default-double-8
  1550. .. option:: -fdefault-integer-8, -fno-default-integer-8
  1551. .. option:: -fdefault-real-8, -fno-default-real-8
  1552. .. option:: -fdollar-ok, -fno-dollar-ok
  1553. .. option:: -fdump-fortran-optimized, -fno-dump-fortran-optimized
  1554. .. option:: -fdump-fortran-original, -fno-dump-fortran-original
  1555. .. option:: -fdump-parse-tree, -fno-dump-parse-tree
  1556. .. option:: -fexternal-blas, -fno-external-blas
  1557. .. option:: -ff2c, -fno-f2c
  1558. .. option:: -ffixed-form, -fno-fixed-form
  1559. .. option:: -ffixed-line-length-<arg>
  1560. .. option:: -ffpe-trap=<arg>
  1561. .. option:: -ffree-form, -fno-free-form
  1562. .. option:: -ffree-line-length-<arg>
  1563. .. option:: -ffrontend-optimize, -fno-frontend-optimize
  1564. .. option:: -fimplicit-none, -fno-implicit-none
  1565. .. option:: -finit-character=<arg>
  1566. .. option:: -finit-integer=<arg>
  1567. .. option:: -finit-local-zero, -fno-init-local-zero
  1568. .. option:: -finit-logical=<arg>
  1569. .. option:: -finit-real=<arg>
  1570. .. option:: -finteger-4-integer-8, -fno-integer-4-integer-8
  1571. .. option:: -fintrinsic-modules-path, -fno-intrinsic-modules-path
  1572. .. option:: -fmax-array-constructor=<arg>
  1573. .. option:: -fmax-errors=<arg>
  1574. .. option:: -fmax-identifier-length, -fno-max-identifier-length
  1575. .. option:: -fmax-stack-var-size=<arg>
  1576. .. option:: -fmax-subrecord-length=<arg>
  1577. .. option:: -fmodule-private, -fno-module-private
  1578. .. option:: -fpack-derived, -fno-pack-derived
  1579. .. option:: -fprotect-parens, -fno-protect-parens
  1580. .. option:: -frange-check, -fno-range-check
  1581. .. option:: -freal-4-real-10, -fno-real-4-real-10
  1582. .. option:: -freal-4-real-16, -fno-real-4-real-16
  1583. .. option:: -freal-4-real-8, -fno-real-4-real-8
  1584. .. option:: -freal-8-real-10, -fno-real-8-real-10
  1585. .. option:: -freal-8-real-16, -fno-real-8-real-16
  1586. .. option:: -freal-8-real-4, -fno-real-8-real-4
  1587. .. option:: -frealloc-lhs, -fno-realloc-lhs
  1588. .. option:: -frecord-marker=<arg>
  1589. .. option:: -frecursive, -fno-recursive
  1590. .. option:: -frepack-arrays, -fno-repack-arrays
  1591. .. option:: -fsecond-underscore, -fno-second-underscore
  1592. .. option:: -fsign-zero, -fno-sign-zero
  1593. .. option:: -fstack-arrays, -fno-stack-arrays
  1594. .. option:: -funderscoring, -fno-underscoring
  1595. .. option:: -fwhole-file, -fno-whole-file
  1596. .. option:: -imultilib <arg>
  1597. .. option:: -nocpp
  1598. .. option:: -static-libgfortran
  1599. Linker flags
  1600. ============
  1601. Flags that are passed on to the linker
  1602. .. option:: -L<dir>, --library-directory <arg>, --library-directory=<arg>
  1603. Add directory to library search path
  1604. .. option:: -Mach
  1605. .. option:: -T<script>
  1606. Specify <script> as linker script
  1607. .. option:: -Tbss<addr>
  1608. Set starting address of BSS to <addr>
  1609. .. option:: -Tdata<addr>
  1610. Set starting address of DATA to <addr>
  1611. .. option:: -Ttext<addr>
  1612. Set starting address of TEXT to <addr>
  1613. .. option:: -Wl,<arg>,<arg2>...
  1614. Pass the comma separated arguments in <arg> to the linker
  1615. .. option:: -X
  1616. .. option:: -Xlinker <arg>, --for-linker <arg>, --for-linker=<arg>
  1617. Pass <arg> to the linker
  1618. .. program:: clang1
  1619. .. option:: -Z
  1620. .. program:: clang
  1621. .. option:: -e<arg>, --entry
  1622. .. option:: -filelist <arg>
  1623. .. option:: --hip-device-lib-path=<arg>
  1624. HIP device library path
  1625. .. option:: --hip-device-lib=<arg>
  1626. HIP device library
  1627. .. option:: -l<arg>
  1628. .. option:: -r
  1629. .. option:: -rpath <arg>
  1630. .. option:: -s
  1631. .. option:: -t
  1632. .. option:: -u<arg>, --force-link <arg>, --force-link=<arg>
  1633. .. option:: -undef
  1634. undef all system defines
  1635. .. option:: -undefined<arg>, --no-undefined
  1636. .. option:: -z <arg>
  1637. Pass -z <arg> to the linker