blob: 9ff5c223ea3b0fffd83111beebf64cb75389110f [file] [log] [blame]
Daniel Dunbar8adfcff2009-11-19 07:19:04 +00001//===--- CC1Options.td - Options for clang -cc1 ---------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines the options accepted by clang -cc1.
11//
12//===----------------------------------------------------------------------===//
13
14// Include the common option parsing interfaces.
15include "OptParser.td"
16
17// Target Options
18
19def target_abi : Separate<"-target-abi">,
20 HelpText<"Target a particular ABI type">;
Daniel Dunbar31db76c2009-11-20 01:46:44 +000021def mcpu : Separate<"-mcpu">,
Daniel Dunbara31100e2009-11-20 22:21:52 +000022 HelpText<"Target a specific cpu type ('-mcpu help' for details)">;
Daniel Dunbar31db76c2009-11-20 01:46:44 +000023def target_feature : Separate<"-target-feature">,
Daniel Dunbar8adfcff2009-11-19 07:19:04 +000024 HelpText<"Target specific attributes">;
Daniel Dunbar31db76c2009-11-20 01:46:44 +000025def triple : Separate<"-triple">,
Daniel Dunbar8adfcff2009-11-19 07:19:04 +000026 HelpText<"Specify target triple (e.g. i686-apple-darwin9)">;
Daniel Dunbar50a44872009-11-20 17:23:30 +000027
Daniel Dunbare2814d82009-11-22 22:08:20 +000028// Analyzer Options
29
30def analysis_CFGDump : Flag<"-cfg-dump">,
31 HelpText<"Display Control-Flow Graphs">;
32def analysis_CFGView : Flag<"-cfg-view">,
33 HelpText<"View Control-Flow Graphs using GraphViz">;
34def analysis_DisplayLiveVariables : Flag<"-dump-live-variables">,
35 HelpText<"Print results of live variable analysis">;
36def analysis_SecuritySyntacticChecks : Flag<"-warn-security-syntactic">,
37 HelpText<"Perform quick security checks that require no data flow">;
38def analysis_WarnDeadStores : Flag<"-warn-dead-stores">,
39 HelpText<"Warn about stores to dead variables">;
40def analysis_WarnUninitVals : Flag<"-warn-uninit-values">,
41 HelpText<"Warn about uses of uninitialized variables">;
42def analysis_WarnObjCMethSigs : Flag<"-warn-objc-methodsigs">,
43 HelpText<"Warn about Objective-C method signatures with type incompatibilities">;
44def analysis_WarnObjCDealloc : Flag<"-warn-objc-missing-dealloc">,
45 HelpText<"Warn about Objective-C classes that lack a correct implementation of -dealloc">;
46def analysis_WarnObjCUnusedIvars : Flag<"-warn-objc-unused-ivars">,
47 HelpText<"Warn about private ivars that are never used">;
48def analysis_CheckerCFRef : Flag<"-checker-cfref">,
49 HelpText<"Run the [Core] Foundation reference count checker">;
50def analysis_WarnSizeofPointer : Flag<"-warn-sizeof-pointer">,
51 HelpText<"Warn about unintended use of sizeof() on pointer expressions">;
52def analysis_InlineCall : Flag<"-inline-call">,
53 HelpText<"Experimental transfer function inling callees when its definition is available.">;
54
55def analyzer_store : Separate<"-analyzer-store">,
56 HelpText<"Source Code Analysis - Abstract Memory Store Models">;
57def analyzer_store_EQ : Joined<"-analyzer-store=">, Alias<analyzer_store>;
58
59def analyzer_constraints : Separate<"-analyzer-constraints">,
60 HelpText<"Source Code Analysis - Symbolic Constraint Engines">;
61def analyzer_constraints_EQ : Joined<"-analyzer-constraints=">,
62 Alias<analyzer_constraints>;
63
64def analyzer_output : Separate<"-analyzer-output">,
65 HelpText<"Source Code Analysis - Output Options">;
66def analyzer_output_EQ : Joined<"-analyzer-output=">,
67 Alias<analyzer_output>;
68
69def analyzer_opt_analyze_headers : Flag<"-analyzer-opt-analyze-headers">,
70 HelpText<"Force the static analyzer to analyze functions defined in header files">;
71def analyzer_display_progress : Flag<"-analyzer-display-progress">,
72 HelpText<"Emit verbose output about the analyzer's progress">;
73def analyzer_experimental_checks : Flag<"-analyzer-experimental-checks">,
74 HelpText<"Use experimental path-sensitive checks">;
75def analyzer_experimental_internal_checks :
76 Flag<"-analyzer-experimental-internal-checks">,
77 HelpText<"Use new default path-sensitive checks currently in testing">;
78def analyze_function : Separate<"-analyze-function">,
79 HelpText<"Run analysis on specific function">;
80def analyze_function_EQ : Joined<"-analyze-function=">, Alias<analyze_function>;
81def analyzer_eagerly_assume : Flag<"-analyzer-eagerly-assume">,
82 HelpText<"Eagerly assume the truth/falseness of some symbolic constraints">;
83def analyzer_no_purge_dead : Flag<"-analyzer-no-purge-dead">,
84 HelpText<"Don't remove dead symbols, bindings, and constraints before processing a statement">;
85def trim_egraph : Flag<"-trim-egraph">,
86 HelpText<"Only show error-related paths in the analysis graph">;
87def analyzer_viz_egraph_graphviz : Flag<"-analyzer-viz-egraph-graphviz">,
88 HelpText<"Display exploded graph using GraphViz">;
89def analyzer_viz_egraph_ubigraph : Flag<"-analyzer-viz-egraph-ubigraph">,
90 HelpText<"Display exploded graph using Ubigraph">;
91
Daniel Dunbar50a44872009-11-20 17:23:30 +000092// CodeGen Options
93
94def disable_llvm_optzns : Flag<"-disable-llvm-optzns">,
95 HelpText<"Don't run LLVM optimization passes">;
96def disable_red_zone : Flag<"-disable-red-zone">,
97 HelpText<"Do not emit code that uses the red zone.">;
98def g : Flag<"-g">, HelpText<"Generate source level debug information">;
99def fno_common : Flag<"-fno-common">,
100 HelpText<"Compile common globals like normal definitions">;
101def no_implicit_float : Flag<"-no-implicit-float">,
102 HelpText<"Don't generate implicit floating point instructions (x86-only)">;
103def fno_merge_all_constants : Flag<"-fno-merge-all-constants">,
104 HelpText<"Disallow merging of constants.">;
105def O : Joined<"-O">, HelpText<"Optimization level">;
106def Os : Flag<"-Os">, HelpText<"Optimize for size">;
Daniel Dunbar1bed0c32009-11-20 23:28:07 +0000107
108// Dependency Output Options
109def dependency_file : Separate<"-dependency-file">,
110 HelpText<"Filename (or -) to write dependency output to">;
111def sys_header_deps : Flag<"-sys-header-deps">,
112 HelpText<"Include system headers in dependency output">;
113def MT : Separate<"-MT">, HelpText<"Specify target for dependency">;
114def MP : Flag<"-MP">,
115 HelpText<"Create phony target for each dependency (other than main file)">;