diff options
author | José Valim <[email protected]> | 2017-09-03 00:11:25 +0200 |
---|---|---|
committer | José Valim <[email protected]> | 2017-09-14 11:18:39 +0200 |
commit | 9bac40fb969bc23f0aa4e90618835fbd95b4dabc (patch) | |
tree | 5881310a92f7c878d1bb9edfd3f2aa43f99acd30 /lib/compiler/doc/src | |
parent | fdf359ff4063cf065f5355b9d13a2e76b6c9cd75 (diff) | |
download | otp-9bac40fb969bc23f0aa4e90618835fbd95b4dabc.tar.gz otp-9bac40fb969bc23f0aa4e90618835fbd95b4dabc.tar.bz2 otp-9bac40fb969bc23f0aa4e90618835fbd95b4dabc.zip |
Add compile_info option to compile
This allows compilers built on top of the compile module
to attach external compilation metadata to the compile_info
chunk.
For example, Erlang uses this chunk to store the compiler
version. Elixir and LFE may augment this by also adding
their own compiler versions, which can be useful when
debugging.
The deterministic option does not affect the user supplied
compile_info. It is therefore the responsibility of external
compilers to guarantee any added information does not violate
the determinsitic option, if such option is supported.
Finally, this code moves the building of the compile_info
options to the compile module instead of beam_asm, moving
all of the option mangling code to a single place.
Diffstat (limited to 'lib/compiler/doc/src')
-rw-r--r-- | lib/compiler/doc/src/compile.xml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index 10164890f2..b398871ddf 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -123,6 +123,17 @@ in the Efficiency Guide.</p> </item> + <tag><c>{compile_info, [{atom(), term()}]}</c></tag> + <item> + <p>Allows compilers built on top of <c>compile</c> to attach + extra compilation metadata to the <c>compile_info</c> chunk + in the generated beam file.</p> + + <p>It is advised for compilers to remove all non-deterministic + information if the <c>deterministic</c> option is supported and + it was supplied by the user.</p> + </item> + <tag><c>compressed</c></tag> <item> <p>The compiler will compress the generated object code, |