100 Commits
Author SHA1 Message Date
Martin Storsjö 247e65cdeb github: Switch test-ffmpeg over to the msys2 environment ucrt64
The mingw64 environment is deprecated, which the setup-msys2 action
warns about.

We don't really use the host environment's tools anyway so the
choice doesn't matter. Ideally we maybe would use the msys
environment instead, to avoid accidentally relying on build tools
from there. But if building in the msys environment, ffmpeg things
we're building for msys as opposed to native mingw. (This can
probably be avoided by specifying --target-os though.)
2026-10-07 12:19:21 +03:00
Martin Storsjö e1878a59f8 build-llvm: Bump to LLVM 23.1.3 2026-10-06 19:19:17 +03:00
Martin Storsjö 4402ebefa6 build-mingw-w64: Bump to the latest version as of Oct 6th 2026-10-06 19:19:07 +03:00
Martin Storsjö 057602f297 github: Update dawidd6/action-download-artifact to v27
This should avoid issues where the action spuriously fetches older
runs than expected.
2026-09-30 14:16:03 +03:00
Martin Storsjö 22f751492c github: Try to work around msys rsync issues by attempting rsync twice
This tries to work around
https://github.com/msys2/MSYS2-packages/issues/6555.
2026-09-28 13:19:33 +03:00
Martin Storsjö 0eca5ac93d build-llvm: Bump to LLVM 23.1.2 2026-09-22 12:31:01 +03:00
Martin Storsjö f03b9610e0 build-mingw-w64: Bump to the latest version as of Sep 22nd 2026-09-22 12:30:44 +03:00
Martin Storsjö 030097eeee build-llvm: Bump to LLVM 23.1.1 2026-09-08 14:49:19 +03:00
Martin Storsjö 24c2a9c539 build-mingw-w64: Bump to the latest version as of Sep 8th 2026-09-08 14:48:58 +03:00
Martin Storsjö de1d2a5192 github: Stop disabling LLVM_WINDOWS_PREFER_FORWARD_SLASH in test-llvm
Since LLVM 23, the testcases should pass with
LLVM_WINDOWS_PREFER_FORWARD_SLASH enabled. For mingw build
configurations, this is enabled by default.
2026-08-27 11:54:53 +03:00
Martin Storsjö 48f50b100b test: Ignore failures to remove the output file in some cases
When running tests on Windows with busybox-w32 as shell, removing
the output log file for the stacksmash-asan testcase fails like this
occasionally:

    rm: can't remove 'log1-stacksmash-asan': Permission denied

This only seems to happen with the i686 build of busybox-w32, but
happens for the stacksmash-asan test built as either i686 or x86_64.

(If running run-test.sh repeatedly, it seems like the issue either
happens right away on the first iteration, or doesn't happen at all.)

Avoid breaking builds by simply making it ignore errors from this
particular "rm" command.
2026-08-27 11:54:24 +03:00
Martin Storsjö 14614551fb build-llvm: Bump to LLVM 23.1.0 final 2026-08-26 12:57:39 +03:00
Martin Storsjö 0e35436e9e build-mingw-w64: Bump to the latest version as of Aug 26th 2026-08-26 12:57:13 +03:00
Martin Storsjö 8d8653d73c docker: Fix line continuation after 986847858c 2026-08-12 20:17:19 +03:00
Martin Storsjö 26a7ab6ff0 github: Drop -static-libstdc++ -static-libgcc from the openmp tests
With arm64ec now being built as arm64x, sharing DLLs with the
regular aarch64 target, we no longer need these options - the
regular libc++.dll/libunwind.dll from $PATH (from the toolchain
bin directory) work for the arm64ec build as well.
2026-08-12 12:18:45 +03:00
Martin Storsjö eae760ec88 build-llvm: Bump to LLVM 23.1.0 RC 3 2026-08-12 12:18:17 +03:00
Martin Storsjö 78fe776c0c build-mingw-w64: Bump to the latest version as of Aug 12th 2026-08-12 12:18:01 +03:00
Martin Storsjö d5f44860c5 github: Allow triggering a pipeline equal to the scheduled nightly ones 2026-08-03 10:06:07 +03:00
Martin Storsjö 34f111adcb github: Upgrade the docker actions to the latest version
This avoids warnings about the actions targeting Node 20.

There is no easily available documentation about whether there are
any other API changes in the newer versions of these actions - in
particular the bump of build-push-action which advances by two
versions.
2026-08-03 10:05:30 +03:00
Martin Storsjö 327d1a081c build-llvm: Bump to LLVM 23.1.0 RC 2
This version includes a fix for linking directly against an ARM64X
DLL.
2026-07-28 18:50:47 +03:00
Martin Storsjö ce6e1683f7 build-mingw-w64: Bump to the latest version as of Jul 27th
This version is the one used in the latest successful nightly
build.
2026-07-28 18:49:20 +03:00
Martin Storsjö ef0fadb5b5 Revert "run-tests: Temporarily compile all executables before running them"
This reverts commit 5e3f73a650.

As the arm64x support has been reverted, this isn't needed. And
after bumping to LLVM 23.1.0 RC 2, we won't need it anyway.
2026-07-28 18:45:52 +03:00
Martin Storsjö 975930b5b7 Revert "Add ARM64X support"
This reverts commit 64effa9a71.

It turns out that the LLD handling of the TLS data structures
("_tls_used" and "_tls_index") needs more work, causing the
arm64ec side of arm64x binaries to not get them hooked up properly.
2026-07-28 18:44:59 +03:00
Martin Storsjö c77d93ace9 Revert "github: Drop -static-libstdc++ -static-libgcc from the openmp tests"
This reverts commit d6fbc4a7eb.

I'm going to revert the arm64x support, so this needs to be reverted
for now.
2026-07-28 18:44:40 +03:00
Martin Storsjö d6fbc4a7eb github: Drop -static-libstdc++ -static-libgcc from the openmp tests
With arm64ec now being built as arm64x, sharing DLLs with the
regular aarch64 target, we no longer need these options - the
regular libc++.dll/libunwind.dll from $PATH (from the toolchain
bin directory) work for the arm64ec build as well.
2026-07-28 10:42:39 +03:00
Martin Storsjö 5e3f73a650 run-tests: Temporarily compile all executables before running them
When building throwcatch-main.exe, we link with "-L.". Since we
copy in the runtime libraries for executing tests, we might have
libc++.dll present if we aim for the target "test" while
compiling.

For arm64x builds, we could end up trying to link directly against
the arm64x libc++.dll rather than with the import library. Linking
directly against an arm64x DLL doesn't work yet in 23.1.0-rc1, so
avoid hitting this situation for now.

This is a temporary workaround; linking against an arm64x DLL should
work too, and the fix is being backported to the next RC.
2026-07-27 19:08:32 +02:00
Martin Storsjö 3f54c5b996 github: Test openmp on arm64ec too, in the test-openmp job 2026-07-21 11:32:43 +03:00
Martin Storsjö 20f2ac78ae tests: Test building/using openmp on arm64ec too 2026-07-21 11:32:43 +03:00
Martin Storsjö d7490b5ef2 build-openmp: Build openmp for arm64ec too 2026-07-21 11:32:43 +03:00
Martin Storsjö e5235c3287 build-llvm: Bump to LLVM 23.1.0 RC 1
Some notable changes since 22.x:
- Linking a weak declaration against a weak definition now works
  properly
- Many improvements for ARM64EC, including supporting linking
  against ARM64EC thin libraries
- Support for compiling for ARM64X (files targeting both native
  aarch64 and ARM64EC) with the -marm64x flag, which generates
  a multi-architecture object file. This should make it much
  more feasible, build system wise, to actually build things for
  ARM64X.
- Fixed aarch64 branch protection on Windows to use the right
  signing key (previously it the wrong one, which was inactive on
  Windows, and which broke unwinding in older versions of Wine)
2026-07-21 11:32:19 +03:00
Martin Storsjö 44c9c5fa20 build-mingw-w64: Bump to the latest version as of Jul 18th 2026-07-18 13:09:24 +03:00
Martin Storsjö 0abb154828 github: Don't add the bundled Python to PATH in test-llvm
Previously, we added the llvm-mingw bundled python to the head
of PATH, but we didn't expect to use it after all.

(In other tests, where we explicitly want to use the llvm-mingw
bundled python, we set -DPython3_EXECUTABLE="$Env:PYTHON_EXE.)

Previously (with runner image version 20260622.87.1), CMake ended
up choosing
C:/hostedtoolcache/windows/Python/3.13.14/x64/python3.exe, but
now (with runner image version 20260629.93.2) we ended up picking
C:/llvm-mingw/python/bin/python3.14.exe instead.

With the newer runner images, we do have
C:\hostedtoolcache\windows\Python\3.13.14\arm64\python3.exe in
PATH, but it is unclear why that doesn't get picked.

(Picking another version than the first one in PATH would make
sense if we'd have Python_FIND_STRATEGY=VERSION set. According to
the docs, that shouldn't be the default any longer though, and it
wouldn't explain why it picked 3.13 before when we provide
3.14.)

In any case, just skip adding our version to PATH since we
don't intend to use it, to make it use the system provided
version.
2026-07-05 23:20:24 +03:00
Martin Storsjö 170b7e1ec4 build-llvm: Bump to LLVM 22.1.8 2026-06-16 22:02:42 +03:00
Martin Storsjö 3dce018647 build-mingw-w64: Bump to the latest version as of Jun 16th 2026-06-16 22:02:25 +03:00
Martin Storsjö 5e74b0c0ea build-python: Update to Python 3.14.5 2026-06-05 18:50:50 +03:00
Martin Storsjö 0272df2cc1 build-llvm: Bump to LLVM 22.1.7 2026-06-02 12:20:07 +03:00
Martin Storsjö de5e31d1dd build-mingw-w64: Bump to the latest version as of Jun 2nd 2026-06-02 12:19:51 +03:00
Martin Storsjö 8adc11d4cf build-llvm: Bump to LLVM 22.1.6 2026-05-19 12:27:40 +03:00
Martin Storsjö 4ccd364457 build-mingw-w64: Bump to the latest version as of May 19th 2026-05-19 12:27:22 +03:00
Martin Storsjö ba72461e23 build-llvm: Bump to LLVM 22.1.5 2026-05-05 22:53:07 +03:00
Martin Storsjö 88885f361e build-mingw-w64: Update to the latest version as of May 5th 2026-05-05 22:52:21 +03:00
Martin Storsjö d69f101b09 docker: Update the system-clang testcase to use Clang 20
This is the newest version currently available in the Ubuntu 24.04
repos.

This fixes building; previously it failed to build libc++, which only
supports being built with one of the two preceding versions of Clang.
2026-04-28 14:23:41 +03:00
Martin Storsjö b59056fe41 docker: Remove arm64ec from the system-clang testcase
Building for arm64ec requires Clang/LLD 21.

This was added in cb92de78e7 without
considering the context in this testcase properly.
2026-04-28 14:18:16 +03:00
Martin Storsjö 61ddd976fe Revert "test: crt-test: Skip a test for cos(-NAN) == -NAN when optimizing"
This reverts commit 1d8c107d49.

After 49e14021be, when using F(-NAN)
instead of -F(NAN) to hide the negation, this test passes correctly.
I hadn't realized that GCC and Clang optimized cos(-x) = cos(x), when
I made 1d8c107d49 (and at the time, the
F() macro didn't work properly with -NAN on all toolchains).
2026-04-24 15:39:58 +03:00
Martin Storsjö 49e14021be test: crt-test: Prefer F(-NAN) instead of -F(NAN)
In the former form, the negation of NAN is hidden inside the
optimization blocking macro/wrapper. After
9be66e9d22, F(-NAN) works just as
well as -F(NAN).

This avoids test issues with recent optimizations in LLVM.
https://github.com/llvm/llvm-project/pull/193586 seems to make
the compiler consider known symmetry for hyperbolic math functions,
exploiting the fact that cosh(-x) is equal to cosh(x) (for values
other than NANs). By hiding the negation inside the F() wrapper,
the compiler can't reason about is existence.
2026-04-24 14:39:15 +03:00
Martin Storsjö e604eb6f1f test: crt-test: Remove a comment which no longer is accurate
Since 9be66e9d22, the F() macro
no longer uses strtod(), so the details about what strtod("NAN")
and strtod("-NAN") returns are no longer relevant.
2026-04-24 14:38:26 +03:00
Martin Storsjö b68aefdbb5 test: crt-test: Remove unused variables 2026-04-24 14:34:20 +03:00
Martin Storsjö 81fba99f8a build-llvm: Bump to LLVM 22.1.4 2026-04-21 11:59:07 +03:00
Martin Storsjö 11786a6d76 build-mingw-w64: Bump to the latest version as of April 21st 2026-04-21 11:57:48 +03:00
Martin Storsjö 49df766757 build-llvm: Bump to LLVM 22.1.3 2026-04-07 14:08:35 +03:00
Martin Storsjö 0456111453 build-mingw-w64: Bump to the latest version as of Apr 7th 2026-04-07 14:07:53 +03:00
Martin Storsjö 16f4a0af0c build-llvm: Bump to LLVM 22.1.2 2026-03-24 23:42:53 +02:00
Martin Storsjö dfb90d5ea7 build-mingw-w64: Bump to the latest version as of Mar 24th 2026-03-24 23:42:33 +02:00
Martin Storsjö abc77c22a8 build-compiler-rt: Stop providing asan in msvcrt builds
See 0b296aefc0 for context, where
we stopped testing asan in msvcrt builds - see discussion at
https://github.com/llvm/llvm-project/pull/120397,
https://github.com/mstorsjo/llvm-mingw/issues/224 and
https://github.com/mstorsjo/llvm-mingw/issues/552.

This should make it clearer that asan isn't supported in msvcrt
builds, instead of silently just providing files that are known
not to work.

See 4718b81419 for earlier context
for where we remove the asan runtimes in armv7/aarch64 builds,
where the files do get built, but they don't work properly yet
(even on UCRT).
2026-03-22 12:45:58 +02:00
Martin Storsjö 13e18154e6 github: Upgrade dawidd6/action-download-artifact to v19 2026-03-21 15:31:53 +02:00
Martin Storsjö c737c4a0b6 build-python: Add --with-pic to fix the native static libffi on x86_64
This fixes building python on x86_64 linux after
fabc4571b2.
2026-03-13 14:10:49 +02:00
Martin Storsjö 98dddfb9a4 github: Upgrade cache@v4 to cache@v5 2026-03-13 12:19:18 +02:00
Martin Storsjö c7e087fbd4 github: Upgrade download-artifact@v7 to download-artifact@v8
This has some behaviour changes, but I believe it shouldn't hit
our usage.
2026-03-13 12:19:18 +02:00
Martin Storsjö b8c5a4ffa1 github: Upgrade download-artifact@v4 to download-artifact@v7 2026-03-13 12:19:18 +02:00
Martin Storsjö ed1e71ba54 github: Upgrade upload-artifact@v4 to upload-artifact@v6 2026-03-13 12:19:18 +02:00
Martin Storsjö 89faddb7a3 github: Upgrade checkout@v4 to checkout@v6
checkout@v5 should be the same as checkout@v4, just running on
Node 24. checkout@v6 has got a few other minor changes that
shouldn't make any difference; opt in to newer behaviours now.
2026-03-13 12:19:18 +02:00
Martin Storsjö fabc4571b2 build-python: Build the native libffi as a static library only
This fixes importing the _ctypes module, if a shared libffi doesn't
happen to exist on the host system with the right so version.
Since Python 3.12, such a build error ends up failing the build,
while it previously passed silently even if some parts of the build
had failed.
2026-03-13 12:18:30 +02:00
Martin Storsjö 84c8483eba github: Fix testing openmp in the runtimes build
This makes sure the openmp tests actually are executed; since
switching to the runtimes build of openmp for the tests (in
98684ab807), the tests weren't
executed, as it no longer found the tools necessary for executing
the tests - as they are expected to be specified differently
in the runtimes build mode.

This requires the commit 48a5119d8e7d7236a28c14d06ec215ef3366ef90
(backported to 22.x in 9794a7932465bdc244b327388905d66df38485e2,
part of the 22.1.1 release) in llvm-project, to be able to run
tests without actually building clang in the same build as the
test tools.
2026-03-11 22:00:27 +02:00
Martin Storsjö cb0e9ef0be build-llvm: Bump to LLVM 22.1.1 2026-03-11 09:39:31 +02:00
Martin Storsjö 644174c7cc build-mingw-w64: Bump to the latest version as of March 11th 2026-03-11 09:38:58 +02:00
Martin Storsjö a89f6c58f4 build-libcxx: Enable -D__USE_MINGW_ANSI_STDIO=1 for libcxx on x86
This ensures correctly formatted long doubles.

This fixes issue #545.
2026-03-03 10:52:42 +02:00
Martin Storsjö dc9837d908 test: Add the original test case for atomic loads of varying sizes
This covers the original testcase from
https://github.com/mstorsjo/llvm-mingw/issues/538.
2026-02-25 12:13:08 +02:00
Martin Storsjö 49afca5984 test: Add a test for atomic load/store of large integers
Test atomically loading/storing 128 bit integers on 64 bit, and
64 bit integers on 32 bit.

This test case covers the root cause of
https://github.com/mstorsjo/llvm-mingw/issues/538.
2026-02-25 12:13:08 +02:00
Martin Storsjö 9610c61240 build-llvm: Bump to LLVM 22.1.0 final 2026-02-24 10:26:41 +02:00
Martin Storsjö 1d8aa59fbf build-mingw-w64: Bump to the latest version as of Feb 24th 2026-02-24 10:26:00 +02:00
Martin Storsjö 98684ab807 github: Try to test openmp through the runtimes directory
Since 6295b8e763503644961f9087382f80965b98d466 in llvm-project,
one no longer can configure the openmp project entirely standalone,
one has to do it through the runtimes directory.

However, in practice, this currently leads to no tests being
executed at all, as the runtimes build setup doesn't support
pointing to an external FileCheck executable - it currently has
to be part of a full bootstrapping build.
2026-02-19 23:37:10 +02:00
Martin Storsjö f415e25b3e build-openmp: Switch to building through the runtimes directory
Since 6295b8e763503644961f9087382f80965b98d466 in llvm-project,
it's no longer possible to build openmp entirely standalone;
now one has to build it through the runtimes directory.
2026-02-19 23:32:42 +02:00
Martin Storsjö 5da3d4b11b build-llvm: Bump to LLVM 22.1.0 RC 3 2026-02-10 10:07:25 +02:00
Martin Storsjö a68d8c0421 build-mingw-w64: Bump to the latest version as of Feb 10th 2026-02-10 10:07:07 +02:00
Martin Storsjö 498cc00a1d build-llvm: Bump to LLVM 22.1.0 RC 2 2026-01-27 13:33:36 +02:00
Martin Storsjö d1b94a9da6 build-mingw-w64: Bump to the latest version as of Jan 27th 2026-01-27 13:33:14 +02:00
Martin Storsjö bfb0715614 build-mingw-w64, build-busybox: Bump to a newer version
This version of mingw-w64 includes the function "mkdtemp", which
breaks building the previously pinned version of busybox-w32 on i686.

Update both projects in sync, so that builds with newer nightly
versions of mingw-w64 also succeed.
2026-01-19 23:24:28 +02:00
Martin Storsjö 1ea8bbae4e build-busybox: Don't error out if reinstalling into an existing directory 2026-01-19 13:24:59 +02:00
Martin Storsjö f25f2fb3aa build-python: Update to Python 3.13.11 2026-01-19 00:00:37 +02:00
Martin Storsjö 1032736a4c build-llvm: Bump to LLVM 22.1.0 RC 1
Some notable changes since LLVM 21.x related to mingw:

- Handle an uncommon error code in libcxx's std::filesystem,
  avoiding spurious test failures if running the libcxx test suite
  (noted at least occasionally on Github Actions)
- Reinstate x86 stack probe functions in compiler-rt, that we earlier
  beleived weren't used - but turned out to be used by GCC in i386
  mode
- Fix interpretation of a few corner case aarch64 SEH unwind opcodes
- Support for FAT LTO (compile with -ffat-lto-objects, link with
  -Wl,--fat-lto-objects)
- llvm-objcopy: Support the -p option for COFF targets
- llvm-readobj: A new option --coff-pseudoreloc for dumping information
  and symbols for mingw runtime pseudo relocations
- Lots of various fixes for the cygwin target
- Improve linking a custom CRT with binutils ld (by passing the custom
  CRT -l option at the same place as the original default -lmsvcrt)
- Make lld use the right mingw specific DLL entry point implicitly,
  improving some Rust use cases
- Fix running the libcxx tests with optimization for mingw targets,
  allowing more test coverage of the code generation paths
2026-01-16 13:09:06 +02:00
Martin Storsjö f06d2218d6 build-mingw-w64: Bump to the current version as of Jan 16th 2026-01-16 12:48:50 +02:00
Martin Storsjö f5335a4479 github: Run test-toolchain using busybox rather than msys2 2026-01-08 11:34:24 +02:00
Martin Storsjö 8220db557f run-tests: Use mingw32-make in busybox
This is the make tool we'd expect to use in such a setup.
2026-01-08 11:34:24 +02:00
Martin Storsjö 98a14ed36f test: Support mingw32-make running with a proper sh.exe 2026-01-08 11:34:24 +02:00
Martin Storsjö 90633bc87b run-tests: Add busybox specific logic for figuring out what architectures we can execute 2026-01-08 11:34:24 +02:00
Martin Storsjö e2a64961c6 release.sh: Enable WITH_BUSYBOX 2026-01-08 11:34:24 +02:00
Martin Storsjö 17864b5274 github: Build busybox in the windows toolchains 2026-01-08 11:34:24 +02:00
Martin Storsjö 64363c14db build-busybox: Disable make, copy mingw32-make.exe as make.exe
The built-in make is a POSIX make tool, which doesn't support
GNU make features.

As we do have GNU make, insert that as "make.exe" in the busybox
directory. Don't do that in the main llvm-mingw bin directory,
which can be used with other environments (e.g. msys2), where the
native make is to be preferred.
2026-01-08 11:34:00 +02:00
Martin Storsjö 1c87f45543 dockerfile: Add an option for building busybox 2026-01-08 11:32:12 +02:00
Martin Storsjö e4bee5bfa4 build-cross-tools: Add an option for building busybox 2026-01-08 11:32:12 +02:00
Martin Storsjö 15659f926b build-busybox: Disable CONFIG_FEATURE_FAIL_IF_UTF8_MANIFEST_UNSUPPORTED
This allows running the built busybox on older versions of
Windows that don't support the utf8 manifest. (The utf8 manifest
is supported since Windows 10 update 1903.)
2026-01-08 11:32:12 +02:00
Martin Storsjö 49aa05c5bc build-busybox: Disable building the AR applet
When building with mingw32-make, it prefers executing commands
through "sh.exe" if it is available.

When busybox sh.exe executes "ar", it prefers executing its own
internal tool over a potential external tool found in $PATH.

(This can be avoided by setting 'export BB_OVERRIDE_APPLETS="ar"',
but as this build of busybox is expected to be used with llvm-mingw,
disable the built-in "ar" tool outright.)
2026-01-08 11:32:12 +02:00
Martin Storsjö 8fb8fb4b05 build-busybox: Add a script for building busybox for Windows 2026-01-08 11:32:12 +02:00
Martin Storsjö 4a02966e4b build-make: Install the license file 2026-01-08 11:31:52 +02:00
Martin Storsjö 0b6cd54c4f build-mingw-w64-tools: Add a .txt suffix on the COPYING files 2026-01-08 11:31:38 +02:00
Martin Storsjö 9e00ce96c7 build-python: Install the license files for libffi and python 2026-01-08 11:26:44 +02:00
Martin Storsjö 83a3ca8e09 build-llvm: Disable LLVM_ENABLE_BINDINGS
According to https://github.com/mstorsjo/llvm-mingw/issues/533,
if OCaml support is detected and the LLVM OCaml bindings are built,
they are attempted to be installed in a path that require root access.
2025-12-26 00:35:35 +02:00
Martin Storsjö 6465b7f2ca github: Cache the gnu make tarball in the msvcrt build too
This applies the changes from b0bbde0073
to the msvcrt toolchain build as well.
2025-12-17 13:48:30 +02:00
Martin Storsjö 88f330fefc build-llvm: Bump to LLVM 21.1.8 2025-12-16 15:15:59 +02:00
Martin Storsjö ecabce6cc3 build-mingw-w64: Bump to the latest version as of Dec 16th 2025-12-16 15:15:28 +02:00