Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 1 | =pod |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 5 | clang - the Clang C and Objective-C compiler |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 6 | |
| 7 | =head1 SYNOPSIS |
| 8 | |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 9 | B<clang> [B<-c>|B<-S>|B<-E>] B<-std=>I<standard> B<-g> |
| 10 | [B<-O0>|B<-O1>|B<-O2>|B<-Os>|B<-O3>|B<-O4>] |
| 11 | B<-W>I<warnings...> B<-pedantic> |
| 12 | B<-I>I<dir...> B<-L>I<dir...> |
| 13 | B<-D>I<macro[=defn]> |
| 14 | B<-f>I<feature-option...> |
| 15 | B<-m>I<machine-option...> |
| 16 | B<-o> I<output-file> |
| 17 | I<input-filenames> |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 18 | |
| 19 | =head1 DESCRIPTION |
| 20 | |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 21 | B<clang> is a C and Objective-C compiler which encompasses preprocessing, |
| 22 | parsing, optimization, code generation, assembly, and linking. Depending on |
| 23 | which high-level mode setting is passed, Clang will stop before doing a full |
| 24 | link. While Clang is highly integrated, it is important to understand the |
| 25 | stages of compilation, to understand how to invoke it. These stages are: |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 26 | |
| 27 | =over |
| 28 | |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 29 | =item B<Driver> |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 30 | |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 31 | The B<clang> executable is actually a small driver which controls the overall |
| 32 | execution of other tools such as the compiler, assembler and linker. Typically |
| 33 | you do not need to interact with the driver, but you transparently use it to run |
| 34 | the other tools. |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 35 | |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 36 | =item B<Preprocessing> |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 37 | |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 38 | This stage handles tokenization of the input source file, macro expansion, |
| 39 | #include expansion and handling of other preprocessor directives. The output of |
| 40 | this stage is typically called a ".i" (for C) or ".mi" (for Objective-C) file. |
| 41 | |
| 42 | =item B<Parsing and Semantic Analysis> |
| 43 | |
| 44 | This stage parses the input file, translating preprocessor tokens into a parse |
| 45 | tree. Once in the form of a parser tree, it applies semantic analysis to compute |
| 46 | types for expressions as well and determine whether the code is well formed. This |
| 47 | stage is responsible for generating most of the compiler warnings as well as |
| 48 | parse errors. The output of this stage is an "Abstract Syntax Tree" (AST). |
| 49 | |
| 50 | =item B<Code Generation and Optimization> |
| 51 | |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 52 | This stage translates an AST into low-level intermediate code (known as "LLVM |
| 53 | IR") and ultimately to machine code (depending on the optimization level). This |
| 54 | phase is responsible for optimizing the generated code and handling |
| 55 | target-specfic code generation. The output of this stage is typically called a |
| 56 | ".s" file or "assembly" file. |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 57 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 58 | =item B<Assembler> |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 59 | |
| 60 | This stage runs the target assembler to translate the output of the compiler |
| 61 | into a target object file. The output of this stage is typically called a ".o" |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 62 | file or "object" file. |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 63 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 64 | =item B<Linker> |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 65 | |
| 66 | This stage runs the target linker to merge multiple object files into an |
| 67 | executable or dynamic library. The output of this stage is typically called an |
| 68 | "a.out", ".dylib" or ".so" file. |
| 69 | |
| 70 | =back |
| 71 | |
| 72 | The Clang compiler supports a large number of options to control each of these |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 73 | stages. In addition to compilation of code, Clang also supports other tools: |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 74 | |
| 75 | B<Clang Static Analyzer> |
| 76 | |
| 77 | The Clang Static Analyzer is a tool that scans source code to try to find bugs |
| 78 | though code analysis. This tool uses many parts of Clang and is built into the |
| 79 | same driver. |
| 80 | |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 81 | |
| 82 | =head1 OPTIONS |
| 83 | |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 84 | =head2 Stage Selection Options |
| 85 | |
| 86 | =over |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 87 | |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 88 | =item B<-E> |
| 89 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 90 | Run the preprocessor stage. |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 91 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 92 | =item B<-fsyntax-only> |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 93 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 94 | Run the preprocessor, parser and type checking stages. |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 95 | |
| 96 | =item B<-emit-llvm> |
| 97 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 98 | Run the preprocessor, parser, type checking stages, LLVM generation and |
| 99 | optimization stages. |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 100 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 101 | =item B<-S> |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 102 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 103 | Run all of the above, plus target-specific code generation, producing an |
| 104 | assembly file. |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 105 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 106 | =item B<-c> |
| 107 | |
| 108 | Run all of the above, plus the assembler, generating a target ".o" object file. |
| 109 | |
| 110 | =item B<no stage selection option> |
| 111 | |
| 112 | If no stage selection option is specified, all stages above are run, and the |
| 113 | linker is run to combine the results into an executable or shared library. |
| 114 | |
| 115 | =item B<--analyze> |
| 116 | |
| 117 | Run the Clang Static Analyzer. |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 118 | |
| 119 | =back |
| 120 | |
| 121 | |
| 122 | |
Chris Lattner | 04005dd | 2009-05-12 00:01:32 +0000 | [diff] [blame] | 123 | =head2 Language Selection and Mode Options |
| 124 | |
| 125 | =over |
| 126 | |
| 127 | =item B<-x> I<language> |
| 128 | |
| 129 | Treat subsequent input files as having type I<language>. |
| 130 | |
| 131 | =item B<-std>=I<language> |
| 132 | |
| 133 | Specify the language standard to compile for. |
| 134 | |
| 135 | =item B<-ansi> |
| 136 | |
| 137 | Same as B<-std=c89>. |
| 138 | |
| 139 | =item B<-ObjC++> |
| 140 | |
| 141 | Treat subsequent source input files as Objective-C++ inputs. |
| 142 | |
| 143 | =item B<-ObjC> |
| 144 | |
| 145 | Treat subsequent source input files as Objective-C inputs. |
| 146 | |
| 147 | =item B<-trigraphs> |
| 148 | |
| 149 | Enable trigraphs. |
| 150 | |
| 151 | =item B<-ffreestanding> |
| 152 | |
| 153 | Indicate that the file should be compiled for a freestanding, not a hosted, |
| 154 | environment. |
| 155 | |
| 156 | =item B<-fno-builtin> |
| 157 | |
| 158 | Disable special handling and optimizations of builtin functions like strlen and |
| 159 | malloc. |
| 160 | |
| 161 | =item B<-fmath-errno> |
| 162 | |
| 163 | Indicate that math functions should be treated as updating errno. |
| 164 | |
| 165 | =item B<-fpascal-strings> |
| 166 | |
| 167 | Enable support for Pascal-style strings with "\pfoo". |
| 168 | |
| 169 | =item B<-fms-extensions> |
| 170 | |
| 171 | Enable support for Microsoft extensions. |
| 172 | |
| 173 | =item B<-fwritable-strings> |
| 174 | |
| 175 | Make all string literals default to writable. This disables uniquing of |
| 176 | strings and other optimizations. |
| 177 | |
| 178 | =item B<-flax-vector-conversions> |
| 179 | |
| 180 | Allow loose type checking rules for implicit vector conversions. |
| 181 | |
| 182 | =item B<-fblocks> |
| 183 | |
| 184 | Enable the "Blocks" language feature. |
| 185 | |
| 186 | |
| 187 | =item B<-fobjc-gc-only> |
| 188 | |
| 189 | Indicate that Objective-C code should be compiled in GC-only mode, which only |
| 190 | works when Objective-C Garbage Collection is enabled. |
| 191 | |
| 192 | =item B<-fobjc-gc> |
| 193 | |
| 194 | Indicate that Objective-C code should be compiled in hybrid-GC mode, which works |
| 195 | with both GC and non-GC mode. |
| 196 | |
| 197 | =back |
| 198 | |
| 199 | |
| 200 | |
| 201 | =head2 Target Selection Options |
| 202 | |
| 203 | Clang fully supports cross compilation and an inherent part of its design. |
| 204 | Depending on how your version of Clang is configured, it may have support for |
| 205 | a number of cross compilers, or may just support a native target. |
| 206 | |
| 207 | =over |
| 208 | |
| 209 | =cut |
| 210 | ###### |
| 211 | ######=item B<-triple>=I<target triple> |
| 212 | ###### |
| 213 | =pod |
| 214 | |
| 215 | |
| 216 | =item B<-arch> I<architecture> |
| 217 | |
| 218 | Specify the architecture to build for. |
| 219 | |
| 220 | =item B<-mmacosx-version-min>=I<version> |
| 221 | |
| 222 | When building for Mac OS/X, specify the minimum version supported by your |
| 223 | application. |
| 224 | |
| 225 | =item B<-miphoneos-version-min> |
| 226 | |
| 227 | When building for iPhone OS, specify the minimum version supported by your |
| 228 | application. |
| 229 | |
| 230 | |
| 231 | =item B<-march>=I<cpu> |
| 232 | |
| 233 | Specify that Clang should generate code for a specific processor family member |
| 234 | and later. For example, if you specify -march=i486, the compiler is allowed to |
| 235 | generate instructions that are valid on i486 and later processors, but which |
| 236 | may not exist on earlier ones. |
| 237 | |
| 238 | =back |
| 239 | |
| 240 | |
| 241 | =head2 Code Generation Options |
| 242 | |
| 243 | =over |
| 244 | |
| 245 | =item B<-O0> B<-O1> B<-O2> B<-Os> B<-O3> B<-O4> |
| 246 | |
| 247 | Specify which optimization level to use. B<-O0> means "no optimization": this |
| 248 | level compiles the fastest and generates the most debuggable code. B<-O2> is |
| 249 | a moderate level of debugging which enables most optimizations. B<-Os> is like |
| 250 | B<-O2> but it does extra optimizations to reduce code size. B<-O3> is like |
| 251 | B<-O2>, except that it enables optimizations that take longer to perform or that |
| 252 | may generate larger code (in an attempt to make the program run faster). B<-O1> |
| 253 | is somewhere between B<-O0> and B<-O1>. |
| 254 | |
| 255 | =item B<-g> |
| 256 | |
| 257 | Generate debug information. Note that Clang debug information works best at |
| 258 | B<-O0>. At higher optimization levels, only line number information is |
| 259 | currently available. |
| 260 | |
| 261 | =item B<-fexceptions> |
| 262 | |
| 263 | Enable generation of unwind information, this allows exceptions to be thrown |
| 264 | through Clang compiled stack frames. This is on by default in x86-64. |
| 265 | |
| 266 | =item B<-ftrapv> |
| 267 | |
| 268 | Generate code to catch integer overflow errors. Signed integer overflow is |
| 269 | undefined in C, with this flag, extra code is generated to detect this and abort |
| 270 | when it happens. |
| 271 | |
| 272 | |
| 273 | =item B<-fvisibility> |
| 274 | |
| 275 | This flag sets the default visibility level. |
| 276 | |
| 277 | =item B<-fcommon> |
| 278 | |
| 279 | This flag specifies that variables without initializers get common linkage. It |
| 280 | can be disabled with B<-fno-common>. |
| 281 | |
| 282 | =cut |
| 283 | |
| 284 | ##=item B<-fnext-runtime> B<-fobjc-nonfragile-abi> B<-fgnu-runtime> |
| 285 | ##These options specify which Objective-C runtime the code generator should |
| 286 | ##target. FIXME: we don't want people poking these generally. |
| 287 | |
| 288 | =pod |
| 289 | |
| 290 | =back |
| 291 | |
| 292 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 293 | =head2 Driver Options |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 294 | |
| 295 | =over |
| 296 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 297 | =item B<-###> |
Chris Lattner | b5f6e80 | 2009-05-06 02:47:51 +0000 | [diff] [blame] | 298 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 299 | Print the commands to run for this compilation. |
| 300 | |
| 301 | =item B<--help> |
| 302 | |
| 303 | Display available options. |
| 304 | |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 305 | =item B<-Qunused-arguments> |
| 306 | |
| 307 | Don't emit warning for unused driver arguments. |
| 308 | |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 309 | =item B<-Wa,>I<args> |
| 310 | |
| 311 | Pass the comma separated arguments in I<args> to the assembler. |
| 312 | |
| 313 | =item B<-Wl,>I<args> |
| 314 | |
| 315 | Pass the comma separated arguments in I<args> to the linker. |
| 316 | |
| 317 | =item B<-Wp,>I<args> |
| 318 | |
| 319 | Pass the comma separated arguments in I<args> to the preprocessor. |
| 320 | |
| 321 | =item B<-Xanalyzer> I<arg> |
| 322 | |
| 323 | Pass I<arg> to the static analyzer. |
| 324 | |
| 325 | =item B<-Xassembler> I<arg> |
| 326 | |
| 327 | Pass I<arg> to the assembler. |
| 328 | |
| 329 | =item B<-Xclang> I<arg> |
| 330 | |
| 331 | Pass I<arg> to the clang compiler. |
| 332 | |
| 333 | =item B<-Xlinker> I<arg> |
| 334 | |
| 335 | Pass I<arg> to the linker. |
| 336 | |
| 337 | =item B<-Xpreprocessor> I<arg> |
| 338 | |
| 339 | Pass I<arg> to the preprocessor. |
| 340 | |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 341 | =item B<-o> I<file> |
| 342 | |
| 343 | Write output to I<file>. |
| 344 | |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 345 | =item B<-print-file-name>=I<file> |
| 346 | |
| 347 | Print the full library path of I<file>. |
| 348 | |
| 349 | =item B<-print-libgcc-file-name> |
| 350 | |
| 351 | Print the library path for "libgcc.a". |
| 352 | |
| 353 | =item B<-print-prog-name>=I<name> |
| 354 | |
| 355 | Print the full program path of I<name>. |
| 356 | |
| 357 | =item B<-print-search-dirs> |
| 358 | |
| 359 | Print the paths used for finding libraries and programs. |
| 360 | |
| 361 | =item B<-save-temps> |
| 362 | |
| 363 | Save intermediate compilation results. |
| 364 | |
| 365 | =item B<-time> |
| 366 | |
| 367 | Time individual commands. |
| 368 | |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 369 | =item B<-ftime-report> |
| 370 | |
| 371 | Print timing summary of each stage of compilation. |
| 372 | |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 373 | =item B<-v> |
| 374 | |
| 375 | Show commands to run and use verbose output. |
| 376 | |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 377 | =back |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 378 | |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 379 | |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 380 | =head2 Diagnostics Options |
| 381 | |
| 382 | =over |
| 383 | |
Chris Lattner | 04005dd | 2009-05-12 00:01:32 +0000 | [diff] [blame] | 384 | =item |
| 385 | B<-fshow-column> |
| 386 | B<-fshow-source-location> |
| 387 | B<-fcaret-diagnostics> |
| 388 | B<-fdiagnostics-fixit-info> |
| 389 | B<-fdiagnostics-print-source-range-info> |
| 390 | B<-fprint-source-range-info> |
| 391 | B<-fdiagnostics-show-option> |
| 392 | B<-fmessage-length> |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 393 | |
Chris Lattner | 04005dd | 2009-05-12 00:01:32 +0000 | [diff] [blame] | 394 | These options control how Clang prints out information about diagnostics (errors |
| 395 | and warnings). Please see the Clang User's Manual for more information. |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 396 | |
| 397 | =back |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 398 | |
| 399 | |
| 400 | =head2 Preprocessor Options |
| 401 | |
| 402 | =over |
| 403 | |
Chris Lattner | 06ab044 | 2009-05-12 00:47:40 +0000 | [diff] [blame^] | 404 | =item B<-D>I<macroname=value> |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 405 | |
Chris Lattner | 06ab044 | 2009-05-12 00:47:40 +0000 | [diff] [blame^] | 406 | Adds an implicit #define into the predefines buffer which is read before the |
| 407 | source file is preprocessed. |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 408 | |
Chris Lattner | 06ab044 | 2009-05-12 00:47:40 +0000 | [diff] [blame^] | 409 | =item B<-U>I<macroname> |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 410 | |
Chris Lattner | 06ab044 | 2009-05-12 00:47:40 +0000 | [diff] [blame^] | 411 | Adds an implicit #undef into the predefines buffer which is read before the |
| 412 | source file is preprocessed. |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 413 | |
Chris Lattner | 06ab044 | 2009-05-12 00:47:40 +0000 | [diff] [blame^] | 414 | =item B<-include> I<filename> |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 415 | |
Chris Lattner | 06ab044 | 2009-05-12 00:47:40 +0000 | [diff] [blame^] | 416 | Adds an implicit #include into the predefines buffer which is read before the |
| 417 | source file is preprocessed. |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 418 | |
Chris Lattner | 06ab044 | 2009-05-12 00:47:40 +0000 | [diff] [blame^] | 419 | =item B<-I>I<directory> |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 420 | |
Chris Lattner | 06ab044 | 2009-05-12 00:47:40 +0000 | [diff] [blame^] | 421 | Add the specified directory to the search path for include files. |
| 422 | |
| 423 | =item B<-F>I<directory> |
| 424 | |
| 425 | Add the specified directory to the search path for framework include files. |
| 426 | |
| 427 | =item B<-nostdinc> |
| 428 | |
| 429 | Do not search the standard system directories for include files. |
| 430 | |
| 431 | =cut |
| 432 | |
| 433 | ## TODO, but do we really want people using this stuff? |
| 434 | =item B<-idirafter>I<directory> |
| 435 | =item B<-iquote>I<directory> |
| 436 | =item B<-isystem>I<directory> |
| 437 | =item B<-iprefix>I<directory> |
| 438 | =item B<-iwithprefix>I<directory> |
| 439 | =item B<-iwithprefixbefore>I<directory> |
| 440 | =item B<-isysroot> |
| 441 | =pod |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 442 | |
| 443 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 444 | =back |
| 445 | |
| 446 | |
| 447 | |
Chris Lattner | 06ab044 | 2009-05-12 00:47:40 +0000 | [diff] [blame^] | 448 | =cut |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 449 | |
Chris Lattner | 06ab044 | 2009-05-12 00:47:40 +0000 | [diff] [blame^] | 450 | ### TODO someday. |
| 451 | =head2 Warning Control Options |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 452 | =over |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 453 | =back |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 454 | =head2 Code Generation and Optimization Options |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 455 | =over |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 456 | =back |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 457 | =head2 Assembler Options |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 458 | =over |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 459 | =back |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 460 | =head2 Linker Options |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 461 | =over |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 462 | =back |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 463 | =head2 Static Analyzer Options |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 464 | =over |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 465 | =back |
| 466 | |
Chris Lattner | 06ab044 | 2009-05-12 00:47:40 +0000 | [diff] [blame^] | 467 | =pod |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 468 | |
| 469 | |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 470 | =head1 ENVIRONMENT |
| 471 | |
Daniel Dunbar | e58c943 | 2009-05-06 19:18:09 +0000 | [diff] [blame] | 472 | =over |
| 473 | |
| 474 | =item B<TMPDIR>, B<TEMP>, B<TMP> |
| 475 | |
| 476 | These environment variables are checked, in order, for the location to |
| 477 | write temporary files used during the compilation process. |
| 478 | |
| 479 | =item B<CPATH> |
| 480 | |
| 481 | If this environment variable is present, it is treated as a delimited |
| 482 | list of paths to be added to the default system include path list. The |
| 483 | delimiter is the platform dependent delimitor, as used in the I<PATH> |
| 484 | environment variable. |
| 485 | |
| 486 | Empty components in the environment variable are ignored. |
| 487 | |
| 488 | =item B<C_INCLUDE_PATH>, B<OBJC_INCLUDE_PATH>, B<CPLUS_INCLUDE_PATH>, |
| 489 | B<OBJCPLUS_INCLUDE_PATH> |
| 490 | |
| 491 | These environment variables specify additional paths, as for CPATH, |
| 492 | which are only used when processing the appropriate language. |
| 493 | |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 494 | =item B<MACOSX_DEPLOYMENT_TARGET> |
Daniel Dunbar | e58c943 | 2009-05-06 19:18:09 +0000 | [diff] [blame] | 495 | |
| 496 | If -mmacosx-version-min is unspecified, the default deployment target |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 497 | is read from this environment variable. This option only affects darwin |
| 498 | targets. |
Daniel Dunbar | e58c943 | 2009-05-06 19:18:09 +0000 | [diff] [blame] | 499 | |
| 500 | =back |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 501 | |
| 502 | =head1 BUGS |
| 503 | |
Chris Lattner | 9b081c6 | 2009-05-06 17:22:08 +0000 | [diff] [blame] | 504 | Clang currently does not have C++ support, and this manual page is incomplete. |
| 505 | To report bugs, please visit L<http://llvm.org/bugs/>. Most bug reports should |
Daniel Dunbar | e58c943 | 2009-05-06 19:18:09 +0000 | [diff] [blame] | 506 | include preprocessed source files (use the B<-E> option) and the full output of |
| 507 | the compiler, along with information to reproduce. |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 508 | |
| 509 | =head1 SEE ALSO |
| 510 | |
Chris Lattner | 482c682 | 2009-05-11 22:45:37 +0000 | [diff] [blame] | 511 | as(1), ld(1) |
Daniel Dunbar | dbec033 | 2009-04-29 01:00:32 +0000 | [diff] [blame] | 512 | |
| 513 | =head1 AUTHOR |
| 514 | |
| 515 | Maintained by the Clang / LLVM Team (L<http://clang.llvm.org>). |
| 516 | |
| 517 | =cut |