mirror of
https://github.com/correl/rebar.git
synced 2024-12-24 03:00:16 +00:00
Make debug_info default
Add no_debug_info option. Remove debug_info=1 option.
This commit is contained in:
parent
6d75bfbeb0
commit
be209f24ff
5 changed files with 12 additions and 13 deletions
|
@ -11,8 +11,8 @@ _rebar()
|
|||
cmdsnvars="build-plt check-plt check-deps clean compile \
|
||||
create create-app create-node ct dialyze doc delete-deps eunit \
|
||||
get-deps generate generate-upgrade help list-templates update-deps \
|
||||
version xref case= debug_info=1 force=1 jobs= suite= verbose=1 \
|
||||
appid= previous_release= skip_deps=1 template= template_dir="
|
||||
version xref case= force=1 jobs= suite= verbose=1 appid= \
|
||||
previous_release= skip_deps=1 template= template_dir="
|
||||
|
||||
if [[ ${cur} == --* ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${lopts}" -- ${cur}) )
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{app_bin, ["priv/rebar"]}.
|
||||
{erl_opts, [fail_on_warning, debug_info]}.
|
||||
{erl_opts, [fail_on_warning]}.
|
||||
{xref_checks, [undefined_function_calls]}.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
{erl_first_files, ["mymib1", "mymib2"]}.
|
||||
|
||||
%% Erlang compiler options
|
||||
{erl_opts, [{i, "myinclude"}, {src_dirs, ["src1", "src2"]},
|
||||
{erl_opts, [no_debug_info, {i, "myinclude"}, {src_dirs, ["src1", "src2"]},
|
||||
{platform_define,
|
||||
"(linux|solaris|freebsd|darwin)", 'HAVE_SENDFILE'},
|
||||
{platform_define, "(linux|freebsd)", 'BACKLOG', 128},
|
||||
|
|
|
@ -118,13 +118,12 @@ doterl_compile(Config, OutDir) ->
|
|||
doterl_compile(Config, OutDir, MoreSources) ->
|
||||
FirstErls = rebar_config:get_list(Config, erl_first_files, []),
|
||||
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,
|
||||
ErlOpts = case proplists:is_defined(no_debug_info, RawErlOpts) of
|
||||
true ->
|
||||
[O || O <- RawErlOpts, O =/= no_debug_info];
|
||||
_ ->
|
||||
[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
|
||||
|
|
|
@ -182,14 +182,14 @@ eunit_config(Config) ->
|
|||
|
||||
ErlOpts = rebar_config:get_list(Config, erl_opts, []),
|
||||
EunitOpts = rebar_config:get_list(Config, eunit_compile_opts, []),
|
||||
Opts = [{d, 'TEST'}, debug_info] ++
|
||||
Opts0 = [{d, 'TEST'}] ++
|
||||
ErlOpts ++ EunitOpts ++ EqcOpts ++ PropErOpts,
|
||||
Opts = [O || O <- Opts0, O =/= no_debug_info],
|
||||
Config1 = rebar_config:set(Config, erl_opts, Opts),
|
||||
|
||||
FirstErls = rebar_config:get_list(Config1, eunit_first_files, []),
|
||||
rebar_config:set(Config1, erl_first_files, FirstErls).
|
||||
|
||||
|
||||
eqc_opts() ->
|
||||
define_if('EQC', is_lib_avail(is_eqc_avail, eqc,
|
||||
"eqc.hrl", "QuickCheck")).
|
||||
|
|
Loading…
Reference in a new issue