1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<h3 class="section">Native-Compilation Variables</h3> <p>This section documents the variables that control native-compilation. </p> <dl> <dt id="native-comp-speed">User Option: <strong>native-comp-speed</strong>
</dt> <dd><p>This variable specifies the optimization level for native compilation. Its value should be a number between -1 and 3. Values between 0 and 3 specify the optimization levels equivalent to the corresponding compiler <samp>-O0</samp>, <samp>-O1</samp>, etc. command-line options of the compiler. The value -1 means disable native-compilation: functions and files will be only byte-compiled; however, the <samp>*.eln</samp> files will still be produced, they will just contain the compiled code in bytecode form. (This can be achieved at function granularity by using the <code>(declare (speed <span class="nolinebreak">-1))</span></code> form, see <a href="declare-form">Declare Form</a>.) The default value is 2. </p></dd>
</dl> <dl> <dt id="native-comp-debug">User Option: <strong>native-comp-debug</strong>
</dt> <dd>
<p>This variable specifies the level of debugging information produced by native-compilation. Its value should be a number between zero and 3, with the following meaning: </p> <dl compact> <dt>0</dt> <dd><p>No debugging output. This is the default. </p></dd> <dt>1</dt> <dd><p>Emit debugging symbols with the native code. This allows easier debugging of the native code with debuggers such as <code>gdb</code>. </p></dd> <dt>2</dt> <dd><p>Like 1, and in addition dump pseudo-C code. </p></dd> <dt>3</dt> <dd><p>Like 2, and in addition dump the GCC intermediate passes and <samp>libgccjit</samp> log file. </p></dd> </dl> </dd>
</dl> <dl> <dt id="native-comp-verbose">User Option: <strong>native-comp-verbose</strong>
</dt> <dd>
<p>This variable controls the verbosity of native-compilation by suppressing some or all of the log messages emitted by it. If its value is zero, the default, all of the log messages are suppressed. Setting it to a value between 1 and 3 will allow logging of the messages whose level is above the value. The values have the following interpretations: </p> <dl compact> <dt>0</dt> <dd><p>No logging. This is the default. </p></dd> <dt>1</dt> <dd><p>Log the final <acronym>LIMPLE</acronym> representation of the code. </p></dd> <dt>2</dt> <dd><p>Log the <acronym>LAP</acronym>, the final <acronym>LIMPLE</acronym>, and some additional pass info. </p></dd> <dt>3</dt> <dd><p>Maximum verbosity: log everything. </p></dd> </dl> </dd>
</dl> <dl> <dt id="native-comp-async-jobs-number">User Option: <strong>native-comp-async-jobs-number</strong>
</dt> <dd><p>This variable determines the maximum number of native-compilation subprocesses that will be started simultaneously. It should be a non-negative number. The default value is zero, which means use half the number of the CPU execution units, or 1 if the CPU has only one execution unit. </p></dd>
</dl> <dl> <dt id="native-comp-async-report-warnings-errors">User Option: <strong>native-comp-async-report-warnings-errors</strong>
</dt> <dd>
<p>If this variable’s value is non-<code>nil</code>, warnings and errors from asynchronous native-compilation subprocesses are reported in the main Emacs session in a buffer named <samp>*Warnings*</samp>. The default value <code>t</code> means display the resulting buffer. To log warnings without popping up the <samp>*Warnings*</samp> buffer, set this variable to <code>silent</code>. </p> <p>A common cause for asynchronous native-compilation to produce warnings is compiling a file that is missing some <code>require</code> of a necessary feature. The feature may be loaded into the main emacs, but because native compilation always starts from a subprocess with a pristine environment, that may not be true for the subprocess. </p>
</dd>
</dl> <dl> <dt id="native-comp-async-query-on-exit">User Option: <strong>native-comp-async-query-on-exit</strong>
</dt> <dd><p>If this variable’s value is non-nil, Emacs will query upon exiting whether to exit and kill any asynchronous native-compilation subprocesses that are still running, thus preventing the corresponding <samp>.eln</samp> files from being written. If the value is <code>nil</code>, the default, Emacs will kill these subprocesses without querying. </p></dd>
</dl><div class="_attribution">
<p class="_attribution-p">
Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
<a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Native_002dCompilation-Variables.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Native_002dCompilation-Variables.html</a>
</p>
</div>
|