]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Disable some tests on ancient Clang versions (#693)
authorAlexander Lanin <alex@lanin.de>
Wed, 4 Nov 2020 06:33:08 +0000 (07:33 +0100)
committerGitHub <noreply@github.com>
Wed, 4 Nov 2020 06:33:08 +0000 (07:33 +0100)
Co-authored-by: Joel Rosdahl <joel@rosdahl.net>
dockerfiles/ubuntu-14.04/Dockerfile
test/suites/modules.bash
test/suites/profiling.bash
test/suites/profiling_clang.bash
test/suites/profiling_hip_clang.bash
test/suites/sanitize_blacklist.bash
test/suites/serialize_diagnostics.bash
test/suites/split_dwarf.bash

index 2b2c2979cc5ec5b8dee5f110814b76f4fc85b13c..45e4ef30db156e426a883f86b3e6ac6d635c5a42 100644 (file)
@@ -6,10 +6,11 @@ RUN apt-get update \
         bash \
         build-essential \
         ccache \
-        clang \
+        clang-3.4 \
         curl \
         elfutils \
-        gcc-multilib \
+        g++-multilib \
+        ninja-build \
         wget \
         xsltproc \
  && rm -rf /var/lib/apt/lists/*
index 664d80600d8459d327a89e4c1b39d829cce3898f..51ddb2a3e4a73c1d42b0ef9e80b0a9ca14eae8ee 100644 (file)
@@ -1,7 +1,9 @@
 SUITE_modules_PROBE() {
     if ! $COMPILER_TYPE_CLANG; then
         echo "-fmodules/-fcxx-modules not supported by compiler"
-        return
+    else
+        touch test.c
+        $COMPILER -fmodules test.c -S || echo "compiler does not support modules"
     fi
 }
 
index a05d745d1aa803e572fd11edfc24b02d6409dd75..b7abaa2a53f0e99a2d67a072ba863027e3114e31 100644 (file)
@@ -3,6 +3,9 @@ SUITE_profiling_PROBE() {
     if ! $COMPILER -fprofile-generate -c test.c 2>/dev/null; then
         echo "compiler does not support profiling"
     fi
+    if ! $COMPILER -fprofile-generate=data -c test.c 2>/dev/null; then
+        echo "compiler does not support -fprofile-generate=path"
+    fi
     if $COMPILER_TYPE_CLANG && ! command -v llvm-profdata$CLANG_VERSION_SUFFIX >/dev/null; then
         echo "llvm-profdata$CLANG_VERSION_SUFFIX tool not found"
     fi
index 332fbc7db909220b62681794d06aae825d7b7029..8f8073d797888ad130c8fac0487281fed797724d 100644 (file)
@@ -3,6 +3,10 @@ SUITE_profiling_clang_PROBE() {
         echo "compiler is not Clang"
     elif ! command -v llvm-profdata$CLANG_VERSION_SUFFIX >/dev/null; then
         echo "llvm-profdata$CLANG_VERSION_SUFFIX tool not found"
+    elif ! $COMPILER -fdebug-prefix-map=x=y -c test.c 2>/dev/null; then
+        echo "compiler does not support -fdebug-prefix-map"
+    elif ! $COMPILER -fprofile-sample-accurate -c test.c 2>/dev/null; then
+        echo "compiler does not support -fprofile-sample-accurate"
     fi
 }
 
index 0ca00d85a6eb8ef73ecade329cbbadda6a1ddc9a..fa4418bd52c5c50c5f4ca6d2ac9d8198612eca3f 100644 (file)
@@ -1,7 +1,7 @@
 SUITE_profiling_hip_clang_PROBE() {
     if ! $COMPILER_TYPE_CLANG; then
         echo "compiler is not Clang"
-    elif ! echo | $COMPILER -x hip --cuda-gpu-arch=gfx900 -nogpulib -c - > /dev/null; then
+    elif ! echo | $COMPILER -x hip --cuda-gpu-arch=gfx900 -nogpulib -c - 2> /dev/null; then
         echo "Hip not supported"
     fi
 }
index fbe70f88db51447cd75c99b47d67e9316b99aed6..de135f99d253159b33ffd5f103a9cb011ac7081a 100644 (file)
@@ -43,7 +43,7 @@ SUITE_sanitize_blacklist() {
     expect_stat 'files in cache' 4
 
     # -------------------------------------------------------------------------
-    TEST "Compile failed"
+    TEST "Unsuccessful compilation"
 
     if $REAL_COMPILER -c -fsanitize-blacklist=nosuchfile.txt test1.c 2>expected.stderr; then
         test_failed "Expected an error compiling test1.c"
index a6eb4a17613b5d5f387b172b8041faaf3fae9941..9ec2eb8af37b128a6430af86c19753f535da5f16 100644 (file)
@@ -31,7 +31,7 @@ SUITE_serialize_diagnostics() {
     expect_equal_content expected.dia test.dia
 
     # -------------------------------------------------------------------------
-    TEST "Compile failed"
+    TEST "Unsuccessful compilation"
 
     echo "bad source" >error.c
     if $REAL_COMPILER -c --serialize-diagnostics expected.dia error.c 2>expected.stderr; then
index fb13f59146b91ef87739c99982bfaaf8a173fdc7..d8c38050fba1cfa0e137a0f53aaf4d5e66289d8c 100644 (file)
@@ -2,6 +2,8 @@ SUITE_split_dwarf_PROBE() {
     touch test.c
     if ! $REAL_COMPILER -c -gsplit-dwarf test.c 2>/dev/null || [ ! -e test.dwo ]; then
         echo "-gsplit-dwarf not supported by compiler"
+    elif ! $COMPILER -fdebug-prefix-map=a=b -c test.c 2>/dev/null; then
+        echo "-fdebug-prefix-map not supported by compiler"
     fi
 }