From ba5e04cf398594440f2bb13e427931e243b9d778 Mon Sep 17 00:00:00 2001 From: Jules Villard <jul@fb.com> Date: Wed, 7 Jun 2017 05:30:07 -0700 Subject: [PATCH] [clang] save temporary clang commands into /tmp Summary: We were saving them in infer-out/clang/ but that's bad for Buck's cache as these files have randomly-generated names. Reviewed By: dulmarod Differential Revision: D5191884 fbshipit-source-id: b3a478b --- infer/src/integration/CaptureCompilationDatabase.ml | 4 +--- infer/src/integration/ClangQuotes.re | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/infer/src/integration/CaptureCompilationDatabase.ml b/infer/src/integration/CaptureCompilationDatabase.ml index 3367a756a..a5da7db47 100644 --- a/infer/src/integration/CaptureCompilationDatabase.ml +++ b/infer/src/integration/CaptureCompilationDatabase.ml @@ -123,9 +123,7 @@ let get_compilation_database_files_buck ~prog ~args = (** Compute the compilation database files. *) let get_compilation_database_files_xcodebuild ~prog ~args = - let temp_dir = Config.results_dir ^/ "clang" in - Utils.create_dir temp_dir; - let tmp_file = Filename.temp_file ~in_dir:temp_dir "cdb" ".json" in + let tmp_file = Filename.temp_file "cdb" ".json" in let xcodebuild_prog, xcodebuild_args = prog, prog::args in let xcpretty_prog = "xcpretty" in let xcpretty_args = diff --git a/infer/src/integration/ClangQuotes.re b/infer/src/integration/ClangQuotes.re index 07de124f3..9d2097c9a 100644 --- a/infer/src/integration/ClangQuotes.re +++ b/infer/src/integration/ClangQuotes.re @@ -33,9 +33,7 @@ let quote style => }; let mk_arg_file prefix style args => { - let temp_dir = Config.results_dir ^\/ "clang"; - Utils.create_dir temp_dir; - let file = Filename.temp_file in_dir::temp_dir prefix ".txt"; + let file = Filename.temp_file prefix ".txt"; let write_args outc => output_string outc (List.map f::(quote style) args |> String.concat sep::" "); Utils.with_file_out file f::write_args |> ignore;