From 64825e67ea4dfa8ebc02f7b52788a2a85f34f42d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 8 Feb 2019 11:06:03 +0100 Subject: [PATCH] improve the test to avoid bug https://bugs.llvm.org/show_bug.cgi\?id\=40659 --- debian/qualify-clang.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index a437d407..b1f6237b 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -252,8 +252,14 @@ fi clang-$VERSION -fuse-ld=lld -O2 foo.c main.c -o foo ./foo > /dev/null -clang-$VERSION -fuse-ld=lld -flto -O2 foo.c main.c -o foo -./foo > /dev/null +if ls -al1 /usr/bin/ld.lld|grep ld.lld-$VERSION; then +# https://bugs.llvm.org/show_bug.cgi?id=40659 +# -fuse-ld=lld will call lld +# Mismatch of version can fail the check +# so, only run it when /usr/bin/lld == $VERSION + clang-$VERSION -fuse-ld=lld -flto -O2 foo.c main.c -o foo + ./foo > /dev/null +fi clang-$VERSION -fuse-ld=lld-$VERSION -O2 foo.c main.c -o foo ./foo > /dev/null