1 <h2>Compiler Command Line Options</h2>
5 Displays the list of command line options with short descriptions.
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.
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.
31 PATH is the path to the root directory of the PHP sources.
35 When using the exe format or run target, NAME will be the name of the compiled
40 When using the run target, the executable will be run with arguments ARGUMENTS.
44 FILE is added to the list of input PHP files.
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.
53 DIR is a path to a directory. All PHP sources in that directory, including
54 subdirectories, are added to the input list.
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
64 --fmodule is the same as --module, except it will override any --exclude-dir
65 commands that would affect inclusion of the PHP files.
69 FILE is included, overriding exclusion commands.
73 FILE is excluded from the input list, except where overridden by --ffile.
77 FILE is included in the file cache. It is not affected by exclusion commands.
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
92 This specifies the SVN branch for logging purposes.
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.
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.
122 This reads in a configuration file to set options. FILE should be in HDF
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
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.
149 2: The same as 1 plus warnings.
150 3: The same as 2 plus extra information.
153 = --force=BOOL (default: true)
155 Forces the compiler to generate output even if there are code errors
160 If this argument is given, a static file cache will be created with path FILE.