[PATCH] D110521: Make analyze-cc path discovery sensible to symlinks
serge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 26 23:26:04 PDT 2021
serge-sans-paille created this revision.
serge-sans-paille added a reviewer: sylvestre.ledru.
Herald added a subscriber: whisperity.
serge-sans-paille requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Fix https://bugs.llvm.org/show_bug.cgi?id=51897
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D110521
Files:
clang/tools/scan-build-py/lib/libscanbuild/analyze.py
Index: clang/tools/scan-build-py/lib/libscanbuild/analyze.py
===================================================================
--- clang/tools/scan-build-py/lib/libscanbuild/analyze.py
+++ clang/tools/scan-build-py/lib/libscanbuild/analyze.py
@@ -39,7 +39,7 @@
__all__ = ['scan_build', 'analyze_build', 'analyze_compiler_wrapper']
-scanbuild_dir = os.path.dirname(__import__('sys').argv[0])
+scanbuild_dir = os.path.dirname(os.path.realpath(__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++')
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110521.375150.patch
Type: text/x-patch
Size: 644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210927/5fce50c5/attachment.bin>
More information about the cfe-commits
mailing list