]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/clang/clang/clang.1
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / usr.bin / clang / clang / clang.1
1 .\" $FreeBSD$
2 .\" Man page generated from reStructuredText.
3 .
4 .TH "CLANG" "1" "2020-06-26" "10" "Clang"
5 .SH NAME
6 clang \- the Clang C, C++, and Objective-C compiler
7 .
8 .nr rst2man-indent-level 0
9 .
10 .de1 rstReportMargin
11 \\$1 \\n[an-margin]
12 level \\n[rst2man-indent-level]
13 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
14 -
15 \\n[rst2man-indent0]
16 \\n[rst2man-indent1]
17 \\n[rst2man-indent2]
18 ..
19 .de1 INDENT
20 .\" .rstReportMargin pre:
21 . RS \\$1
22 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
23 . nr rst2man-indent-level +1
24 .\" .rstReportMargin post:
25 ..
26 .de UNINDENT
27 . RE
28 .\" indent \\n[an-margin]
29 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .nr rst2man-indent-level -1
31 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
32 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
33 ..
34 .SH SYNOPSIS
35 .sp
36 \fBclang\fP [\fIoptions\fP] \fIfilename ...\fP
37 .SH DESCRIPTION
38 .sp
39 \fBclang\fP is a C, C++, and Objective\-C compiler which encompasses
40 preprocessing, parsing, optimization, code generation, assembly, and linking.
41 Depending on which high\-level mode setting is passed, Clang will stop before
42 doing a full link.  While Clang is highly integrated, it is important to
43 understand the stages of compilation, to understand how to invoke it.  These
44 stages are:
45 .INDENT 0.0
46 .TP
47 .B Driver
48 The clang executable is actually a small driver which controls the overall
49 execution of other tools such as the compiler, assembler and linker.
50 Typically you do not need to interact with the driver, but you
51 transparently use it to run the other tools.
52 .TP
53 .B Preprocessing
54 This stage handles tokenization of the input source file, macro expansion,
55 #include expansion and handling of other preprocessor directives.  The
56 output of this stage is typically called a ".i" (for C), ".ii" (for C++),
57 ".mi" (for Objective\-C), or ".mii" (for Objective\-C++) file.
58 .TP
59 .B Parsing and Semantic Analysis
60 This stage parses the input file, translating preprocessor tokens into a
61 parse tree.  Once in the form of a parse tree, it applies semantic
62 analysis to compute types for expressions as well and determine whether
63 the code is well formed. This stage is responsible for generating most of
64 the compiler warnings as well as parse errors. The output of this stage is
65 an "Abstract Syntax Tree" (AST).
66 .TP
67 .B Code Generation and Optimization
68 This stage translates an AST into low\-level intermediate code (known as
69 "LLVM IR") and ultimately to machine code.  This phase is responsible for
70 optimizing the generated code and handling target\-specific code generation.
71 The output of this stage is typically called a ".s" file or "assembly" file.
72 .sp
73 Clang also supports the use of an integrated assembler, in which the code
74 generator produces object files directly. This avoids the overhead of
75 generating the ".s" file and of calling the target assembler.
76 .TP
77 .B Assembler
78 This stage runs the target assembler to translate the output of the
79 compiler into a target object file. The output of this stage is typically
80 called a ".o" file or "object" file.
81 .TP
82 .B Linker
83 This stage runs the target linker to merge multiple object files into an
84 executable or dynamic library. The output of this stage is typically called
85 an "a.out", ".dylib" or ".so" file.
86 .UNINDENT
87 .sp
88 \fBClang Static Analyzer\fP
89 .sp
90 The Clang Static Analyzer is a tool that scans source code to try to find bugs
91 through code analysis.  This tool uses many parts of Clang and is built into
92 the same driver.  Please see <\fI\%https://clang\-analyzer.llvm.org\fP> for more details
93 on how to use the static analyzer.
94 .SH OPTIONS
95 .SS Stage Selection Options
96 .INDENT 0.0
97 .TP
98 .B \-E
99 Run the preprocessor stage.
100 .UNINDENT
101 .INDENT 0.0
102 .TP
103 .B \-fsyntax\-only
104 Run the preprocessor, parser and type checking stages.
105 .UNINDENT
106 .INDENT 0.0
107 .TP
108 .B \-S
109 Run the previous stages as well as LLVM generation and optimization stages
110 and target\-specific code generation, producing an assembly file.
111 .UNINDENT
112 .INDENT 0.0
113 .TP
114 .B \-c
115 Run all of the above, plus the assembler, generating a target ".o" object file.
116 .UNINDENT
117 .INDENT 0.0
118 .TP
119 .B no stage selection option
120 If no stage selection option is specified, all stages above are run, and the
121 linker is run to combine the results into an executable or shared library.
122 .UNINDENT
123 .SS Language Selection and Mode Options
124 .INDENT 0.0
125 .TP
126 .B \-x <language>
127 Treat subsequent input files as having type language.
128 .UNINDENT
129 .INDENT 0.0
130 .TP
131 .B \-std=<standard>
132 Specify the language standard to compile for.
133 .sp
134 Supported values for the C language are:
135 .INDENT 7.0
136 .INDENT 3.5
137 .nf
138 \fBc89\fP
139 \fBc90\fP
140 \fBiso9899:1990\fP
141 .fi
142 .sp
143 .INDENT 0.0
144 .INDENT 3.5
145 ISO C 1990
146 .UNINDENT
147 .UNINDENT
148 .nf
149 \fBiso9899:199409\fP
150 .fi
151 .sp
152 .INDENT 0.0
153 .INDENT 3.5
154 ISO C 1990 with amendment 1
155 .UNINDENT
156 .UNINDENT
157 .nf
158 \fBgnu89\fP
159 \fBgnu90\fP
160 .fi
161 .sp
162 .INDENT 0.0
163 .INDENT 3.5
164 ISO C 1990 with GNU extensions
165 .UNINDENT
166 .UNINDENT
167 .nf
168 \fBc99\fP
169 \fBiso9899:1999\fP
170 .fi
171 .sp
172 .INDENT 0.0
173 .INDENT 3.5
174 ISO C 1999
175 .UNINDENT
176 .UNINDENT
177 .nf
178 \fBgnu99\fP
179 .fi
180 .sp
181 .INDENT 0.0
182 .INDENT 3.5
183 ISO C 1999 with GNU extensions
184 .UNINDENT
185 .UNINDENT
186 .nf
187 \fBc11\fP
188 \fBiso9899:2011\fP
189 .fi
190 .sp
191 .INDENT 0.0
192 .INDENT 3.5
193 ISO C 2011
194 .UNINDENT
195 .UNINDENT
196 .nf
197 \fBgnu11\fP
198 .fi
199 .sp
200 .INDENT 0.0
201 .INDENT 3.5
202 ISO C 2011 with GNU extensions
203 .UNINDENT
204 .UNINDENT
205 .nf
206 \fBc17\fP
207 \fBiso9899:2017\fP
208 .fi
209 .sp
210 .INDENT 0.0
211 .INDENT 3.5
212 ISO C 2017
213 .UNINDENT
214 .UNINDENT
215 .nf
216 \fBgnu17\fP
217 .fi
218 .sp
219 .INDENT 0.0
220 .INDENT 3.5
221 ISO C 2017 with GNU extensions
222 .UNINDENT
223 .UNINDENT
224 .UNINDENT
225 .UNINDENT
226 .sp
227 The default C language standard is \fBgnu11\fP, except on PS4, where it is
228 \fBgnu99\fP\&.
229 .sp
230 Supported values for the C++ language are:
231 .INDENT 7.0
232 .INDENT 3.5
233 .nf
234 \fBc++98\fP
235 \fBc++03\fP
236 .fi
237 .sp
238 .INDENT 0.0
239 .INDENT 3.5
240 ISO C++ 1998 with amendments
241 .UNINDENT
242 .UNINDENT
243 .nf
244 \fBgnu++98\fP
245 \fBgnu++03\fP
246 .fi
247 .sp
248 .INDENT 0.0
249 .INDENT 3.5
250 ISO C++ 1998 with amendments and GNU extensions
251 .UNINDENT
252 .UNINDENT
253 .nf
254 \fBc++11\fP
255 .fi
256 .sp
257 .INDENT 0.0
258 .INDENT 3.5
259 ISO C++ 2011 with amendments
260 .UNINDENT
261 .UNINDENT
262 .nf
263 \fBgnu++11\fP
264 .fi
265 .sp
266 .INDENT 0.0
267 .INDENT 3.5
268 ISO C++ 2011 with amendments and GNU extensions
269 .UNINDENT
270 .UNINDENT
271 .nf
272 \fBc++14\fP
273 .fi
274 .sp
275 .INDENT 0.0
276 .INDENT 3.5
277 ISO C++ 2014 with amendments
278 .UNINDENT
279 .UNINDENT
280 .nf
281 \fBgnu++14\fP
282 .fi
283 .sp
284 .INDENT 0.0
285 .INDENT 3.5
286 ISO C++ 2014 with amendments and GNU extensions
287 .UNINDENT
288 .UNINDENT
289 .nf
290 \fBc++17\fP
291 .fi
292 .sp
293 .INDENT 0.0
294 .INDENT 3.5
295 ISO C++ 2017 with amendments
296 .UNINDENT
297 .UNINDENT
298 .nf
299 \fBgnu++17\fP
300 .fi
301 .sp
302 .INDENT 0.0
303 .INDENT 3.5
304 ISO C++ 2017 with amendments and GNU extensions
305 .UNINDENT
306 .UNINDENT
307 .nf
308 \fBc++2a\fP
309 .fi
310 .sp
311 .INDENT 0.0
312 .INDENT 3.5
313 Working draft for ISO C++ 2020
314 .UNINDENT
315 .UNINDENT
316 .nf
317 \fBgnu++2a\fP
318 .fi
319 .sp
320 .INDENT 0.0
321 .INDENT 3.5
322 Working draft for ISO C++ 2020 with GNU extensions
323 .UNINDENT
324 .UNINDENT
325 .UNINDENT
326 .UNINDENT
327 .sp
328 The default C++ language standard is \fBgnu++14\fP\&.
329 .sp
330 Supported values for the OpenCL language are:
331 .INDENT 7.0
332 .INDENT 3.5
333 .nf
334 \fBcl1.0\fP
335 .fi
336 .sp
337 .INDENT 0.0
338 .INDENT 3.5
339 OpenCL 1.0
340 .UNINDENT
341 .UNINDENT
342 .nf
343 \fBcl1.1\fP
344 .fi
345 .sp
346 .INDENT 0.0
347 .INDENT 3.5
348 OpenCL 1.1
349 .UNINDENT
350 .UNINDENT
351 .nf
352 \fBcl1.2\fP
353 .fi
354 .sp
355 .INDENT 0.0
356 .INDENT 3.5
357 OpenCL 1.2
358 .UNINDENT
359 .UNINDENT
360 .nf
361 \fBcl2.0\fP
362 .fi
363 .sp
364 .INDENT 0.0
365 .INDENT 3.5
366 OpenCL 2.0
367 .UNINDENT
368 .UNINDENT
369 .UNINDENT
370 .UNINDENT
371 .sp
372 The default OpenCL language standard is \fBcl1.0\fP\&.
373 .sp
374 Supported values for the CUDA language are:
375 .INDENT 7.0
376 .INDENT 3.5
377 .nf
378 \fBcuda\fP
379 .fi
380 .sp
381 .INDENT 0.0
382 .INDENT 3.5
383 NVIDIA CUDA(tm)
384 .UNINDENT
385 .UNINDENT
386 .UNINDENT
387 .UNINDENT
388 .UNINDENT
389 .INDENT 0.0
390 .TP
391 .B \-stdlib=<library>
392 Specify the C++ standard library to use; supported options are libstdc++ and
393 libc++. If not specified, platform default will be used.
394 .UNINDENT
395 .INDENT 0.0
396 .TP
397 .B \-rtlib=<library>
398 Specify the compiler runtime library to use; supported options are libgcc and
399 compiler\-rt. If not specified, platform default will be used.
400 .UNINDENT
401 .INDENT 0.0
402 .TP
403 .B \-ansi
404 Same as \-std=c89.
405 .UNINDENT
406 .INDENT 0.0
407 .TP
408 .B \-ObjC, \-ObjC++
409 Treat source input files as Objective\-C and Object\-C++ inputs respectively.
410 .UNINDENT
411 .INDENT 0.0
412 .TP
413 .B \-trigraphs
414 Enable trigraphs.
415 .UNINDENT
416 .INDENT 0.0
417 .TP
418 .B \-ffreestanding
419 Indicate that the file should be compiled for a freestanding, not a hosted,
420 environment.
421 .UNINDENT
422 .INDENT 0.0
423 .TP
424 .B \-fno\-builtin
425 Disable special handling and optimizations of builtin functions like
426 \fBstrlen()\fP and \fBmalloc()\fP\&.
427 .UNINDENT
428 .INDENT 0.0
429 .TP
430 .B \-fmath\-errno
431 Indicate that math functions should be treated as updating \fBerrno\fP\&.
432 .UNINDENT
433 .INDENT 0.0
434 .TP
435 .B \-fpascal\-strings
436 Enable support for Pascal\-style strings with "\epfoo".
437 .UNINDENT
438 .INDENT 0.0
439 .TP
440 .B \-fms\-extensions
441 Enable support for Microsoft extensions.
442 .UNINDENT
443 .INDENT 0.0
444 .TP
445 .B \-fmsc\-version=
446 Set _MSC_VER. Defaults to 1300 on Windows. Not set otherwise.
447 .UNINDENT
448 .INDENT 0.0
449 .TP
450 .B \-fborland\-extensions
451 Enable support for Borland extensions.
452 .UNINDENT
453 .INDENT 0.0
454 .TP
455 .B \-fwritable\-strings
456 Make all string literals default to writable.  This disables uniquing of
457 strings and other optimizations.
458 .UNINDENT
459 .INDENT 0.0
460 .TP
461 .B \-flax\-vector\-conversions, \-flax\-vector\-conversions=<kind>, \-fno\-lax\-vector\-conversions
462 Allow loose type checking rules for implicit vector conversions.
463 Possible values of <kind>:
464 .INDENT 7.0
465 .IP \(bu 2
466 \fBnone\fP: allow no implicit conversions between vectors
467 .IP \(bu 2
468 \fBinteger\fP: allow implicit bitcasts between integer vectors of the same
469 overall bit\-width
470 .IP \(bu 2
471 \fBall\fP: allow implicit bitcasts between any vectors of the same
472 overall bit\-width
473 .UNINDENT
474 .sp
475 <kind> defaults to \fBinteger\fP if unspecified.
476 .UNINDENT
477 .INDENT 0.0
478 .TP
479 .B \-fblocks
480 Enable the "Blocks" language feature.
481 .UNINDENT
482 .INDENT 0.0
483 .TP
484 .B \-fobjc\-abi\-version=version
485 Select the Objective\-C ABI version to use. Available versions are 1 (legacy
486 "fragile" ABI), 2 (non\-fragile ABI 1), and 3 (non\-fragile ABI 2).
487 .UNINDENT
488 .INDENT 0.0
489 .TP
490 .B \-fobjc\-nonfragile\-abi\-version=<version>
491 Select the Objective\-C non\-fragile ABI version to use by default. This will
492 only be used as the Objective\-C ABI when the non\-fragile ABI is enabled
493 (either via \fI\%\-fobjc\-nonfragile\-abi\fP, or because it is the platform
494 default).
495 .UNINDENT
496 .INDENT 0.0
497 .TP
498 .B \-fobjc\-nonfragile\-abi, \-fno\-objc\-nonfragile\-abi
499 Enable use of the Objective\-C non\-fragile ABI. On platforms for which this is
500 the default ABI, it can be disabled with \fI\%\-fno\-objc\-nonfragile\-abi\fP\&.
501 .UNINDENT
502 .SS Target Selection Options
503 .sp
504 Clang fully supports cross compilation as an inherent part of its design.
505 Depending on how your version of Clang is configured, it may have support for a
506 number of cross compilers, or may only support a native target.
507 .INDENT 0.0
508 .TP
509 .B \-arch <architecture>
510 Specify the architecture to build for.
511 .UNINDENT
512 .INDENT 0.0
513 .TP
514 .B \-mmacosx\-version\-min=<version>
515 When building for macOS, specify the minimum version supported by your
516 application.
517 .UNINDENT
518 .INDENT 0.0
519 .TP
520 .B \-miphoneos\-version\-min
521 When building for iPhone OS, specify the minimum version supported by your
522 application.
523 .UNINDENT
524 .INDENT 0.0
525 .TP
526 .B \-\-print\-supported\-cpus
527 Print out a list of supported processors for the given target (specified
528 through \-\-target=<architecture> or \-arch <architecture>). If no target is
529 specified, the system default target will be used.
530 .UNINDENT
531 .INDENT 0.0
532 .TP
533 .B \-mcpu=?, \-mtune=?
534 Aliases of \-\-print\-supported\-cpus
535 .UNINDENT
536 .INDENT 0.0
537 .TP
538 .B \-march=<cpu>
539 Specify that Clang should generate code for a specific processor family
540 member and later.  For example, if you specify \-march=i486, the compiler is
541 allowed to generate instructions that are valid on i486 and later processors,
542 but which may not exist on earlier ones.
543 .UNINDENT
544 .SS Code Generation Options
545 .INDENT 0.0
546 .TP
547 .B \-O0, \-O1, \-O2, \-O3, \-Ofast, \-Os, \-Oz, \-Og, \-O, \-O4
548 Specify which optimization level to use:
549 .INDENT 7.0
550 .INDENT 3.5
551 \fI\%\-O0\fP Means "no optimization": this level compiles the fastest and
552 generates the most debuggable code.
553 .sp
554 \fI\%\-O1\fP Somewhere between \fI\%\-O0\fP and \fI\%\-O2\fP\&.
555 .sp
556 \fI\%\-O2\fP Moderate level of optimization which enables most
557 optimizations.
558 .sp
559 \fI\%\-O3\fP Like \fI\%\-O2\fP, except that it enables optimizations that
560 take longer to perform or that may generate larger code (in an attempt to
561 make the program run faster).
562 .sp
563 \fI\%\-Ofast\fP Enables all the optimizations from \fI\%\-O3\fP along
564 with other aggressive optimizations that may violate strict compliance with
565 language standards.
566 .sp
567 \fI\%\-Os\fP Like \fI\%\-O2\fP with extra optimizations to reduce code
568 size.
569 .sp
570 \fI\%\-Oz\fP Like \fI\%\-Os\fP (and thus \fI\%\-O2\fP), but reduces code
571 size further.
572 .sp
573 \fI\%\-Og\fP Like \fI\%\-O1\fP\&. In future versions, this option might
574 disable different optimizations in order to improve debuggability.
575 .sp
576 \fI\%\-O\fP Equivalent to \fI\%\-O2\fP\&.
577 .sp
578 \fI\%\-O4\fP and higher
579 .INDENT 0.0
580 .INDENT 3.5
581 Currently equivalent to \fI\%\-O3\fP
582 .UNINDENT
583 .UNINDENT
584 .UNINDENT
585 .UNINDENT
586 .UNINDENT
587 .INDENT 0.0
588 .TP
589 .B \-g, \-gline\-tables\-only, \-gmodules
590 Control debug information output.  Note that Clang debug information works
591 best at \fI\%\-O0\fP\&.  When more than one option starting with \fI\-g\fP is
592 specified, the last one wins:
593 .INDENT 7.0
594 .INDENT 3.5
595 \fB\-g\fP Generate debug information.
596 .sp
597 \fB\-gline\-tables\-only\fP Generate only line table debug information. This
598 allows for symbolicated backtraces with inlining information, but does not
599 include any information about variables, their locations or types.
600 .sp
601 \fI\%\-gmodules\fP Generate debug information that contains external
602 references to types defined in Clang modules or precompiled headers instead
603 of emitting redundant debug type information into every object file.  This
604 option transparently switches the Clang module format to object file
605 containers that hold the Clang module together with the debug information.
606 When compiling a program that uses Clang modules or precompiled headers,
607 this option produces complete debug information with faster compile
608 times and much smaller object files.
609 .sp
610 This option should not be used when building static libraries for
611 distribution to other machines because the debug info will contain
612 references to the module cache on the machine the object files in the
613 library were built on.
614 .UNINDENT
615 .UNINDENT
616 .UNINDENT
617 .INDENT 0.0
618 .TP
619 .B \-fstandalone\-debug \-fno\-standalone\-debug
620 Clang supports a number of optimizations to reduce the size of debug
621 information in the binary. They work based on the assumption that the
622 debug type information can be spread out over multiple compilation units.
623 For instance, Clang will not emit type definitions for types that are not
624 needed by a module and could be replaced with a forward declaration.
625 Further, Clang will only emit type info for a dynamic C++ class in the
626 module that contains the vtable for the class.
627 .sp
628 The \fB\-fstandalone\-debug\fP option turns off these optimizations.
629 This is useful when working with 3rd\-party libraries that don\(aqt come with
630 debug information.  This is the default on Darwin.  Note that Clang will
631 never emit type information for types that are not referenced at all by the
632 program.
633 .UNINDENT
634 .INDENT 0.0
635 .TP
636 .B \-fexceptions
637 Enable generation of unwind information. This allows exceptions to be thrown
638 through Clang compiled stack frames.  This is on by default in x86\-64.
639 .UNINDENT
640 .INDENT 0.0
641 .TP
642 .B \-ftrapv
643 Generate code to catch integer overflow errors.  Signed integer overflow is
644 undefined in C. With this flag, extra code is generated to detect this and
645 abort when it happens.
646 .UNINDENT
647 .INDENT 0.0
648 .TP
649 .B \-fvisibility
650 This flag sets the default visibility level.
651 .UNINDENT
652 .INDENT 0.0
653 .TP
654 .B \-fcommon, \-fno\-common
655 This flag specifies that variables without initializers get common linkage.
656 It can be disabled with \fI\%\-fno\-common\fP\&.
657 .UNINDENT
658 .INDENT 0.0
659 .TP
660 .B \-ftls\-model=<model>
661 Set the default thread\-local storage (TLS) model to use for thread\-local
662 variables. Valid values are: "global\-dynamic", "local\-dynamic",
663 "initial\-exec" and "local\-exec". The default is "global\-dynamic". The default
664 model can be overridden with the tls_model attribute. The compiler will try
665 to choose a more efficient model if possible.
666 .UNINDENT
667 .INDENT 0.0
668 .TP
669 .B \-flto, \-flto=full, \-flto=thin, \-emit\-llvm
670 Generate output files in LLVM formats, suitable for link time optimization.
671 When used with \fI\%\-S\fP this generates LLVM intermediate language
672 assembly files, otherwise this generates LLVM bitcode format object files
673 (which may be passed to the linker depending on the stage selection options).
674 .sp
675 The default for \fI\%\-flto\fP is "full", in which the
676 LLVM bitcode is suitable for monolithic Link Time Optimization (LTO), where
677 the linker merges all such modules into a single combined module for
678 optimization. With "thin", ThinLTO
679 compilation is invoked instead.
680 .UNINDENT
681 .SS Driver Options
682 .INDENT 0.0
683 .TP
684 .B \-###
685 Print (but do not run) the commands to run for this compilation.
686 .UNINDENT
687 .INDENT 0.0
688 .TP
689 .B \-\-help
690 Display available options.
691 .UNINDENT
692 .INDENT 0.0
693 .TP
694 .B \-Qunused\-arguments
695 Do not emit any warnings for unused driver arguments.
696 .UNINDENT
697 .INDENT 0.0
698 .TP
699 .B \-Wa,<args>
700 Pass the comma separated arguments in args to the assembler.
701 .UNINDENT
702 .INDENT 0.0
703 .TP
704 .B \-Wl,<args>
705 Pass the comma separated arguments in args to the linker.
706 .UNINDENT
707 .INDENT 0.0
708 .TP
709 .B \-Wp,<args>
710 Pass the comma separated arguments in args to the preprocessor.
711 .UNINDENT
712 .INDENT 0.0
713 .TP
714 .B \-Xanalyzer <arg>
715 Pass arg to the static analyzer.
716 .UNINDENT
717 .INDENT 0.0
718 .TP
719 .B \-Xassembler <arg>
720 Pass arg to the assembler.
721 .UNINDENT
722 .INDENT 0.0
723 .TP
724 .B \-Xlinker <arg>
725 Pass arg to the linker.
726 .UNINDENT
727 .INDENT 0.0
728 .TP
729 .B \-Xpreprocessor <arg>
730 Pass arg to the preprocessor.
731 .UNINDENT
732 .INDENT 0.0
733 .TP
734 .B \-o <file>
735 Write output to file.
736 .UNINDENT
737 .INDENT 0.0
738 .TP
739 .B \-print\-file\-name=<file>
740 Print the full library path of file.
741 .UNINDENT
742 .INDENT 0.0
743 .TP
744 .B \-print\-libgcc\-file\-name
745 Print the library path for the currently used compiler runtime library
746 ("libgcc.a" or "libclang_rt.builtins.*.a").
747 .UNINDENT
748 .INDENT 0.0
749 .TP
750 .B \-print\-prog\-name=<name>
751 Print the full program path of name.
752 .UNINDENT
753 .INDENT 0.0
754 .TP
755 .B \-print\-search\-dirs
756 Print the paths used for finding libraries and programs.
757 .UNINDENT
758 .INDENT 0.0
759 .TP
760 .B \-save\-temps
761 Save intermediate compilation results.
762 .UNINDENT
763 .INDENT 0.0
764 .TP
765 .B \-save\-stats, \-save\-stats=cwd, \-save\-stats=obj
766 Save internal code generation (LLVM) statistics to a file in the current
767 directory (\fI\%\-save\-stats\fP/"\-save\-stats=cwd") or the directory
768 of the output file ("\-save\-state=obj").
769 .UNINDENT
770 .INDENT 0.0
771 .TP
772 .B \-integrated\-as, \-no\-integrated\-as
773 Used to enable and disable, respectively, the use of the integrated
774 assembler. Whether the integrated assembler is on by default is target
775 dependent.
776 .UNINDENT
777 .INDENT 0.0
778 .TP
779 .B \-time
780 Time individual commands.
781 .UNINDENT
782 .INDENT 0.0
783 .TP
784 .B \-ftime\-report
785 Print timing summary of each stage of compilation.
786 .UNINDENT
787 .INDENT 0.0
788 .TP
789 .B \-v
790 Show commands to run and use verbose output.
791 .UNINDENT
792 .SS Diagnostics Options
793 .INDENT 0.0
794 .TP
795 .B \-fshow\-column, \-fshow\-source\-location, \-fcaret\-diagnostics, \-fdiagnostics\-fixit\-info, \-fdiagnostics\-parseable\-fixits, \-fdiagnostics\-print\-source\-range\-info, \-fprint\-source\-range\-info, \-fdiagnostics\-show\-option, \-fmessage\-length
796 These options control how Clang prints out information about diagnostics
797 (errors and warnings). Please see the Clang User\(aqs Manual for more information.
798 .UNINDENT
799 .SS Preprocessor Options
800 .INDENT 0.0
801 .TP
802 .B \-D<macroname>=<value>
803 Adds an implicit #define into the predefines buffer which is read before the
804 source file is preprocessed.
805 .UNINDENT
806 .INDENT 0.0
807 .TP
808 .B \-U<macroname>
809 Adds an implicit #undef into the predefines buffer which is read before the
810 source file is preprocessed.
811 .UNINDENT
812 .INDENT 0.0
813 .TP
814 .B \-include <filename>
815 Adds an implicit #include into the predefines buffer which is read before the
816 source file is preprocessed.
817 .UNINDENT
818 .INDENT 0.0
819 .TP
820 .B \-I<directory>
821 Add the specified directory to the search path for include files.
822 .UNINDENT
823 .INDENT 0.0
824 .TP
825 .B \-F<directory>
826 Add the specified directory to the search path for framework include files.
827 .UNINDENT
828 .INDENT 0.0
829 .TP
830 .B \-nostdinc
831 Do not search the standard system directories or compiler builtin directories
832 for include files.
833 .UNINDENT
834 .INDENT 0.0
835 .TP
836 .B \-nostdlibinc
837 Do not search the standard system directories for include files, but do
838 search compiler builtin include directories.
839 .UNINDENT
840 .INDENT 0.0
841 .TP
842 .B \-nobuiltininc
843 Do not search clang\(aqs builtin directory for include files.
844 .UNINDENT
845 .SH ENVIRONMENT
846 .INDENT 0.0
847 .TP
848 .B TMPDIR, TEMP, TMP
849 These environment variables are checked, in order, for the location to write
850 temporary files used during the compilation process.
851 .UNINDENT
852 .INDENT 0.0
853 .TP
854 .B CPATH
855 If this environment variable is present, it is treated as a delimited list of
856 paths to be added to the default system include path list. The delimiter is
857 the platform dependent delimiter, as used in the PATH environment variable.
858 .sp
859 Empty components in the environment variable are ignored.
860 .UNINDENT
861 .INDENT 0.0
862 .TP
863 .B C_INCLUDE_PATH, OBJC_INCLUDE_PATH, CPLUS_INCLUDE_PATH, OBJCPLUS_INCLUDE_PATH
864 These environment variables specify additional paths, as for \fI\%CPATH\fP, which are
865 only used when processing the appropriate language.
866 .UNINDENT
867 .INDENT 0.0
868 .TP
869 .B MACOSX_DEPLOYMENT_TARGET
870 If \fI\%\-mmacosx\-version\-min\fP is unspecified, the default deployment
871 target is read from this environment variable. This option only affects
872 Darwin targets.
873 .UNINDENT
874 .SH BUGS
875 .sp
876 To report bugs, please visit <\fI\%https://bugs.llvm.org/\fP>.  Most bug reports should
877 include preprocessed source files (use the \fI\%\-E\fP option) and the full
878 output of the compiler, along with information to reproduce.
879 .SH SEE ALSO
880 .sp
881 \fBas(1)\fP, \fBld(1)\fP
882 .SH AUTHOR
883 Maintained by the Clang / LLVM Team (<http://clang.llvm.org>)
884 .SH COPYRIGHT
885 2007-2020, The Clang Team
886 .\" Generated by docutils manpage writer.
887 .