ClangCommandLineReference.rst 61 KB

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