From 8d3e7e774ee7281ce66807f7ab0b30679925aeae Mon Sep 17 00:00:00 2001 From: Andrzej Kotulski Date: Wed, 15 Jun 2016 03:12:31 -0700 Subject: [PATCH] Move location of clang installation Reviewed By: jvillard Differential Revision: D3392474 fbshipit-source-id: 2434e6c --- Makefile | 4 ++-- configure.ac | 4 ++-- facebook-clang-plugins | 2 +- infer/lib/clang_wrappers/filter_args_and_run_fcp_clang.sh | 4 ++-- infer/lib/python/inferlib/capture/buck.py | 1 + infer/tests/build_systems/build_integration_tests.py | 4 ++-- infer/tests/utils/InferRunner.java | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index b1cbf49db..7e7d4ffb5 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,7 @@ install: infer inferTraceBugs ifeq ($(BUILD_C_ANALYZERS),yes) test -d $(DESTDIR)$(libdir)/infer/facebook-clang-plugins/libtooling/build/ || \ $(MKDIR_P) $(DESTDIR)$(libdir)/infer/facebook-clang-plugins/libtooling/build/ - @for i in $$(find facebook-clang-plugins/clang/ -not -wholename 'src/*' -type d); do \ + @for i in $$(find facebook-clang-plugins/clang/install -type d); do \ test -d $(DESTDIR)$(libdir)/infer/$$i || \ $(MKDIR_P) $(DESTDIR)$(libdir)/infer/$$i; \ done @@ -164,7 +164,7 @@ endif ifeq ($(BUILD_C_ANALYZERS),yes) $(INSTALL_DATA) -C facebook-clang-plugins/libtooling/build/FacebookClangPlugin.dylib \ $(DESTDIR)$(libdir)/infer/facebook-clang-plugins/libtooling/build/FacebookClangPlugin.dylib - @for i in $$(find facebook-clang-plugins/clang/ -not -wholename 'src/*' -not -name setup.sh -not -name installed.version -not -type d); do \ + @for i in $$(find facebook-clang-plugins/clang/install -not -type d); do \ $(INSTALL_PROGRAM) -C $$i $(DESTDIR)$(libdir)/infer/$$i; \ done @for i in $$(find infer/lib/clang_wrappers/*); do \ diff --git a/configure.ac b/configure.ac index 2afe8cb1a..49aba94ae 100644 --- a/configure.ac +++ b/configure.ac @@ -44,9 +44,9 @@ IS_FACEBOOK_TREE=$is_facebook_tree AC_SUBST([IS_FACEBOOK_TREE]) # to compile the facebook-clang-plugins -AC_ARG_VAR([CLANG_PREFIX], [directory where clang is installed (defaults=$PWD/facebook-clang-plugins/clang)]) +AC_ARG_VAR([CLANG_PREFIX], [directory where clang is installed (defaults=$PWD/facebook-clang-plugins/clang/install)]) AS_IF([test "x$CLANG_PREFIX" = "x"], [ - CLANG_PREFIX="$(pwd)/facebook-clang-plugins/clang" + CLANG_PREFIX="$(pwd)/facebook-clang-plugins/clang/install" ]) AC_ARG_VAR([CLANG_INCLUDES], [clang headers directories (defaults=$CLANG_PREFIX/include)]) diff --git a/facebook-clang-plugins b/facebook-clang-plugins index e7dc6d748..05c9e572c 160000 --- a/facebook-clang-plugins +++ b/facebook-clang-plugins @@ -1 +1 @@ -Subproject commit e7dc6d748b53d2ea7b6d9cb84e423c664a633ace +Subproject commit 05c9e572c2375be02a0c70de22ada0389f444774 diff --git a/infer/lib/clang_wrappers/filter_args_and_run_fcp_clang.sh b/infer/lib/clang_wrappers/filter_args_and_run_fcp_clang.sh index 1bd7d9680..43c9c6772 100755 --- a/infer/lib/clang_wrappers/filter_args_and_run_fcp_clang.sh +++ b/infer/lib/clang_wrappers/filter_args_and_run_fcp_clang.sh @@ -6,14 +6,14 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -CLANG_COMPILER="${SCRIPT_DIR}/../../../facebook-clang-plugins/clang/bin/clang" +CLANG_COMPILER="${SCRIPT_DIR}/../../../facebook-clang-plugins/clang/install/bin/clang" # WARNING: use at your own risk, not needed in most cases # Path that points to clang internal headers to be replaced with # path to infer's clang internal headers. CLANG_INCLUDE_TO_REPLACE="${FCP_CLANG_INCLUDE_TO_REPLACE}" -CLANG_LIB_INCLUDE="${SCRIPT_DIR}/../../../facebook-clang-plugins/clang/lib/clang/3.8.0/include" +CLANG_LIB_INCLUDE="${SCRIPT_DIR}/../../../facebook-clang-plugins/clang/install/lib/clang/3.8.0/include" if [ "${0%++}" != "$0" ]; then XX="++"; else XX=""; fi diff --git a/infer/lib/python/inferlib/capture/buck.py b/infer/lib/python/inferlib/capture/buck.py index 6fa5b5254..c32e6de2c 100644 --- a/infer/lib/python/inferlib/capture/buck.py +++ b/infer/lib/python/inferlib/capture/buck.py @@ -92,6 +92,7 @@ class BuckAnalyzer: clang_path = os.path.join( facebook_clang_plugins_root, 'clang', + 'install', 'bin', 'clang', ) diff --git a/infer/tests/build_systems/build_integration_tests.py b/infer/tests/build_systems/build_integration_tests.py index b43493f71..aa73c9ea1 100755 --- a/infer/tests/build_systems/build_integration_tests.py +++ b/infer/tests/build_systems/build_integration_tests.py @@ -40,8 +40,8 @@ from inferlib import config, issues, utils ROOT_DIR = os.path.join(SCRIPT_DIR, os.pardir, os.pardir, os.pardir) -CLANG_BIN = os.path.join(ROOT_DIR, - 'facebook-clang-plugins', 'clang', 'bin', 'clang') +CLANG_BIN = os.path.join(ROOT_DIR, 'facebook-clang-plugins', 'clang', + 'install', 'bin', 'clang') REPORT_JSON = 'report.json' diff --git a/infer/tests/utils/InferRunner.java b/infer/tests/utils/InferRunner.java index 9d7b3859d..fc802f46c 100644 --- a/infer/tests/utils/InferRunner.java +++ b/infer/tests/utils/InferRunner.java @@ -53,7 +53,7 @@ public class InferRunner { }; private static final String CXX_INCLUDE_DIR = - "/facebook-clang-plugins/clang/include/c++/v1/"; + "/facebook-clang-plugins/clang/install/include/c++/v1/"; private static final String IPHONESIMULATOR_ISYSROOT_SUFFIX = "/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk";