diff options
author | Joseph Wayne Norton <norton@alum.mit.edu> | 2010-11-30 00:00:02 +0100 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2010-11-30 00:24:20 +0100 |
commit | d24021f4e391f0ad7e749a5106d00ea6a404557b (patch) | |
tree | 2d87ec2ad292b83d9e59517d1bc6c74430729047 | |
parent | e36783112d9c2f0d9664819724354844b9410288 (diff) |
Add new global flag 'debug_info' to erlc_compiler
Using rebar's commandline, enable/disable 'debug_info' for
compilation. This feature if added to all rebar compilers could help
simplify and standardize this common use case for all rebar build
targets.
-rw-r--r-- | src/rebar_erlc_compiler.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index e872e2b..ef56bf4 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -99,7 +99,14 @@ doterl_compile(Config, OutDir) -> doterl_compile(Config, OutDir, MoreSources) -> FirstErls = rebar_config:get_list(Config, erl_first_files, []), - ErlOpts = filter_defines(rebar_config:get(Config, erl_opts, []), []), + RawErlOpts = filter_defines(rebar_config:get(Config, erl_opts, []), []), + ErlOpts = + case rebar_config:get_global(debug_info, "0") of + "0" -> + RawErlOpts; + _ -> + [debug_info|RawErlOpts] + end, ?DEBUG("erl_opts ~p~n",[ErlOpts]), %% Support the src_dirs option allowing multiple directories to %% contain erlang source. This might be used, for example, should |