summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar_erlc_compiler.erl9
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