aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/doc/src
diff options
context:
space:
mode:
authorJosé Valim <[email protected]>2017-02-12 22:04:36 +0100
committerJosé Valim <[email protected]>2017-02-12 22:04:36 +0100
commit36f7087ae0fe9749b776b7b013ccc0a26a494a84 (patch)
tree9a6a7e3da3b9ddaa198b32fa9931fdb77e39356c /lib/compiler/doc/src
parent1526eaead833b3bdcd3555a12e2af62c359e7868 (diff)
downloadotp-36f7087ae0fe9749b776b7b013ccc0a26a494a84.tar.gz
otp-36f7087ae0fe9749b776b7b013ccc0a26a494a84.tar.bz2
otp-36f7087ae0fe9749b776b7b013ccc0a26a494a84.zip
Add extra_chunks option to compile
This allow languages such as Elixir and LFE to attach extra chunks to the .beam file without having to parse the beam file after compilation. This commit also cleans up the interface to beam_asm, allowing chunks to be passed from the compiler without a need to change beam_asm API on every new chunk.
Diffstat (limited to 'lib/compiler/doc/src')
-rw-r--r--lib/compiler/doc/src/compile.xml11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml
index bd488a39a5..e6470b938f 100644
--- a/lib/compiler/doc/src/compile.xml
+++ b/lib/compiler/doc/src/compile.xml
@@ -418,7 +418,7 @@ module.beam: module.erl \
without module prefix to local or imported functions before
trying with auto-imported BIFs. If the BIF is to be
called, use the <c>erlang</c> module prefix in the call, not
- <c>{ no_auto_import,[{F,A}, ...]}</c>.</p>
+ <c>{no_auto_import,[{F,A}, ...]}</c>.</p>
</note>
<p>If this option is written in the source code, as a
<c>-compile</c> directive, the syntax <c>F/A</c> can be used instead
@@ -439,6 +439,15 @@ module.beam: module.erl \
</p>
</item>
+ <tag><c>{extra_chunks, [{binary(), binary()}]}</c></tag>
+ <item>
+ <p>Pass extra chunks to be stored in the <c>.beam</c> file.
+ The extra chunks must be a list of tuples with a four byte
+ binary as chunk name followed by a binary with the chunk contents.
+ See <seealso marker="stdlib:beam_lib">beam_lib</seealso> for
+ more information.
+ </p>
+ </item>
</taglist>
<p>If warnings are turned on (option <c>report_warnings</c>