aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
diff options
context:
space:
mode:
authorJames Fish <[email protected]>2014-06-19 22:32:24 +0100
committerJames Fish <[email protected]>2014-07-16 14:11:29 +0100
commit80095fe4ee85f7374757472897581b9943363417 (patch)
treecd94a608fa453d79b3fa2597e51a50705fcc6d35 /lib/dialyzer/src/dialyzer_analysis_callgraph.erl
parentc9e36ab16034bb7fe71f772df6bba22070976bbf (diff)
downloadotp-80095fe4ee85f7374757472897581b9943363417.tar.gz
otp-80095fe4ee85f7374757472897581b9943363417.tar.bz2
otp-80095fe4ee85f7374757472897581b9943363417.zip
Use compile options when dialyzing beam files
Fetch the compile options from beam files, and use them when creating core from the abstract code. Previously the options were ignored. Test by Henrik Nordh
Diffstat (limited to 'lib/dialyzer/src/dialyzer_analysis_callgraph.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_analysis_callgraph.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
index 6a33a2acb3..af1c2b7e3a 100644
--- a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
@@ -373,7 +373,16 @@ compile_byte(File, Callgraph, CServer, UseContracts) ->
{error, " Could not get abstract code for: " ++ File ++ "\n" ++
" Recompile with +debug_info or analyze starting from source code"};
{ok, AbstrCode} ->
- compile_common(File, AbstrCode, [], Callgraph, CServer, UseContracts)
+ compile_byte(File, AbstrCode, Callgraph, CServer, UseContracts)
+ end.
+
+compile_byte(File, AbstrCode, Callgraph, CServer, UseContracts) ->
+ case dialyzer_utils:get_compile_options_from_beam(File) of
+ error ->
+ {error, " Could not get compile options for: " ++ File ++ "\n" ++
+ " Recompile or analyze starting from source code"};
+ {ok, CompOpts} ->
+ compile_common(File, AbstrCode, CompOpts, Callgraph, CServer, UseContracts)
end.
compile_common(File, AbstrCode, CompOpts, Callgraph, CServer, UseContracts) ->