summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar_erlc_compiler.erl13
-rw-r--r--src/rebar_eunit.erl4
2 files changed, 8 insertions, 9 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index a9a8360..21db366 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -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
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl
index d4ebe0c..67132cc 100644
--- a/src/rebar_eunit.erl
+++ b/src/rebar_eunit.erl
@@ -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")).