This file is indexed.

/usr/share/doc/mlton/guide/CompileTimeOptions is in mlton-doc 20100608-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name="robots" content="index,nofollow">



<title>CompileTimeOptions - MLton Standard ML Compiler (SML Compiler)</title>
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="all" href="common.css">
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="screen" href="screen.css">
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="print" href="print.css">


<link rel="Start" href="Home">


</head>

<body lang="en" dir="ltr">

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-833377-1";
urchinTracker();
</script>
<table bgcolor = lightblue cellspacing = 0 style = "border: 0px;" width = 100%>
  <tr>
    <td style = "
		border: 0px;
		color: darkblue; 
		font-size: 150%;
		text-align: left;">
      <a class = mltona href="Home">MLton MLTONWIKIVERSION</a>
    <td style = "
		border: 0px;
		font-size: 150%;
		text-align: center;
		width: 50%;">
      CompileTimeOptions
    <td style = "
		border: 0px;
		text-align: right;">
      <table cellspacing = 0 style = "border: 0px">
        <tr style = "vertical-align: middle;">
      </table>
  <tr style = "background-color: white;">
    <td colspan = 3
	style = "
		border: 0px;
		font-size:70%;
		text-align: right;">
      <a href = "Home">Home</a>
      &nbsp;<a href = "TitleIndex">Index</a>
      &nbsp;
</table>
<div id="content" lang="en" dir="ltr">
MLton's compile-time options control the name of the output file, the verbosity of compile-time messages, and whether or not certain optimizations are performed.  They also can specify which intermediate files are saved and can stop the compilation process early, at some intermediate pass, in which case compilation can be resumed by passing the generated files to MLton.  MLton uses the input file suffix to determine the type of input program.  The possibilities are <tt>.c</tt>, <tt>.mlb</tt>, <tt>.o</tt>, <tt>.s</tt>, and <tt>.sml</tt>. <p>
With no arguments, MLton prints the version number and exits.  For a usage message, run MLton with an invalid switch, e.g.  <tt>mlton&nbsp;-z</tt>.  In the explanation below and in the usage message, for flags that take a number of choices (e.g. <tt>{true|false}</tt>), the first value listed is the default. 
</p>
<h2 id="head-6bf5da9c080bee3a8142586c412aa39971137eee">Options</h2>

    <ul>

    <li>
<p>
 <tt>-align&nbsp;{4|8}</tt>  <br>
Aligns object sizes and doubles in memory by the specified  alignment.  The default varies depending on architecture. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-as-opt&nbsp;</tt><em>option</em>  <br>
Pass <em>option</em> to <tt>gcc</tt> when assembling. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-cc-opt&nbsp;</tt><em>option</em>  <br>
Pass <em>option</em> to <tt>gcc</tt> when compiling C code. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-codegen&nbsp;{native|x86|amd64|c}</tt>  <br>
Generate native code or C code.  With  <tt>-codegen&nbsp;native</tt> (<tt>-codegen&nbsp;x86</tt> or <tt>-codegen&nbsp;amd64</tt>), MLton typically  compiles more quickly and generates better code. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-const&nbsp;'</tt><em>name</em><tt>&nbsp;</tt><em>value</em><tt>'</tt>  <br>
Set the value of a compile-time constant.  Here is a list of  available constants, their default values, and what they control. 
</p>
</li>

        <ul>

        <li>
<p>
 <tt>Exn.keepHistory&nbsp;{false|true}</tt>   <br>
Enable <tt>MLton.Exn.history</tt>.  See <a href="MLtonExn">MLtonExn</a> for details.  There is   a performance cost to setting this to <tt>true</tt>, both in memory   usage of exceptions and in run time, because of additional work   that must be performed at each exception construction, raise, and   handle. 
</p>
</li>

        </ul>


    <li class="gap">
<p>
 <tt>-default-ann&nbsp;</tt><em>ann</em>  <br>
Specify default <a href="MLBasisAnnotations">ML Basis annotations</a>.  For  example, <tt>-default-ann&nbsp;'warnUnused&nbsp;true'</tt> causes unused  variable warnings to be enabled by default.  A default is  overridden by the corresponding annotation in an ML Basis file. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-default-type&nbsp;</tt><em>type</em>  <br>
Specify the default binding for a primitive type.  For example,  <tt>-default-type&nbsp;word64</tt> causes the top-level type <tt>word</tt>  and the top-level structure <tt>Word</tt> in the   <a href="BasisLibrary">Basis Library</a> to be equal to <tt>Word64.word</tt> and <tt>Word64:WORD</tt>,  respectively.  Similarly, <tt>-default-type&nbsp;intinf</tt> causes the  top-level type <tt>int</tt> and the top-level structure <tt>Int</tt> in  the <a href="BasisLibrary">Basis Library</a> to be equal to <tt>IntInf.int</tt>  and <tt>IntInf:INTEGER</tt>, respectively. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-disable-ann&nbsp;</tt><em>ann</em>  <br>
Ignore the specified <a href="MLBasisAnnotations">ML Basis annotation</a> in  every ML Basis file.  For example, to see <em>all</em> match and unused  warnings, compile with 
<pre>-default-ann 'warnUnused true'
-disable-ann forceUsed 
-disable-ann nonexhaustiveMatch
-disable-ann redundantMatch
-disable-ann warnUnused
</pre>
</p>
</li>
    <li class="gap">
<p>
 <tt>-export-header&nbsp;</tt><em>file</em>  <br>
Write C prototypes to <em>file</em> for all of the functions in the  program <a href="CallingFromCToSML">exported from SML to C</a>. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-ieee-fp&nbsp;{false|true}</tt>  <br>
Cause the native code generator to be pedantic about following the  IEEE floating point standard.  By default, it is not, because of  the performance cost.  This only has an effect with   <tt>-codegen&nbsp;x86</tt>.  
</p>
</li>
    <li class="gap">
<p>
 <tt>-inline&nbsp;</tt><em>n</em>  <br>
Set the inlining threshold used in the optimizer.  The threshold is  an approximate measure of code size of a procedure.  The default is  <tt>320</tt>. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-keep&nbsp;{g|o}</tt>  <br>
Save intermediate files.  If no <tt>-keep</tt> argument is given, then  only the output file is saved. 
<div>
<table>
 <tr>
<td>
 <tt>g</tt> </td>
<td>
 generated <tt>.c</tt> and <tt>.s</tt> files passed to gcc and the assembler </td>
</tr>
 <tr>
<td>
 <tt>o</tt> </td>
<td>
 object (<tt>.o</tt>) files </td>
</tr>

</p>
</table>
</div>
</li>
    <li class="gap">
<p>
 <tt>-link-opt&nbsp;</tt><em>option</em>  <br>
Pass <em>option</em> to <tt>gcc</tt> when linking.  You can use this to  specify library search paths, e.g. <tt>-link-opt&nbsp;-Lpath</tt>, and  libraries to link with, e.g. <tt>-link-opt&nbsp;-lfoo</tt>, or even both at  the same time, e.g. <tt>-link-opt&nbsp;'-Lpath&nbsp;-lfoo'</tt>.  If you wish to  pass an option to the linker, you must use <tt>gcc</tt>'s <tt>-Wl,</tt>  syntax, e.g., <tt>-link-opt&nbsp;'-Wl,--export-dynamic'</tt>. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-mlb-path-map&nbsp;</tt><em>file</em>  <br>
Use <em>file</em> as an <a href="MLBasisPathMap">ML Basis path map</a> to define  additional MLB path variables.  Multiple uses of  <tt>-mlb-path-map</tt> and <tt>-mlb-path-var</tt> are allowed, with variable definitions in later  path maps taking precedence over earlier ones. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-mlb-path-var&nbsp;'</tt><em>name</em><tt>&nbsp;</tt><em>value</em><tt>'</tt>  <br>
Define an additional MLB path variable.  Multiple uses of  <tt>-mlb-path-map</tt> and <tt>-mlb-path-var</tt> are allowed, with variable definitions in later  path maps taking precedence over earlier ones. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-output&nbsp;</tt><em>file</em>  <br>
Specify the name of the final output file. The default name is the  input file name with its suffix removed and an appropriate,  possibly empty, suffix added. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-profile&nbsp;{no|alloc|count|time}</tt>  <br>
Produce an executable that gathers <a href="Profiling">Profiling</a> data.  When  such an executable is run, it produces an <tt>mlmon.out</tt> file. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-profile-branch&nbsp;{false|true}</tt>  <br>
If true, the profiler will separately gather profiling data for   each branch of a function definition, <tt>case</tt> expression, and  <tt>if</tt> expression.  
</p>
</li>
    <li class="gap">
<p>
 <tt>-profile-stack&nbsp;{false|true}</tt>  <br>
If <tt>true</tt>, the executable will gather profiling data for all  functions on the stack, not just the currently executing function.  See <a href="ProfilingTheStack">ProfilingTheStack</a>. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-profile-val&nbsp;{false|true}</tt>  <br>
If <tt>true</tt>, the profiler will separately gather profiling data  for each (expansive) <tt>val</tt> declaration. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-runtime&nbsp;</tt><em>arg</em>  <br>
Pass argument to the runtime system via <tt>@MLton</tt>.  See  <a href="RunTimeOptions">RunTimeOptions</a>.  The argument will be processed before other  <tt>@MLton</tt> command line switches.  Multiple uses of  <tt>-runtime</tt> are allowed, and will pass all the arguments in  order.  If the same runtime switch occurs more than once, then the  last setting will take effect.  There is no need to supply the  leading <tt>@MLton</tt> or the trailing <tt>--</tt>; these will be  supplied automatically. 
</p>
<p>
 An argument to <tt>-runtime</tt> may contain spaces, which will cause  the argument to be treated as a sequence of words by the runtime.  For example the command line: 
</p>
 
<pre>mlton -runtime 'ram-slop 0.4' foo.sml</pre><p>
 will cause <tt>foo</tt> to run as if it had been called like: 
</p>
 
<pre>foo @MLton ram-slop 0.4 --</pre><p>
 An executable created with <tt>-runtime&nbsp;stop</tt> doesn't process any  <tt>@MLton</tt> arguments.  This is useful to create an executable,  e.g. <tt>echo</tt>, that must treat <tt>@MLton</tt> like any other  command-line argument.  
</p>
 
<pre>% mlton -runtime stop echo.sml
% echo @MLton --
@MLton --</pre></li>
    <li class="gap">
<p>
 <tt>-show-basis&nbsp;</tt><em>file</em>  <br>
Pretty print to <em>file</em> the basis defined by the input program.  See <a href="ShowBasis">ShowBasis</a>. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-show-def-use&nbsp;</tt><em>file</em>  <br>
Output def-use information to <em>file</em>.  Each identifier that is  defined appears on a line, followed on subsequent lines by the  position of each use. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-stop&nbsp;{f|g|o|tc}</tt>  <br>
Specify when to stop. 
<div>
<table>
 <tr>
<td>
 <tt>f</tt> </td>
<td>
 list of files on stdout (only makes sense when input is <tt>foo.mlb</tt>) </td>
</tr>
 <tr>
<td>
 <tt>g</tt> </td>
<td>
 generated <tt>.c</tt> and <tt>.s</tt> files </td>
</tr>
 <tr>
<td>
 <tt>o</tt> </td>
<td>
 object (<tt>.o</tt>) files </td>
</tr>
 <tr>
<td>
 <tt>tc</tt> </td>
<td>
after type checking </td>
</tr>

</p>
</table>
</div>
<p>
 If you compile with <tt>-stop&nbsp;g</tt> or <tt>-stop&nbsp;o</tt>, you can resume  compilation by running MLton on the generated <tt>.c</tt> and <tt>.s</tt>  or <tt>.o</tt> files.  
</p>
</li>
    <li class="gap">
<p>
 <tt>-target&nbsp;{self|</tt><em>...</em><tt>}</tt>  <br>
Generate an executable that runs on the specified platform.  The  default is <tt>self</tt>, which means to compile for the machine that  MLton is running on.  To use any other target, you must first  install a <a href="CrossCompiling"> cross compiler</a>. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-target-as-opt&nbsp;</tt><em>target</em><tt>&nbsp;</tt><em>option</em>  <br>
Like <tt>-as-opt</tt>, this passes <em>option</em> to <tt>gcc</tt> when  assembling, except it only passes <em>option</em> when the target architecture  or operating system is <em>target</em>.  Valid values for <em>target</em>  are: <tt>amd64</tt>, <tt>hppa</tt>, <tt>powerpc</tt>, <tt>sparc</tt>, <tt>x86</tt>,  <tt>cygwin</tt>, <tt>darwin</tt>, <tt>freebsd</tt>, <tt>hpux</tt>, <tt>linux</tt>,  <tt>mingw</tt>, <tt>netbsd</tt>, <tt>openbsd</tt>, <tt>solaris</tt>. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-target-cc-opt&nbsp;</tt><em>target</em><tt>&nbsp;</tt><em>option</em>  <br>
Like <tt>-cc-opt</tt>, this passes <em>option</em> to <tt>gcc</tt> when compiling  C code, except it only passes <em>option</em> when the target architecture  or operating system is <em>target</em>.  Valid values for <em>target</em> are  as for <tt>-target-as-opt</tt>. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-target-link-opt&nbsp;</tt><em>target</em><tt>&nbsp;</tt><em>option</em>  <br>
Like <tt>-link-opt</tt>, this passes <em>option</em> to <tt>gcc</tt> when  linking, except it only passes <em>option</em> when the target architecture  or operating system is <em>target</em>.  Valid values for <em>target</em> are  as for <tt>-target-as-opt</tt>. 
</p>
</li>
    <li class="gap">
<p>
 <tt>-verbose&nbsp;{0|1|2|3}</tt>  <br>
How verbose to be about what passes are running.  The default is  <tt>0</tt>. 
<div>
<table>
 <tr>
<td>
 <tt>0</tt> </td>
<td>
 silent </td>
</tr>
 <tr>
<td>
 <tt>1</tt> </td>
<td>
 calls to compiler, assembler, and linker </td>
</tr>
 <tr>
<td>
 <tt>2</tt> </td>
<td>
 1, plus intermediate compiler passes </td>
</tr>
 <tr>
<td>
 <tt>3</tt> </td>
<td>
 2, plus some data structure sizes </td>
</tr>

</p>
</table>
</div>
</li>
</ul>

</div>



<p>
<hr>
Last edited on 2010-04-06 17:50:15 by <span title="129.21.75.73"><a href="MatthewFluet">MatthewFluet</a></span>.
</body></html>