From 9bac40fb969bc23f0aa4e90618835fbd95b4dabc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 3 Sep 2017 00:11:25 +0200 Subject: 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. --- lib/compiler/doc/src/compile.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/compiler/doc/src/compile.xml') 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.

+ {compile_info, [{atom(), term()}]} + +

Allows compilers built on top of compile to attach + extra compilation metadata to the compile_info chunk + in the generated beam file.

+ +

It is advised for compilers to remove all non-deterministic + information if the deterministic option is supported and + it was supplied by the user.

+
+ compressed

The compiler will compress the generated object code, -- cgit v1.2.3