From e9ccdb7d5024764b3d5827a33c631aed4d0d8085 Mon Sep 17 00:00:00 2001 From: Andrzej Kotulski Date: Mon, 31 Oct 2016 04:01:05 -0700 Subject: [PATCH] [clang capture] Make sure to always run clang from facebook-clang-plugins Summary: This is assumed everywhere, and so set it in `ClangWrapper` instead of `InferClang` Reviewed By: jberdine Differential Revision: D4095766 fbshipit-source-id: f77625e --- infer/src/clang/ClangWrapper.re | 2 ++ infer/src/clang/InferClang.re | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infer/src/clang/ClangWrapper.re b/infer/src/clang/ClangWrapper.re index 8fdbba0e8..8380f5a59 100644 --- a/infer/src/clang/ClangWrapper.re +++ b/infer/src/clang/ClangWrapper.re @@ -112,6 +112,8 @@ let execute_clang_command (clang_cmd: ClangCommand.t) => { }; let exe args xx_suffix => { + /* make sure args.(0) points to clang in facebook-clang-plugins */ + args.(0) = CFrontend_config.clang_bin xx_suffix; let commands = normalize args; /* xcodebuild projects may require the object files to be generated by the Apple compiler, eg to generate precompiled headers compatible with Apple's clang. */ diff --git a/infer/src/clang/InferClang.re b/infer/src/clang/InferClang.re index 597e44084..144e122e0 100644 --- a/infer/src/clang/InferClang.re +++ b/infer/src/clang/InferClang.re @@ -11,7 +11,5 @@ open! Utils; let () = { let xx_suffix = string_is_suffix "++" Sys.argv.(0) ? "++" : ""; let args = Array.copy Sys.argv; - /* make sure we don't call ourselves recursively */ - args.(0) = CFrontend_config.clang_bin xx_suffix; ClangWrapper.exe args xx_suffix };