bash \
build-essential \
ccache \
- clang \
+ clang-3.4 \
curl \
elfutils \
- gcc-multilib \
+ g++-multilib \
+ ninja-build \
wget \
xsltproc \
&& rm -rf /var/lib/apt/lists/*
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
}
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
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
}
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
}
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"
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
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
}