aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/doc/src/compile.xml
diff options
context:
space:
mode:
authoralisdair sullivan <[email protected]>2016-06-06 21:52:14 -0700
committeralisdair sullivan <[email protected]>2016-06-07 12:28:18 -0700
commit60a13b64316a79edbf830811cdf113311c6547b7 (patch)
tree6069d920561c7216f8e16018daa25519b363a261 /lib/compiler/doc/src/compile.xml
parentd26c15e07229c90ba8353bd78d5406ada0f13271 (diff)
downloadotp-60a13b64316a79edbf830811cdf113311c6547b7.tar.gz
otp-60a13b64316a79edbf830811cdf113311c6547b7.tar.bz2
otp-60a13b64316a79edbf830811cdf113311c6547b7.zip
Compiler: new function env_compiler_options/0
retrieve the value of the environment variable ERL_COMPILER_OPTIONS in the same manner as used by file/2, forms/2 and output_generated/2
Diffstat (limited to 'lib/compiler/doc/src/compile.xml')
-rw-r--r--lib/compiler/doc/src/compile.xml17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml
index 954750fcdd..0fb09061b6 100644
--- a/lib/compiler/doc/src/compile.xml
+++ b/lib/compiler/doc/src/compile.xml
@@ -40,6 +40,19 @@
<funcs>
<func>
+ <name>env_compiler_options()</name>
+ <fsummary>
+ Compiler options defined via the environment variable
+ <c>ERL_COMPILER_OPTIONS</c>
+ </fsummary>
+ <desc>
+ <p>Return compiler options given via the environment variable
+ <c>ERL_COMPILER_OPTIONS</c>. If the value is a list, it is
+ returned as is. If it is not a list, it is put into a list.
+ </p>
+ </desc>
+ </func>
+ <func>
<name>file(File)</name>
<fsummary>Compiles a file.</fsummary>
<desc>
@@ -768,6 +781,10 @@ module.beam: module.erl \
if you do not want the environment variable to be consulted,
for example, if you are calling the compiler recursively from
inside a parse transform.</p>
+
+ <p>The list can be retrieved with
+ <seealso marker="#env_compiler_options/0">env_compiler_options/0</seealso>
+ .</p>
</section>
<section>