diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-03-29 13:44:02 +0200 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-03-30 11:19:37 +0200 |
commit | be209f24ff12dc2518f86ebf50fced143b21782b (patch) | |
tree | 9aa13fead68d3b8748930c6ba3aa03ed02f315b7 /src | |
parent | 6d75bfbeb0c981e25c1b30b481118ea52a3b377e (diff) |
Make debug_info default
Add no_debug_info option.
Remove debug_info=1 option.
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_erlc_compiler.erl | 13 | ||||
-rw-r--r-- | src/rebar_eunit.erl | 4 |
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")). |