diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-10-23 01:12:19 +0200 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-10-23 01:12:54 +0200 |
commit | 8eeca123e50f355c51faf53b2e9185dde25e2f6f (patch) | |
tree | b7ac89a302d8f49f1ee2a92584d55b0281733d45 | |
parent | a0dcc624d921dec20f796ac858f14582a7fc80a2 (diff) |
Cleanup and fix -D for erl_opts
-rw-r--r-- | src/rebar_erlc_compiler.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index 447cb7c..edb8156 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -166,13 +166,13 @@ doterl_compile(Config, OutDir, MoreSources) -> erl_opts(Config) -> RawErlOpts = filter_defines(rebar_config:get(Config, erl_opts, []), []), - GlobalDefines = lists:map(fun(D) -> list_to_atom(D) end, - rebar_config:get_global(defines, [])), + GlobalDefines = [{d, list_to_atom(D)} || + D <- rebar_config:get_global(defines, [])], Opts = GlobalDefines ++ RawErlOpts, case proplists:is_defined(no_debug_info, Opts) of true -> [O || O <- Opts, O =/= no_debug_info]; - _ -> + false -> [debug_info|Opts] end. |