Commit Graph
100 Commits
Author SHA1 Message Date
Martin Storsjö 4555fcebc9 github: Bundle dependencies from MSYS2 into the output toolchain
This makes the built toolchain usable outside of MSYS2 too.

For running tests, this has another very subtle effect.

If the toolchain is built in the MSYS2 clang64 environment, the
compiler binary depends on libc++.dll. This DLL is found in $PATH,
in /clang64/bin.

When building/running tests, the current working directory will be
e.g. llvm-mingw/test/x86_64. At some point while building/running
tests, the test makefile will copy the llvm-mingw toolchain's
runtime DLLs into this directory in order to be able to execute those
newly built binaries. This also includes another, different libc++.dll.

When a libc++.dll exists in the current directory, this is preferred
over the one found further back in $PATH in /clang64/bin. As this
file is copied in parallel with other build jobs that might be
doing compilation, those compilation processes may end up loading
this other DLL. If fully copied it probably shouldn't be an issue,
but if not fully copied yet, who knows what might happen.

By making sure that there is a libc++.dll in the same directory as
the toolchain executables (rather than expecting it to be found
further back in $PATH), we ensure that this DLL is loaded and used
instead of the one in the current directory.

This should fix stray errors when running tests in the clang64
environment.
2023-12-07 13:33:53 +02:00
Martin Storsjö d2512dde21 build-python: Bump to the latest version of cpython-mingw
This version fixes a race condition in the build, which in most
cases was benign but in rare cases could successfully build a Python
that would crash at runtime.
2023-12-07 13:33:53 +02:00
Martin Storsjö 13827fe666 build-python: Install a versionless python.exe in addition to python3.exe
This can make it marginally easier to use it, even if the embedded
Python installation isn't that much meant to be used for various
external purposes.
2023-12-07 13:33:53 +02:00
Martin Storsjö 5000bc4c97 github: Update the branch of python used for scheduled builds 2023-12-07 13:33:53 +02:00
Martin Storsjö 387bfba3cb build-llvm: Bump to LLVM 17.0.6 2023-11-28 13:19:45 +02:00
Martin Storsjö 5c50839423 build-mingw-w64: Bump to the latest version as of Nov 28th 2023-11-28 13:19:26 +02:00
Martin Storsjö 81a72d5762 build-llvm: Use a faster linker for native building, if available
Use lld or gold, if available - they are significantly faster than
ld.bfd on Linux.
2023-11-28 00:02:50 +02:00
Martin Storsjö 0f24a65373 build-python: Bump to the latest version of Python 3.11.6 from msys2 2023-11-28 00:02:44 +02:00
Martin Storsjö 5700ed3e85 build-lldb-mi: Bump to the latest version from git 2023-11-27 11:29:48 +02:00
Martin Storsjö 57298c1a93 build-llvm: Bump to LLVM 17.0.5 2023-11-14 12:42:27 +02:00
Martin Storsjö eeffd71064 build-mingw-w64: Bump to the latest version as of Nov 14th 2023-11-14 12:42:08 +02:00
Martin Storsjö ceb97dadc3 strip-llvm: Include the lldb-dap tool
In LLVM 18, the lldb-vscode tool has been renamed to lldb-dap.
2023-11-10 13:44:33 +02:00
Martin Storsjö c70261f922 github: Compile i686 libcxx tests with an x86_64 build of the compiler
Some tests in the libcxx testsuite require more than 2 GB of memory
to compile currently.
2023-11-03 11:23:48 +02:00
Martin Storsjö 845805bcfe github: Set the test parameter large_tests=False for the libcxx tests
This skips test that use a lot of memory. In particular, there's
one test that would use up to 6.8 GB of memory, while the GitHub
Actions runners only have 8 GB of memory available.

This parameter was added in 122064a6303eb9c06e0af231f5a4ce145d9a2e67
in the llvm-project main branch, and backported to 17.x in
aa03fba83b17bbfcd9ed869efed2818b503875d6.
2023-10-31 11:05:52 +02:00
Martin Storsjö f168c089c4 build-llvm: Bump to LLVM 17.0.4 2023-10-31 11:05:20 +02:00
Martin Storsjö 4d9b8a9bda build-mingw-w64: Bump to the latest version as of Oct 31st
This version prefers the UCRT version over the builtin one from
libmingwex.a for a number of math functions.
2023-10-31 11:04:35 +02:00
Martin Storsjö fa8df6b193 github: Run the libcxx tests with "-v --time-tests"
This allows seeing the names of tests as they are executed, making
the intermediate log output on github actions more useful. It
also makes it easier to correlate test issues between tests as
they are executed (e.g. if one test causes another one to run out
of memory).

Also run with --time-tests, allowing identifying slow tests.

This was already applied in the separate libcxx test job added in
7483eae1821766a0f84dbd96f5619058f7065008; this backports the change
into the test job in the main build file.
2023-10-31 11:04:03 +02:00
Martin Storsjö c1dfe42094 test: Remove an exception for a glibc test failure in crt-test
I no longer can reproduce the issue that this works around; neither
on current environments or when testing building with older
distributions.
2023-10-27 10:32:10 +03:00
Martin Storsjö e4534c56fa test: Split the math tests in crt-test into many smaller functions
This speeds up compilation a bit further.
2023-10-27 10:31:55 +03:00
Martin Storsjö 5e45947c20 test: Split the main function in crt-test to a couple smaller functions
This speeds up compilation with LLVM a little bit.
2023-10-26 12:01:17 +03:00
Martin Storsjö 0f79bd9460 test: Reset the iret variable inbetween tests of frexp 2023-10-26 12:01:17 +03:00
Martin Storsjö 58cbdf9453 build-llvm: Bump to LLVM 17.0.3
This version fixes the following issues for mingw/windows targets:
- Fix linking the lli tool if built with asan enabled
- Fix compiling for the aarch64 target if specifying -mtune=cortex-a53
- Fix initialization order among constructors within one translation unit
2023-10-17 09:51:55 +03:00
Martin Storsjö 52ebafb50b build-mingw-w64: Bump to the latest version as of Oct 17th 2023-10-17 09:51:28 +03:00
Martin Storsjö 0f8d5f068f build-python: Bump Python to 3.11.6 2023-10-06 16:34:12 +03:00
Martin Storsjö a711bb4ed0 build-python: Bump libffi to version 3.4.4
This is the latest release version.

This requires a newer version of Autoconf than what is available
out of the box in Ubuntu 20.04.
2023-10-06 16:33:59 +03:00
Martin Storsjö d21c2d4716 build-llvm: Bump to LLVM 17.0.2
This contains a few bugfixes for mingw use cases:
- LLD in 17.0.1 and the earlier 17.x release candidates looked up
  libraries (including libraries named as a relative path) preferring
  to search in toolchain relative paths over first testing from the
  current directory. In some cases, this could cause cryptic build
  failures; see https://github.com/llvm/llvm-project/issues/67779.
- Options that only are relevant for linking, like -mwindows, used
  to be accepted (but produce a warning) if used in a compilation-only
  job. In the earlier 17.x releases/RCs, such warnings caused an
  error instead; see https://github.com/llvm/llvm-project/issues/64464
  and https://github.com/mstorsjo/llvm-mingw/issues/371.
2023-10-03 10:34:07 +03:00
Martin Storsjö 61845977e7 build-mingw-w64: Bump to the latest version as of Oct 3rd
In addition to the usual sets of assorted updates, this brings
some more additions to the main d3d12 header, and adds the
d3d12video.h header.
2023-10-03 10:08:31 +03:00
Martin Storsjö a10755cbd5 build-llvm: Install and keep llvm-cxxfilt
This only provides the main binary llvm-cxxfilt; it doesn't
provide the binutils-style frontends named [<triple>-]c++filt.

If we were to provide such frontends, we'd need to make them
default to --strip-underscore for i686 triple prefixes, and
for the prefixless case when the default architecture is i686.
2023-10-02 14:44:48 +03:00
Martin Storsjö 2bfe3e7c48 Remove setting the unused variable NINJA in build shell scripts
This variable ended up unused in
b89cdef107.
2023-09-21 12:42:03 +03:00
Martin Storsjö 6c3f283dcd github: Explicitly install ninja where needed in Windows jobs
Ninja isn't documented as one of the tools provided by the CI runner
images, but it used to be available implicitly installed before
in the windows-2022 images. Since the 20230918.1.0 image update,
it no longer is available out of the box; see
https://github.com/actions/runner-images/issues/8343.
2023-09-21 00:15:02 +03:00
Martin Storsjö dc034e2860 build-llvm: Bump to LLVM 17.0.1 final
There was a minor issue with the version information in what
was tagged as 17.0.0, so 17.0.1 is the first proper stable
release on the 17.x release branch.
2023-09-19 14:07:04 +03:00
Martin Storsjö 047b5e0574 build-mingw-w64: Bump to the latest version as of Sep 19th
This brings in a rather large update of the D3D12 header
(d3d12.idl/d3d12.h), which should now be mostly complete and up
to date with the current versions from Microsoft.
2023-09-19 14:04:39 +03:00
Martin Storsjö 7483eae182 github: Add a manual job for running the libcxx/libcxxabi/libunwind tests
This is included already in the main build pipeline, but disabled
by default. This allows easily running this on top of a recent
separate pipeline.
2023-09-14 15:12:39 +03:00
Martin Storsjö 2674a65315 github: Add a manual job for running the llvm/lld/clang/clang-tools-extra tests 2023-09-14 13:08:00 +03:00
Martin Storsjö dd569ce86a github: Clarify the name of some of jobs relating to fetching artifacts 2023-09-13 14:16:14 +03:00
Martin Storsjö 5ee46738a1 build-llvm: Bump to LLVM 17.0.0 RC 4 2023-09-05 22:00:10 +03:00
Martin Storsjö 1749eb26c1 build-mingw-w64: Bump to the latest version as of Sep 5th 2023-09-05 21:59:10 +03:00
Martin Storsjö 58339108ba github: Build the split-file executable for the compiler-rt tests too
Since f52f8e817ea36e003e8f09672de48c3c460093f4 (Aug 28th) in
llvm-project, this is needed for one test in compiler-rt.
2023-08-29 14:33:09 +03:00
Martin Storsjö e3545e2ffc build-llvm: Bump to LLVM 17.0.0 RC3 2023-08-22 11:32:22 +03:00
Martin Storsjö b56335ba08 build-mingw-w64: Bump to the current version as of Aug 22nd 2023-08-22 11:32:22 +03:00
Martin Storsjö e7238335e7 build-python: Bump to Python 3.11.4
This is the current version packaged in MSYS2.
2023-08-18 22:30:29 +03:00
Martin Storsjö 464de1eb89 build-llvm: Bump to LLVM 17.0.0 RC2 2023-08-10 08:02:07 +03:00
Martin Storsjö 8797dfdbf3 build-mignw-w64: Bump to the latest version as of Aug 9th 2023-08-10 08:02:07 +03:00
Martin Storsjö b46ae2b8f6 build-lldb-mi: Bump to the latest version from git 2023-08-10 08:02:07 +03:00
Martin Storsjö a861db9f43 github: Build LLDB for Linux too
Disable Python, to make the LLDB executables more portable,
so they don't rely on whatever version might have been installed on
the GitHub Actions runner.
2023-08-01 10:05:54 +03:00
Martin Storsjö 8b01a132c5 github: Build lldb on macos, but only disable python 2023-08-01 10:01:45 +03:00
Martin Storsjö fec22cf2dd github: Update comments regarding tests and the pinned llvm version 2023-07-29 23:47:33 +03:00
Martin Storsjö bad114ca4e build-llvm: Bump to LLVM 17.0.0 RC1
Relevant changes since 16.0.6 are:
- Improve Address Sanitizer on i686 mingw
- Improve handling of X86 Intel assembly syntax
- Fix using std::wcout/wcin/wcerr with streams configured in wide mode
- Improve handling of the .arch and .arch_extension assembly directives
  on aarch64
- Support the --temp-prefix (ignored) and --no-leading-underscore
  options in llvm-dlltool
- Make lld warn about too narrow pseudo relocations, simplifying finding
  issues that otherwise only show up at runtime
- Improved the tests, making compiler-rt, libcxxabi and libunwind tests
  pass in mingw configurations
2023-07-29 23:47:19 +03:00
Martin Storsjö 39f3bbfae6 build-mingw-w64: Bump to the latest version as of July 29th 2023-07-29 13:46:22 +03:00
Martin Storsjö f03e8e9f8e docker: Install a newer CMake
LLVM 17 requires CMake 3.20 or newer, while Ubuntu 20.04 ships with
CMake 3.16.3.
2023-07-29 13:45:29 +03:00
Martin Storsjö c18225c0d0 build-make: Bump to GNU make 4.4.1
Versions 4.3 and above only come packaged as .tar.gz and .tar.lz,
and the lzip decompressor is less commonly readily available, thus
switch back to the .tar.gz format.
2023-07-20 10:53:08 +03:00
Martin Storsjö df2d78fbd7 build-make: Take the CLEAN variable into account like in other scripts 2023-07-20 10:53:08 +03:00
Martin Storsjö fa0eec51be strip-llvm: Retain clang-format and related files 2023-07-10 00:52:51 +03:00
Martin Storsjö 271242426a build-llvm: Bump to LLVM 16.0.6 2023-06-14 09:20:01 +03:00
Martin Storsjö b2ea9ee944 build-mingw-w64: Bump to the latest version as of June 14th 2023-06-14 09:20:01 +03:00
Martin Storsjö 5d33931b6a run-lldb-tests: Convert a missed direct use of objcopy.exe to $OBJCOPY
This was missed in 299f03fd45.
2023-06-13 12:52:07 +03:00
Martin Storsjö 4fbff5e912 github: Rename the upload-artifacts.yml workflow
It can make the whole release, not only upload artifacts.
2023-06-03 19:53:04 +03:00
Martin Storsjö 7e8bcdc43c build-llvm: Bump to LLVM 16.0.5 2023-06-02 17:42:49 +03:00
Martin Storsjö ed1d727ed7 build-mingw-w64: Bump to the current version as of June 2nd 2023-06-02 17:42:00 +03:00
Martin Storsjö 5d63c28d85 docker: Upgrade to Ubuntu 20.04
Ubuntu 20.04 comes with CMake 3.16, so there's no need to install
a custom version of CMake for now (for LLVM 16.x; LLVM 17 will have
the requirement raised to CMake 3.20 though).

Also drop the workaround for git issues in the old version in
Ubuntu 18.04.

The latest releases that are built on GitHub Actions without
docker are based on Ubuntu 20.04 anyway, so there's less demand
for building this with an older version for the sake of
compatibility of the built binaries. For users using the built
docker image as such, having it based on a newer base distribution
is beneficial.
2023-06-01 19:54:57 +03:00
Martin Storsjö 64b27a1c56 github: Add a manual workflow for building and pushing docker images 2023-06-01 19:54:57 +03:00
Martin Storsjö bf58d32dc4 docker: Make the CMake download and extraction less verbose
The wget command can easily print 800 lines to the docker output
log, and the tar unpacking prints over 6000 lines.
2023-06-01 19:54:57 +03:00
Martin Storsjö 1d7cf51b96 github: Add a manual workflow for building extra msvcrt binaries
They can optionally be uploaded to a release.
2023-06-01 19:54:57 +03:00
Martin Storsjö 41c45dafd8 github: Generalize the linux-cross-windows job for other CRTs 2023-06-01 19:54:57 +03:00
Martin Storsjö 5cc5132bff github: Name the windows artifacts windows-ucrt-<arch>-toolchain 2023-06-01 19:54:57 +03:00
Martin Storsjö 1b9fb522f5 github: Rename the macos-toolchain artifact to macos-ucrt-toolchain 2023-06-01 19:54:00 +03:00
Martin Storsjö 1e982132d5 github: Rename the linux-aarch64-toolchain artifact to linux-ucrt-aarch64-toolchain 2023-06-01 11:25:03 +03:00
Martin Storsjö 6a296622e0 github: Rename the linux-toolchain artifact to linux-ucrt-x86_64-toolchain 2023-06-01 11:25:03 +03:00
Martin Storsjö 2f2114eed8 build-all: Add options for rebuilding runtimes only
This allows rebuilding runtimes with e.g. a different default CRT.
2023-06-01 11:25:03 +03:00
Martin Storsjö a7ff217a5b github: Allow creating a tag and release programmatically
This verifies that the chosen tag name matches what was set as
TAG in the workflow that artifacts are pulled from.
2023-06-01 11:24:37 +03:00
Martin Storsjö 87ab2cb43d github: Expose the job properties (TAG and versions) in an artifact too
While we use the job outputs since 18bd3665ac,
having the info available in an artifact makes it easier to
fetch this in later separate workflows.
2023-06-01 11:23:41 +03:00
Martin Storsjö bf2e255b5f github: Allow specifying either a commit or a branch for fetching artifacts 2023-06-01 11:23:04 +03:00
Martin Storsjö f03d94dbdc github: Update a comment 2023-06-01 11:20:55 +03:00
Martin Storsjö 37ec895756 github: Distinguish between push and scheduled pipelines when fetching artifacts 2023-05-31 11:11:38 +03:00
Martin Storsjö 3184cb2060 wrappers: Don't rely on "readlink -f"
Older macOS versions (macOS 12.2 at least) don't support this
option, while newer macOS versions do support it (macOS 12.6).

The solution is based on https://stackoverflow.com/a/1116890/3115956,
but simplified for this usecase.
2023-05-23 11:23:27 +03:00
Martin Storsjö fc5d2c9b21 github: Run on pull requests too 2023-05-23 11:22:57 +03:00
Martin Storsjö 274a30cff5 build-llvm: Bump to LLVM 16.0.4 2023-05-17 09:02:02 +03:00
Martin Storsjö 99701ab202 build-mingw-w64: Bump to the latest version as of May 17th 2023-05-17 09:01:43 +03:00
Martin Storsjö 995d3ac516 github: Run all the compiler-rt tests, on both i686 and x86_64
These tests should now all pass on both architectures; the
check-asan tests for the static CRT are skipped automatically,
the failures in check-interception have been fixed by compiling
the tests with the --large-address-aware flag, and the
check-asan-dynamic tests on i686 have been fixed - all by
Alvin Wong.
2023-05-05 08:27:15 +03:00
Martin Storsjö 001c3a2bcf build-llvm: Bump to LLVM 16.0.3 2023-05-03 22:49:42 +03:00
Martin Storsjö 4ad11c7bec build-mingw-w64: Bump to the current version as of May 3rd 2023-05-03 22:49:40 +03:00
Martin Storsjö 0b185b62d1 build-compiler-rt: Make the CMAKE_C_COMPILER_TARGET vendor field consistent
Currently, there's no practical difference if the spelling of this
triple is inconsistent, but if we'd enable e.g. the per-target
runtime directories, the exact spelling does make a difference.

For consistency, pass CMAKE_C_COMPILER_TARGET with the exact right
spelling everywhere.
2023-04-29 22:30:41 +03:00
Martin Storsjö 06ff1fdd4f Revert "build-compiler-rt: Stop setting CMAKE_*_COMPILER_WORKS"
This reverts commit 056cb22fb5.

The fix for avoiding needing to set CMAKE_*_COMPILER_WORKS,
which means setting CMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
when intiailizing the CMake project setup, was only possible to
apply on compiler-rt/lib/builtins, not other similar projects
like libunwind/libcxxabi/libcxx - so it's expected to keep needing
to set the CMAKE_*_COMPILER_WORKS flags.

Therefore it's also possible that the code in compiler-rt/lib/builtins
could be reverted, as it does have some other minor inconveniences
(it causes some other feature detections to fail, even if they're
harmless within the builtins).

Thus keep setting CMAKE_*_COMPILER_WORKS everywhere consistently.
2023-04-29 22:26:35 +03:00
Martin Storsjö a8629002bf github: Do rudimentary testing of the cross-built aarch64 toolchain with qemu
Verify that it can compile the tests in llvm-mingw's testsuite;
this should serve as a smoke test to see that the toolchain is
correctly assembled.
2023-04-28 10:04:39 +03:00
Martin Storsjö 0e13ea4e5a build-llvm: Bump to LLVM 16.0.2
A couple relevant changes since 16.0.0:
- Fix compilation for ARM (failures in generating SEH unwind info)
  for very specific cases
- Link the ASAN DLL before other libs and objects, to make sure it gets
  initialized as early as possible
- Allow double backslashes in the PATH in ASAN
- Allow llvm-rc to look for a clang executable named "clang-16", if the
  other alternatives aren't available
- Improve the performance of buffered raw_ostream within LLVM
2023-04-27 10:50:36 +03:00
Martin Storsjö cc197e4ae6 build-mingw-w64: Bump to the current version from April 24th 2023-04-27 10:50:36 +03:00
Martin Storsjö 46215b2510 build-python: Bump to Python 3.10.11 2023-04-27 10:50:36 +03:00
Martin Storsjö 4855077598 build-lldb-mi: Bump to the latest current version 2023-04-27 10:50:36 +03:00
Martin Storsjö 1fb5681e58 github: Add a job for cross compiling the toolchain for linux on aarch64 2023-04-27 10:47:51 +03:00
Martin Storsjö 1ab52ba4a3 github: Generalize the patterns for moving artifacts that are to be uploaded
Exclude the artifacts from the asserts build, if available.
2023-04-27 10:47:15 +03:00
Martin Storsjö 525489a018 github: Rename the linux-cross job to linux-cross-windows 2023-04-26 19:18:24 +03:00
Martin Storsjö 75c4092b8f Add a script for preparing a cross-built toolchain for the unix layout 2023-04-26 19:18:24 +03:00
Martin Storsjö 8f3c096ef5 build-all: Allow passing --host for cross compiling the tools 2023-04-26 19:18:24 +03:00
Martin Storsjö 06f44cda62 Support cross compilation to non-windows targets
Don't have --host/$HOST imply targeting Windows, but actually inspect
the target triple where necessary.
2023-04-26 19:18:24 +03:00
Martin Storsjö c49af4399a github: Skip dependencies (libxml2, terminfo) in linux builds that have little value in our context
The fewer dynamic library dependencies we have, the easier it is
to run the binaries on other linux distributions than the one it
was built on.

In the docker based releases, these libraries haven't been installed
and thus haven't been used so far.

The docker based releases haven't linked against zlib though, but
keep linking against that, since that should have a quite stable
ABI and not cause much binary compatibility issues.
2023-04-26 10:01:42 +03:00
Martin Storsjö af99275e2e Remove unnecessary empty cases in shell scripts 2023-04-26 10:01:21 +03:00
Martin Storsjö 21da44ac93 build-lldb-mi: Sync cross compilation logic improvements from build-llvm.sh 2023-04-26 10:01:21 +03:00
Martin Storsjö fbb0af91b3 readme: Mention and link to the nightly builds 2023-04-25 13:29:20 +03:00
Martin Storsjö 12434469b9 github: Add a separate manual workflow for uploading artifacts to a release 2023-04-25 09:59:28 +03:00
Martin Storsjö 586a9acf02 github: Upload all artifacts from scheduled builds to the "nightly" release 2023-04-25 09:59:28 +03:00