summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2016-06-11 19:35:57 -0400
committerGitHub <noreply@github.com>2016-06-11 19:35:57 -0400
commit095af3bfcae9e72a6197f7bf732c8612aab70ce1 (patch)
treef8020912fe16277ce551148e61801843f611ffda /src
parentdabf56646e47ba3e9c438fc86460a92e977d623c (diff)
parentaba5a721e10f5577ae8e06b10d2b9cd8fe9e0804 (diff)
Merge pull request #1232 from talentdeficit/REBAR-1184
REBAR-1184 always recompile if `ERL_COMPILER_OPTIONS` env var is set
Diffstat (limited to 'src')
-rw-r--r--src/rebar_erlc_compiler.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index 7875449..bdd1868 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -307,6 +307,7 @@ needed_files(G, ErlOpts, Dir, OutDir, SourceFiles) ->
,{i, Dir}] ++ ErlOpts,
digraph:vertex(G, Source) > {Source, filelib:last_modified(Target)}
orelse opts_changed(AllOpts, TargetBase)
+ orelse erl_compiler_opts_set()
end, SourceFiles).
maybe_rm_beam_and_edge(G, OutDir, Source) ->
@@ -339,6 +340,12 @@ compile_info(Target) ->
{error, Reason}
end.
+erl_compiler_opts_set() ->
+ case os:getenv("ERL_COMPILER_OPTIONS") of
+ false -> false;
+ _ -> true
+ end.
+
erlcinfo_file(Dir) ->
filename:join(rebar_dir:local_cache_dir(Dir), ?ERLCINFO_FILE).