Date: Wed, 11 Feb 2015 22:43:07 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Craig Rodrigues <rodrigc@FreeBSD.org> Cc: "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>, freebsd-toolchain@freebsd.org Subject: Re: clang and scanbuild Message-ID: <08E18A70-59E0-441D-A705-0F3F3B7B9998@FreeBSD.org> In-Reply-To: <CAG=rPVc7nccxPSiBZXyHZ09d1gc597h_aok5vONtE07RvNz0-Q@mail.gmail.com> References: <CAG=rPVc7nccxPSiBZXyHZ09d1gc597h_aok5vONtE07RvNz0-Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_79B07EDB-D1FD-44AA-A02E-92B5BDCE6843 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 11 Feb 2015, at 22:17, Craig Rodrigues <rodrigc@FreeBSD.org> wrote: > > We currently have a Jenkins job which checks out llvm trunk and builds > it like this: > > svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm > cd llvm > ./configure --enable-optimized --disable-assertions --disable-docs > --enable-targets=host \ > --with-c-include-dirs=${WORKDIR}/obj${WORKDIR}/src/tmp/usr/include \ > --with-cxx-include-root=${WORKDIR}/obj${WORKDIR}/src/tmp/usr/include > > gmake -j4 > > cp -p ./tools/clang/tools/scan-build/scan-build \ > ./tools/clang/tools/scan-build/scanview.css \ > ./tools/clang/tools/scan-build/sorttable.js \ > Release/bin > > cp -p ./tools/clang/tools/scan-build/ccc-analyzer \ > ./tools/clang/tools/scan-build/c++-analyzer \ > Release/bin > > We then do this to invoke scan-build over the FreeBSD tree: > > /usr/bin/time -l \ > env CCC_ANALYZER_CHECKER_DEADCODE=0 \ > ${SCAN_BUILD} \ > --use-cc ${OBJ}${SRCDIR}/tmp/usr/bin/cc \ > --use-c++ ${OBJ}${SRCDIR}/tmp/usr/bin/c++ \ > -k -o $output make ${JFLAG} $MYFLAGS \ > CROSS_COMPILER_PREFIX=${OBJ}${SRCDIR}/tmp/usr/bin/ "$@" > > > We can continue to do this, but I was wondering if: > (1) is there a FreeBSD port which has this stuff? Yes, choose either lang/clang-devel, or lang/clangXY, where XY is the version you are interested in. > (2) is there enough llvm source in FreeBSD that we can build this in > FreeBSD instead of checking out llvm source? You can already run the analyzers with the clang executable in base, unless you built your world using WITHOUT_CLANG_FULL. You do need perl installed, of course. -Dimitry --Apple-Mail=_79B07EDB-D1FD-44AA-A02E-92B5BDCE6843 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.26 iEYEARECAAYFAlTbzO8ACgkQsF6jCi4glqNQggCfTqmQOW91hK7rYwSmS9V17S5k ej8AoLq0QwUcWLKAiZCpcRqsFThKA39Z =YF3t -----END PGP SIGNATURE----- --Apple-Mail=_79B07EDB-D1FD-44AA-A02E-92B5BDCE6843--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?08E18A70-59E0-441D-A705-0F3F3B7B9998>