You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2018/04/17 14:57:01 UTC

[trafficserver] branch master updated: Makes the CI work again with ClangAnalyzer v6.x

This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 6a58eeb  Makes the CI work again with ClangAnalyzer v6.x
6a58eeb is described below

commit 6a58eeb42501d0d2f467914c6d132a07e9d57782
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Mon Apr 16 14:45:58 2018 -0600

    Makes the CI work again with ClangAnalyzer v6.x
    
    There are a few issues with clang and how we do things:
    
          1) The autoconf module we use for C++ version detection
          puts the -std=c++17 in the CXX variable, but not CXXFLAGS.
          This fails when you wrap the compilers like we do with scan.
    
          2) The STL includes on CentOS7 are much too old, and clang
          seems to prefer those over its own for some odd reason. So,
          enforce the use of the LLVM/clang include files.
    
          3) We must also link with an appropriate C++ standard library.
          Similar to 2), we therefore specifically use libc++.
---
 ci/jenkins/bin/clang-analyzer.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ci/jenkins/bin/clang-analyzer.sh b/ci/jenkins/bin/clang-analyzer.sh
index f8784b1..bb4c568 100755
--- a/ci/jenkins/bin/clang-analyzer.sh
+++ b/ci/jenkins/bin/clang-analyzer.sh
@@ -77,7 +77,9 @@ export CCC_CXX=${LLVM_BASE}/bin/clang++
 # Start the build / scan
 [ "$output" != "/tmp" ] && echo "Results (if any) can be found at ${results_url}"
 autoreconf -fi
-${LLVM_BASE}/bin/scan-build ./configure ${configure}
+${LLVM_BASE}/bin/scan-build ./configure ${configure} \
+    CXXFLAGS="-stdlib=libc++ -I/opt/llvm/include/c++/v1 -std=c++17" \
+    LDFLAGS="-L/opt/llvm/lib64 -Wl,-rpath=/opt/llvm/lib64"
 
 # Since we don't want the analyzer to look at LuaJIT, build it first
 # without scan-build. The subsequent make will then skip it.

-- 
To stop receiving notification emails like this one, please contact
bcall@apache.org.