This section documents the variables that control native-compilation.
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 -O0, -O1, etc. command-line options of the compiler. The value -1 means disable native-compilation: functions and files will be only byte-compiled; however, the *.eln 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 (declare (speed -1)) form, see Declare Form.) The default value is 2.
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:
No debugging output. This is the default.
Emit debugging symbols with the native code. This allows easier debugging of the native code with debuggers such as gdb.
Like 1, and in addition dump pseudo-C code.
Like 2, and in addition dump the GCC intermediate passes and libgccjit log file.
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:
No logging. This is the default.
Log the final LIMPLE representation of the code.
Log the LAP, the final LIMPLE, and some additional pass info.
Maximum verbosity: log everything.
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.
If this variable’s value is non-nil, warnings and errors from asynchronous native-compilation subprocesses are reported in the main Emacs session in a buffer named *Warnings*. The default value t means display the resulting buffer. To log warnings without popping up the *Warnings* buffer, set this variable to silent.
A common cause for asynchronous native-compilation to produce warnings is compiling a file that is missing some require 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.
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 .eln files from being written. If the value is nil, the default, Emacs will kill these subprocesses without querying.
Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
https://www.gnu.org/software/emacs/manual/html_node/elisp/Native_002dCompilation-Variables.html