You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/05/15 22:51:47 UTC
[trafficserver] branch master updated: Sets things up to find
appropriate compilers for C++17
This is an automated email from the ASF dual-hosted git repository.
zwoop 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 c615903 Sets things up to find appropriate compilers for C++17
c615903 is described below
commit c6159035433f319fddf097f8256babb50379c1f7
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Tue May 15 16:14:17 2018 -0600
Sets things up to find appropriate compilers for C++17
---
ci/jenkins/bin/autest.sh | 10 --------
ci/jenkins/bin/environment.sh | 55 ++++++++++++++++++++++++++++++-------------
ci/jenkins/bin/github.sh | 10 --------
3 files changed, 38 insertions(+), 37 deletions(-)
diff --git a/ci/jenkins/bin/autest.sh b/ci/jenkins/bin/autest.sh
index 22c506d..1df5fa4 100755
--- a/ci/jenkins/bin/autest.sh
+++ b/ci/jenkins/bin/autest.sh
@@ -34,14 +34,6 @@ WCCP=""
[ "1" == "$enable_debug" ] && DEBUG="--enable-debug"
[ "1" == "$enable_wccp" ] && WCCP="--enable-wccp"
-# Check for clang
-if [ "1" == "$enable_clang" ]; then
- export CC="clang"
- export CXX="clang++"
- export CXXFLAGS="-Qunused-arguments"
- export WITH_LIBCPLUSPLUS="yes"
-fi
-
mkdir -p ${INSTALL}
cd src
@@ -49,8 +41,6 @@ echo "CCACHE: $CCACHE"
echo "WERROR: $WERROR"
echo "DEBUG: $DEBUG"
echo "WCCP: $WCCP"
-echo "CC: $CC"
-echo "CXX: $CXX"
# Restore verbose shell output
set -x
diff --git a/ci/jenkins/bin/environment.sh b/ci/jenkins/bin/environment.sh
index 48596e6..8aa0c97 100755
--- a/ci/jenkins/bin/environment.sh
+++ b/ci/jenkins/bin/environment.sh
@@ -55,28 +55,49 @@ test "${JOB_NAME#*-9.2.x}" != "${JOB_NAME}" && ATS_BRANCH=9.1.x
export ATS_BRANCH
echo "Branch is $ATS_BRANCH"
-# Decide on compilers, gcc is the default
-if test "${JOB_NAME#*compiler=clang}" != "${JOB_NAME}"; then
- export CC="clang"
- export CXX="clang++"
- # export CXXFLAGS="-Qunused-arguments -std=c++11"
+# If the job name includes the string "clang", force clang. This can also be set
+# explicitly for specific jobs.
+test "${JOB_NAME#*compiler=clang}" != "${JOB_NAME}" && enable_clang=1
+
+if [ "1" == "$enable_clang" ]; then
+ if [ -x "/usr/local/bin/clang++50" ]; then
+ export CC="/usr/local/bin/clang50"
+ export CXX="/usr/local/bin/clang++50"
+ else
+ export CC="clang"
+ export CXX="clang++"
+ fi
export CXXFLAGS="-Qunused-arguments"
export WITH_LIBCPLUSPLUS="yes"
-fi
-
-# Check for devtoolset-7, but only for ATS 7.x and later
-if test "$ATS_IS_7" == "yes"; then
- if test -f "/opt/rh/devtoolset-7/enable"; then
- source /opt/rh/devtoolset-7/enable
- echo "Enabling devtoolset-7"
- elif test -x "/usr/bin/gcc-4.9"; then
- export CC="/usr/bin/gcc-4.9"
- export CXX="/usr/bin/g++-4.9"
- echo "CC: $CC"
- echo "CXX: $CXX"
+elif [ "1" == "$enable_icc" ]; then
+ source /opt/intel/bin/iccvars.sh intel64
+ export CC=icc
+ export CXX=icpc
+else
+ # Default is gcc / g++
+ export CC=gcc
+ export CXX=g++
+ # Only test for non standard compilers on ATS v7.x and later. ToDo: Remove this when 6.x is EOLifed.
+ if test "$ATS_IS_7" == "yes"; then
+ if test -f "/opt/rh/devtoolset-7/enable"; then
+ # This changes the path such that gcc / g++ is the right version. This is for CentOS 6 / 7.
+ source /opt/rh/devtoolset-7/enable
+ echo "Enabling devtoolset-7"
+ elif test -x "/usr/bin/g++-7"; then
+ # This is for Debian platforms
+ export CC=/usr/bin/gcc-7
+ export CXX=/usr/bin/g++-7
+ fi
fi
fi
+# Echo out compiler information
+echo "Compiler information:"
+echo "CC: ${CC}"
+$CC -v
+echo "CXX: $CXX"
+$CXX -v
+
# Figure out parallelism for regular builds / bots
ATS_MAKE_FLAGS="-j4"
diff --git a/ci/jenkins/bin/github.sh b/ci/jenkins/bin/github.sh
index 79fa4ae..9c7ad5f 100755
--- a/ci/jenkins/bin/github.sh
+++ b/ci/jenkins/bin/github.sh
@@ -30,14 +30,6 @@ WCCP=""
[ "1" == "$enable_debug" ] && DEBUG="--enable-debug"
[ "1" == "$enable_wccp" ] && WCCP="--enable-wccp"
-# Check for clang
-if [ "1" == "$enable_clang" ]; then
- export CC="clang"
- export CXX="clang++"
- export CXXFLAGS="-Qunused-arguments"
- export WITH_LIBCPLUSPLUS="yes"
-fi
-
mkdir -p ${INSTALL}
cd src
@@ -45,8 +37,6 @@ echo "CCACHE: $CCACHE"
echo "WERROR: $WERROR"
echo "DEBUG: $DEBUG"
echo "WCCP: $WCCP"
-echo "CC: $CC"
-echo "CXX: $CXX"
# Restore verbose shell output
set -x
--
To stop receiving notification emails like this one, please contact
zwoop@apache.org.