Remove positive is_typechecker guards
[hiphop-php.git] / hphp / doc / command.compiler
blobe53be3b295ffd1076b76ce50a099b926e3c8f3e4
1 <h2>Compiler Command Line Options</h2>
3 = --help
5 Displays the list of command line options with short descriptions.
7 = -t, --target=TARGET
9 This sets the mode of operation for hphp. TARGET is one of <b>hhbc</b>,
10 <b>filecache</b>, and <b>run</b> (default).
12 hhbc: runs analysis on the input files and generates a repo as output.
13 run: is the same as hhbc but also runs the program.
14 filecache: only builds the static file cache.
16 = -f, --format=FORMAT
18 The possible values of FORMAT depends on the chosen target.
20 If the target is <b>lint</b> or <b>filecache</b>, the format option is unused.
22 If the target is <b>hhbc</b> or <b>run</b>, FORMAT is one of the following:
24 binary: (default) A sqlite3 repo is produced.
25 hhas: This is the same as binary, but also hhas is output for each input PHP file.
26 text: This is the same as binary, but also bytecode is output as text for each input PHP file.
27 exe: This is the same as binary, but also creates an executable with the repo embedded in it.
29 = --input-dir=PATH
31 PATH is the path to the root directory of the PHP sources.
33 = --program=NAME
35 When using the exe format or run target, NAME will be the name of the compiled
36 executable.
38 = --args=ARGUMENTS
40 When using the run target, the executable will be run with arguments ARGUMENTS.
42 = -i, --inputs=FILE
44 FILE is added to the list of input PHP files.
46 = --input-list=FILE
48 FILE is the path to a file with a list of PHP sources to add to the input
49 list. The format is one path per line.
51 = --module=DIR
53 DIR is a path to a directory. All PHP sources in that directory, including
54 subdirectories, are added to the input list.
56 = --exclude-dir=DIR
58 DIR is the path to a directory. All PHP sources in that directory, including
59 subdirectories, are excluded from the input list with the exception of
60 forced inputs.
62 = --fmodule=DIR
64 --fmodule is the same as --module, except it will override any --exclude-dir
65 commands that would affect inclusion of the PHP files.
67 = --ffile=FILE
69 FILE is included, overriding exclusion commands.
71 = --exclude-file=FILE
73 FILE is excluded from the input list, except where overridden by --ffile.
75 = --cfile=FILE
77 FILE is included in the file cache. It is not affected by exclusion commands.
79 = --cmodule=DIR
81 All static resources in DIR, including subdirectories, are added to the file
82 cache. It is not affected by exclusion commands.
84 = --parse-on-demand=BOOL (default: true)
86 If BOOL is true, then include statements in PHP sources will add files to
87 the input list as they are encountered when the filename is statically
88 knowable.
90 = --branch=STRING
92 This specifies the SVN branch for logging purposes.
94 = --revision=NUMBER
96 This specifies the SVN revision for logging purposes.
98 = -o, --output-dir=DIR
100 The compiler will place the generated sources in DIR. If this parameter is
101 not specified, the compiler will use a new directory in /tmp.
103 = --sync-dir=DIR
105 If this parameter is set, the compiler will first output to DIR, and then
106 only copy over files that have changed to the output directory. This is to
107 preserve their timestamps so that a make will not recompile unchanged files.
109 = --gen-stats=BOOL (default: false)
111 If BOOL is true, then detected errors in the code and code statistics will
112 be output to CodeError.js and Stats.js respectively in the output directory.
114 = --keep-tempdir=BOOL (default: false)
116 If no output directory is specified, the compiler will place generated sources
117 into a directory in /tmp. If BOOL is true, then this directory will not be
118 deleted after the program is compiled and, optionally, run.
120 = --config=FILE
122 This reads in a configuration file to set options. FILE should be in HDF
123 format.
125 = --config-dir=DIR (default: --input-dir)
127 This sets the root directory for configuration purposes to be DIR. All
128 relative paths passed as options will be treated as relative from this
129 directory.
131 = -v, --config-value=STRING
133 This sets a configuration option on the command line. STRING should be
134 a line of HDF, e.g. Section.Name=Value. The options settable are the same
135 as those set by --config.
137 = -d, --define=STRING
139 This sets an ini option on the command line. STRING should be a line in the
140 format expected by ini, e.g. hhvm.option=value. The options settable are the
141 same as those set by --config, when providing an .ini file.
143 = -l, --log=INT (default: -1)
145 This sets the level of logging output to standard out. The Levels are:
146 -1: If the target is run, then none, else the same as 3.
147 0: No logging
148 1: Only errors
149 2: The same as 1 plus warnings.
150 3: The same as 2 plus extra information.
151 4: All log messages.
153 = --force=BOOL (default: true)
155 Forces the compiler to generate output even if there are code errors
156 encountered.
158 = --file-cache=FILE
160 If this argument is given, a static file cache will be created with path FILE.