[PATCH] D9600: Add scan-build python implementation
Devin Coughlin via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 16 16:29:21 PST 2015
dcoughlin added a comment.
Thanks for adding `bear_get_environment()` to handle the environment weirdness on Darwin.
================
Comment at: tools/scan-build-py/libscanbuild/intercept.py:146
@@ +145,3 @@
+ })
+ elif sys.platform == 'darwin':
+ logging.debug('intercept gonna preload libear on OSX')
----------------
Can you change this to default to compiler-wrapper interposition on Darwin with a command-line flag to force library-based interposition?
Library-based interposition will fail silently if SIP is enabled, so this should be detected when that flag is passed so the user is informed. You can detect whether SIP is enabled on Darwin by checking whether (1) there is a binary called 'csrutil' in the path and, if so, (2) whether the output of executing 'csrutil status' contains 'System Integrity Protection status: enabled'.
http://reviews.llvm.org/D9600
More information about the cfe-commits
mailing list