Skip to content

Commit

Permalink
warnings_as_errors and outdir do not affect code generation
Browse files Browse the repository at this point in the history
By moving to effects_code_generation/1, there is no need
to explicitly remove those options when storing compile
information in the DebugInfo chunk.
  • Loading branch information
José Valim committed Apr 24, 2017
1 parent f2eaf88 commit 0f78f26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/compiler/src/compile.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1369,8 +1369,6 @@ keep_compile_option(from_core) -> false;
keep_compile_option({parse_transform, _}) -> false;
keep_compile_option({d, _, _}) -> false;
%% Do not affect compilation result on future calls.
keep_compile_option({outdir, _}) -> false;
keep_compile_option(warnings_as_errors) -> false;
keep_compile_option(Option) -> effects_code_generation(Option).

start_crypto() ->
Expand Down Expand Up @@ -1498,9 +1496,11 @@ effects_code_generation(Option) ->
report_errors -> false;
return_errors-> false;
return_warnings-> false;
warnings_as_errors -> false;
binary -> false;
verbose -> false;
{cwd,_} -> false;
{outdir, _} -> false;
_ -> true
end.

Expand Down

0 comments on commit 0f78f26

Please sign in to comment.