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.
This commit is contained in:
Joseph Wayne Norton 2010-11-30 00:00:02 +01:00 committed by Tuncer Ayaz
parent e36783112d
commit d24021f4e3

View file

@ -99,7 +99,14 @@ doterl_compile(Config, OutDir) ->
doterl_compile(Config, OutDir, MoreSources) -> doterl_compile(Config, OutDir, MoreSources) ->
FirstErls = rebar_config:get_list(Config, erl_first_files, []), 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]), ?DEBUG("erl_opts ~p~n",[ErlOpts]),
%% Support the src_dirs option allowing multiple directories to %% Support the src_dirs option allowing multiple directories to
%% contain erlang source. This might be used, for example, should %% contain erlang source. This might be used, for example, should