[clang] c84755a - Fix scan-build-py executable lookup path
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 13 02:02:05 PDT 2021
Author: serge-sans-paille
Date: 2021-09-13T11:01:47+02:00
New Revision: c84755a046bbdcd0564693e30b2508034b06002b
URL: https://github.com/llvm/llvm-project/commit/c84755a046bbdcd0564693e30b2508034b06002b
DIFF: https://github.com/llvm/llvm-project/commit/c84755a046bbdcd0564693e30b2508034b06002b.diff
LOG: Fix scan-build-py executable lookup path
Once installed, scan-build-py doesn't know anything about its auxiliary
executable and can't find them.
Use relative path wrt. scan-build-py script.
Differential Revision: https://reviews.llvm.org/D109659
Added:
Modified:
clang/tools/scan-build-py/lib/libscanbuild/analyze.py
Removed:
################################################################################
diff --git a/clang/tools/scan-build-py/lib/libscanbuild/analyze.py b/clang/tools/scan-build-py/lib/libscanbuild/analyze.py
index 9a249a8e15cb9..d83ff2aefab98 100644
--- a/clang/tools/scan-build-py/lib/libscanbuild/analyze.py
+++ b/clang/tools/scan-build-py/lib/libscanbuild/analyze.py
@@ -39,8 +39,10 @@
__all__ = ['scan_build', 'analyze_build', 'analyze_compiler_wrapper']
-COMPILER_WRAPPER_CC = 'analyze-cc'
-COMPILER_WRAPPER_CXX = 'analyze-c++'
+scanbuild_dir = os.path.dirname(__import__('sys').argv[0])
+
+COMPILER_WRAPPER_CC = os.path.join(scanbuild_dir, '..', 'libexec', 'analyze-cc')
+COMPILER_WRAPPER_CXX = os.path.join(scanbuild_dir, '..', 'libexec', 'analyze-c++')
CTU_EXTDEF_MAP_FILENAME = 'externalDefMap.txt'
CTU_TEMP_DEFMAP_FOLDER = 'tmpExternalDefMaps'
More information about the cfe-commits
mailing list