Permalink
Browse files

Make debug_info default

Add no_debug_info option.
Remove debug_info=1 option.
  • Loading branch information...
1 parent 6d75bfb commit be209f24ff12dc2518f86ebf50fced143b21782b @tuncer tuncer committed Mar 29, 2011
Showing with 12 additions and 13 deletions.
  1. +2 −2 priv/shell-completion/bash/rebar
  2. +1 −1 rebar.config
  3. +1 −1 rebar.config.sample
  4. +6 −7 src/rebar_erlc_compiler.erl
  5. +2 −2 src/rebar_eunit.erl
@@ -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}) )
View
@@ -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]}.
View
@@ -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
View
@@ -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")).

0 comments on commit be209f2

Please sign in to comment.