[llvmlinux] scan-build/ccc-analyzer broken?

Behan Webster behanw at converseincode.com
Wed Dec 9 02:36:00 UTC 2015

On 11/01/15 19:42, Jason A. Donenfeld wrote:
> Hi Behan,
> Any update on this?
Gah. Sorry. On the road, and I thought I'd lost the wrapper script. But 
miraculously I just found where I saved a copy for safe keeping. So safe 
I forgot I put it there...

The crux of it is that you need to do a

sed "s|-isystem| -I$ISYSTEM |"

Essentially you need to install it like this:

CLANG=`which clang`
sudo mv $CLANG ${CLANG}.real
ln clang-log-wrapper.sh $CLANG

Then try running the scan-build again...

It's messy, but works...


Behan Webster
behanw at converseincode.com

--------- clang-log-wrapper.sh 

ISYSTEM=$($0.real -print-file-name=include)
ARGS=$(sed "s|-isystem| -I$ISYSTEM |" <<< $*)

     echo @@@PARENT : $(ps -ocommand= -p $PPID)
     echo @@@COMMAND: $0 $*
     echo @@@ISYSTEM: $ISYSTEM
     echo @@@NEWCMD : $0.real $ARGS
) >> $TMPDIR/clang-cli.log
exec $0.real $ARGS

More information about the LLVMLinux mailing list