Skip to contentSkip to conversation

travis.yml: Use clang++ in the Clang tests

PATCH In review Thomas Huth 3 participants 4 messages May 18, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 travis.yml: Use clang++ in the Clang tests

Our configure script does not look for clang++ automatically, so we should use --cxx=clang++ to make sure that we test our C++ code with Clang, too. And while we're at it, also use --host-cc=clang here to avoid that we use the normal "cc" as host C compiler.

---
 .travis.yml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
.travis.yml +5 -3
index 1ec8a7b465..564be50a3c 100644
@@ -205,14 +205,15 @@ jobs:
     # Test with Clang for compile portability (Travis uses clang-5.0)
     - name: "Clang (user)"
       env:
-        - CONFIG="--disable-system"
+        - CONFIG="--disable-system --host-cc=clang --cxx=clang++"
         - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
       compiler: clang
 
 
     - name: "Clang (main-softmmu)"
       env:
-        - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} "
+        - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}
+                  --host-cc=clang --cxx=clang++"
         - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize"
       compiler: clang
       before_script:
@@ -222,7 +223,8 @@ jobs:
 
     - name: "Clang (other-softmmu)"
       env:
-        - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
+        - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}
+                  --host-cc=clang --cxx=clang++"
         - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
       compiler: clang
 
Signature · 1 line
2.18.1
#1 lore raw

PATCH 1/1 travis.yml: Use clang++ in the Clang tests

Our configure script does not look for clang++ automatically, so we should use --cxx=clang++ to make sure that we test our C++ code with Clang, too. And while we're at it, also use --host-cc=clang here to avoid that we use the normal "cc" as host C compiler.

---
 .travis.yml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
.travis.yml +5 -3
index 1ec8a7b465..564be50a3c 100644
@@ -205,14 +205,15 @@ jobs:
     # Test with Clang for compile portability (Travis uses clang-5.0)
     - name: "Clang (user)"
       env:
-        - CONFIG="--disable-system"
+        - CONFIG="--disable-system --host-cc=clang --cxx=clang++"
         - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
       compiler: clang
 
 
     - name: "Clang (main-softmmu)"
       env:
-        - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} "
+        - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}
+                  --host-cc=clang --cxx=clang++"
         - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize"
       compiler: clang
       before_script:
@@ -222,7 +223,8 @@ jobs:
 
     - name: "Clang (other-softmmu)"
       env:
-        - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
+        - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}
+                  --host-cc=clang --cxx=clang++"
         - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
       compiler: clang
 
Signature · 1 line
2.18.1
Reviewed-by on v1 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 34 lines · Thomas Huth

Our configure script does not look for clang++ automatically, so we should use --cxx=clang++ to make sure that we test our C++ code with Clang, too. And while we're at it, also use --host-cc=clang here to avoid that we use the normal "cc" as host C compiler.

---
  .travis.yml | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
.travis.yml +3 -2
index 1ec8a7b465..564be50a3c 100644
@@ -205,14 +205,15 @@ jobs:
      # Test with Clang for compile portability (Travis uses clang-5.0)
      - name: "Clang (user)"
        env:
-        - CONFIG="--disable-system"
+        - CONFIG="--disable-system --host-cc=clang --cxx=clang++"
          - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
        compiler: clang
 
 
      - name: "Clang (main-softmmu)"
        env:
-        - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} "
+        - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}
+                  --host-cc=clang --cxx=clang++"
          - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize"
        compiler: clang
        before_script:

.travis.yml jobs: · line 230

Quoted 9 lines
.travis.yml +2 -1
@@ -222,7 +223,8 @@ jobs:
 
      - name: "Clang (other-softmmu)"
        env:
-        - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
+        - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}
+                  --host-cc=clang --cxx=clang++"
          - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
        compiler: clang
 
#3 lore raw
In reply to Thomas Huth
Quoted 6 lines · Thomas Huth

Our configure script does not look for clang++ automatically, so we should use --cxx=clang++ to make sure that we test our C++ code with Clang, too. And while we're at it, also use --host-cc=clang here to avoid that we use the normal "cc" as host C compiler.

Queued to testing/next, thanks.

Signature · 1 line
Alex Bennée