[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:35:37 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe45f67f31e22: Make analyze-cc path discovery sensible to symlinks (authored by serge-sans-paille).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110521/new/

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.375152.patch
Type: text/x-patch
Size: 644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210927/d48bbe01/attachment.bin>


More information about the cfe-commits mailing list