From owner-freebsd-testing@FreeBSD.ORG Wed Feb 11 21:43:17 2015 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 637748E8; Wed, 11 Feb 2015 21:43:17 +0000 (UTC) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C39F184; Wed, 11 Feb 2015 21:43:17 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::9dec:c6e6:fdea:aaa9] (unknown [IPv6:2001:7b8:3a7:0:9dec:c6e6:fdea:aaa9]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 8DC595C2E; Wed, 11 Feb 2015 22:43:12 +0100 (CET) Subject: Re: clang and scanbuild Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_79B07EDB-D1FD-44AA-A02E-92B5BDCE6843"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b5 (769970b) From: Dimitry Andric In-Reply-To: Date: Wed, 11 Feb 2015 22:43:07 +0100 Message-Id: <08E18A70-59E0-441D-A705-0F3F3B7B9998@FreeBSD.org> References: To: Craig Rodrigues X-Mailer: Apple Mail (2.2070.6) Cc: "freebsd-testing@freebsd.org" , freebsd-toolchain@freebsd.org X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 21:43:17 -0000 --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 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--