From 60a13b64316a79edbf830811cdf113311c6547b7 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Mon, 6 Jun 2016 21:52:14 -0700 Subject: 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 --- lib/compiler/src/compile.erl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/compiler/src/compile.erl') diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl index 149086152a..82ff8a95f3 100644 --- a/lib/compiler/src/compile.erl +++ b/lib/compiler/src/compile.erl @@ -26,6 +26,7 @@ -export([forms/1,forms/2,noenv_forms/2]). -export([output_generated/1,noenv_output_generated/1]). -export([options/0]). +-export([env_compiler_options/0]). %% Erlc interface. -export([compile/3,compile_beam/3,compile_asm/3,compile_core/3]). @@ -130,6 +131,14 @@ noenv_output_generated(Opts) -> (_Other) -> false end, Passes). +%% +%% Retrieve ERL_COMPILER_OPTIONS as a list of terms +%% + +-spec env_compiler_options() -> [term()]. + +env_compiler_options() -> env_default_opts(). + %% %% Local functions %% -- cgit v1.2.3