]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
appveyor: Reduce runtime by using lld instead of ld
authorTobias Brunner <tobias@strongswan.org>
Tue, 20 Jan 2026 14:21:12 +0000 (15:21 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 22 Jan 2026 17:15:10 +0000 (18:15 +0100)
In particular with the 2019 image, the time required often exceeded the
maximum of 60 minutes.  Using lld reduces the runtime quite a bit (it's
still close to the limit, though).

This doesn't work with the old OpenSSL version we use with the 2015
image (that libeay32.lib file just doesn't seem to work), so continue
to use ld (the build on that image is the quickest anyway).

.appveyor.yml
scripts/test.sh

index f6830687cad5aa46b23a193c85cf4e9762d51da5..0ff94fc83c0ab43a087f8dfcc401fd694e63383b 100644 (file)
@@ -29,6 +29,8 @@ install:
       IF "%IMG%" == "2017" set OPENSSL=OpenSSL-v11
       set OPENSSL_DIR=/c/%OPENSSL%-%TEST%
       C:\%OPENSSL%-%TEST%\bin\openssl.exe version -a
+  # lld doesn't read .lib files
+  - IF NOT "%IMG%" == "2015" copy C:\%OPENSSL%-%TEST%\lib\libcrypto.lib C:\%OPENSSL%-%TEST%\lib\libcrypto.dll.a
   # newer versions of msys2 don't provide autotools or gperf via base-devel anymore
   - IF "%IMG%" == "2019" %MSYS_SH% --login -c ". /etc/profile && pacman --noconfirm -S --needed autotools gperf"
 
index f5cbd1ce601b4c6ac9d8f24b50ac77cb85b6a725..dc321b1271d990d6271590add7d18c31d68d8882 100755 (executable)
@@ -352,7 +352,7 @@ win*)
        else
                CONFIG="$CONFIG --enable-openssl"
                CFLAGS="$CFLAGS -I$OPENSSL_DIR/include"
-               LDFLAGS="-L$OPENSSL_DIR/lib"
+               LDFLAGS="-L$OPENSSL_DIR/lib -fuse-ld=lld"
                case "$IMG" in
                2015)
                        # gcc/ld might be too old to find libeay32 via .lib instead of .dll
@@ -543,7 +543,7 @@ apidoc)
        ;;
 esac
 
-echo "$ make $TARGET"
+echo "$ make -j$(nproc) $TARGET"
 case "$TEST" in
 sonarcloud)
        # without target, coverage is currently not supported anyway because