ci: disable __thread support for Windows msys2 build
authorVincent Fu <vincent.fu@samsung.com>
Wed, 19 Apr 2023 14:40:07 +0000 (10:40 -0400)
committerVincent Fu <vincent.fu@samsung.com>
Thu, 20 Apr 2023 13:40:27 +0000 (09:40 -0400)
Our Windows msys2 build is now broken after AppVeyor's recent image
update from clang/lld 15.0.7-3 to 16.0.0-1.

Here is the error:

    CC unittests/oslib/strcasestr.o
    CC unittests/oslib/strsep.o
  LINK fio
ld.lld: error: undefined symbol: static_tv_valid
>>> referenced by gettime.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Rishabh Shukla investigated and found that clang + ld builds
successfully. So the problem seems to be with lld 16.0.0-1.

Until we find the root cause let's just disable __thread support on
AppVeyor msys2 builds.

Link: https://github.com/axboe/fio/issues/1559
Suggested-by: Rishabh Shukla <rishabh.sh@samsung.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
.appveyor.yml
configure

index 92301ca9e092d76c31413e477a7cd69432f44f5b..a63cf24f01b106e94184295ddfe7fb993df0b938 100644 (file)
@@ -6,9 +6,11 @@ image:
 environment:
   CYG_MIRROR: http://cygwin.mirror.constant.com
   matrix:
+# --disable-tls for the msys2 build to work around
+# breakage with clang/lld 16.0.0-1
     - ARCHITECTURE: x64
       CC: clang
-      CONFIGURE_OPTIONS: --enable-pdb
+      CONFIGURE_OPTIONS: --enable-pdb --disable-tls
       DISTRO: msys2
 # Skip 32 bit clang build
 #    - ARCHITECTURE: x86
index 45d10a31094e7ba256e36293bb2f713f2a894299..abb6d016492e5d99a30fe8d4616702254d486980 100755 (executable)
--- a/configure
+++ b/configure
@@ -264,6 +264,8 @@ for opt do
   ;;
   --seed-buckets=*) seed_buckets="$optarg"
   ;;
+  --disable-tls) tls_check="no"
+  ;;
   --help)
     show_help="yes"
     ;;
@@ -313,6 +315,7 @@ if test "$show_help" = "yes" ; then
   echo "--disable-dfs           Disable DAOS File System support even if found"
   echo "--enable-asan           Enable address sanitizer"
   echo "--seed-buckets=         Number of seed buckets for the refill-buffer"
+  echo "--disable-tls          Disable __thread local storage"
   exit $exit_val
 fi
 
@@ -1549,7 +1552,8 @@ print_config "socklen_t" "$socklen_t"
 if test "$tls_thread" != "yes" ; then
   tls_thread="no"
 fi
-cat > $TMPC << EOF
+if test "$tls_check" != "no"; then
+  cat > $TMPC << EOF
 #include <stdio.h>
 static __thread int ret;
 int main(int argc, char **argv)
@@ -1560,6 +1564,7 @@ EOF
 if compile_prog "" "" "__thread"; then
   tls_thread="yes"
 fi
+fi
 print_config "__thread" "$tls_thread"
 
 ##########################################