|
|
@ -363,7 +363,8 @@ let fail_on_issue_epilogue () =
|
|
|
|
| None -> ()
|
|
|
|
| None -> ()
|
|
|
|
|
|
|
|
|
|
|
|
let log_build_cmd build_mode build_cmd =
|
|
|
|
let log_build_cmd build_mode build_cmd =
|
|
|
|
if Config.debug_mode || Config.stats_mode then (
|
|
|
|
L.out "INFER_ARGS=%s@." (Option.value (Sys.getenv CLOpt.args_env_var) ~default:"<not found>");
|
|
|
|
|
|
|
|
L.out "Project root = %s@." Config.project_root;
|
|
|
|
let log_arg arg =
|
|
|
|
let log_arg arg =
|
|
|
|
L.out "Arg: %s@\n" arg;
|
|
|
|
L.out "Arg: %s@\n" arg;
|
|
|
|
if (build_mode = Java || build_mode = Javac) && (String.is_prefix arg ~prefix:"@") then (
|
|
|
|
if (build_mode = Java || build_mode = Javac) && (String.is_prefix arg ~prefix:"@") then (
|
|
|
@ -377,7 +378,6 @@ let log_build_cmd build_mode build_cmd =
|
|
|
|
L.out " Error reading file '%s':@\n %a@." fname Exn.pp exn
|
|
|
|
L.out " Error reading file '%s':@\n %a@." fname Exn.pp exn
|
|
|
|
) in
|
|
|
|
) in
|
|
|
|
List.iter ~f:log_arg build_cmd
|
|
|
|
List.iter ~f:log_arg build_cmd
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let () =
|
|
|
|
let () =
|
|
|
|
let build_cmd = IList.rev Config.rest in
|
|
|
|
let build_cmd = IList.rev Config.rest in
|
|
|
@ -396,11 +396,11 @@ let () =
|
|
|
|
L.set_log_file_identifier Config.current_exe None ;
|
|
|
|
L.set_log_file_identifier Config.current_exe None ;
|
|
|
|
if Config.print_builtins then Builtin.print_and_exit () ;
|
|
|
|
if Config.print_builtins then Builtin.print_and_exit () ;
|
|
|
|
if Config.is_originator then L.do_out "%s@\n" Config.version_string ;
|
|
|
|
if Config.is_originator then L.do_out "%s@\n" Config.version_string ;
|
|
|
|
|
|
|
|
if Config.debug_mode || Config.stats_mode then log_build_cmd build_mode build_cmd;
|
|
|
|
(* infer might be called from a Makefile and itself uses `make` to run the analysis in parallel,
|
|
|
|
(* infer might be called from a Makefile and itself uses `make` to run the analysis in parallel,
|
|
|
|
but cannot communicate with the parent make command. Since infer won't interfere with them
|
|
|
|
but cannot communicate with the parent make command. Since infer won't interfere with them
|
|
|
|
anyway, pretend that we are not called from another make to prevent make falling back to a
|
|
|
|
anyway, pretend that we are not called from another make to prevent make falling back to a
|
|
|
|
mono-threaded execution. *)
|
|
|
|
mono-threaded execution. *)
|
|
|
|
log_build_cmd build_mode build_cmd;
|
|
|
|
|
|
|
|
Unix.unsetenv "MAKEFLAGS";
|
|
|
|
Unix.unsetenv "MAKEFLAGS";
|
|
|
|
register_perf_stats_report () ;
|
|
|
|
register_perf_stats_report () ;
|
|
|
|
touch_start_file () ;
|
|
|
|
touch_start_file () ;
|
|
|
|