228 Commits

Author SHA1 Message Date
Martin Storsjö 170b7e1ec4 build-llvm: Bump to LLVM 22.1.8 2026-06-16 22:02:42 +03:00
Martin Storsjö 0272df2cc1 build-llvm: Bump to LLVM 22.1.7 2026-06-02 12:20:07 +03:00
Martin Storsjö 8adc11d4cf build-llvm: Bump to LLVM 22.1.6 2026-05-19 12:27:40 +03:00
Martin Storsjö ba72461e23 build-llvm: Bump to LLVM 22.1.5 2026-05-05 22:53:07 +03:00
Martin Storsjö 81fba99f8a build-llvm: Bump to LLVM 22.1.4 2026-04-21 11:59:07 +03:00
Martin Storsjö 49df766757 build-llvm: Bump to LLVM 22.1.3 2026-04-07 14:08:35 +03:00
Martin Storsjö 16f4a0af0c build-llvm: Bump to LLVM 22.1.2 2026-03-24 23:42:53 +02:00
Martin Storsjö cb0e9ef0be build-llvm: Bump to LLVM 22.1.1 2026-03-11 09:39:31 +02:00
Martin Storsjö 9610c61240 build-llvm: Bump to LLVM 22.1.0 final 2026-02-24 10:26:41 +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ö 498cc00a1d build-llvm: Bump to LLVM 22.1.0 RC 2 2026-01-27 13:33:36 +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ö 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ö 88f330fefc build-llvm: Bump to LLVM 21.1.8 2025-12-16 15:15:59 +02:00
Martin Storsjö 1ce1cf7c3d build-llvm: Allow overriding the llvm repo url through LLVM_REPOSITORY
This matches the existing LLVM_VERSION env variable.
2025-12-08 14:50:42 +02:00
Martin Storsjö 1c915916c7 build-llvm: Bump to LLVM 21.1.7 2025-12-02 11:29:17 +02:00
Martin Storsjö 259cd18db3 build-llvm: Bump to LLVM 21.1.6 2025-11-18 14:40:09 +02:00
Martin Storsjö 466fbcb68f build-llvm: Bump to LLVM 21.1.5 2025-11-04 11:47:32 +02:00
Martin Storsjö 035a464964 build-llvm: Bump to LLVM 21.1.4
This version fixes catching pointer data types by reference in C++.

This version also fixes throwing C++ exceptions on aarch64 with
a debugger attached to the process.

Finally, this version fixes delayimport calling of C++ methods that
return structs on aarch64.
2025-10-21 11:30:59 +03:00
Martin Storsjö 6f078940a3 build-llvm: Bump to LLVM 21.1.3 2025-10-07 22:33:31 +03:00
Martin Storsjö 796122a107 build-llvm: Bump to LLVM 21.1.2 2025-09-24 09:42:54 +03:00
Martin Storsjö 1afe639326 build-llvm: Bump to LLVM 21.1.1 2025-09-10 11:45:56 +03:00
Martin Storsjö e455d4c3cb build-llvm: Add an option --use-linker=
This allows overriding which linker to use.

Currently, building LLVM on Ubuntu 25.10 with these scripts fails,
if LLD is available. This, because the GCC on that distribution
produces object files that LLD (and gold) rejects during linking - see
https://github.com/llvm/llvm-project/issues/156667 for details.

By building with --use-linker=bfd, linking does succeed in that
configuration.

Also pass the same option through from build-all.sh.
2025-09-04 23:24:42 +03:00
Martin Storsjö 9347c21f74 build-llvm: Print a warning if we get more than one catch-all option
In this case it's usually an option that wasn't recognized
(although the misrecognized option may have been an earlier
option and the current one may be the intended prefix).
2025-09-04 15:38:08 +03:00
Martin Storsjö ebde75f350 build-llvm: Simplify handling of the --pgo=<file> option
These variable expansions/modifications work the same if the
option "--pgo" is specified - so either we can simplify the
stripping of the "--pgo=" prefix, or we can just skip the check,
similar to the case above with --instrumented.
2025-09-04 15:08:17 +03:00
Martin Storsjö 096033f443 build-llvm: Bump to LLVM 21.1.0 final 2025-08-26 22:37:10 +03:00
Martin Storsjö 9abe6a8f31 build-llvm, build-cross-tools: Include --no-llvm-tool-reuse in the help listings 2025-08-13 13:36:56 +03:00
Martin Storsjö 5bade09998 build-llvm: Bump to LLVM 21.1.0 RC 3 2025-08-12 13:37:27 +03:00
Martin Storsjö fd7848ea84 build-llvm: Bump to LLVM 21.1.0 RC 2 2025-07-30 10:38:30 +03:00
Martin Storsjö 39f4179af6 build-llvm: Fix using a relative PREFIX path
This fixes a regression from
6d31f358d8, which shows up as
"./strip-llvm.sh: 129: cd: can't cd to share" when running
build-all.sh, fixing
https://github.com/mstorsjo/llvm-mingw/issues/509, and the root
issue behind https://github.com/mstorsjo/llvm-mingw/pull/507.
2025-07-29 22:25:29 +03:00
Martin Storsjö ae0357758c build-llvm: Bump to LLVM 21.1.0 RC 1
Relevant changes include:
- Lots of work for supporting ARM64EC and ARM64X
- LLD now produces more compact string tables in executables (only
  relevant when including debug symbols)
- llvm-rc now supports multiplication/division expressions, like GNU
  windres
- Improved support for armv7 and aarch64 in libunwind (for Itanium
  ABI "forced unwinding", which I'm not aware of being used in
  practice anywhere)
- Made the libunwind, libcxxabi, libcxx and compiler-rt tests pass on
  armv7 and aarch64 mingw
- Made the llvm/clang tests pass on aarch64 mingw
2025-07-17 22:22:24 +03:00
Martin Storsjö a1f6413e5c build-llvm: Bump to LLVM 20.1.8 2025-07-09 19:50:09 +03:00
Martin Storsjö a41085f7d9 build-llvm: Set CMAKE_STRIP when cross compiling with Clang
If using Clang from /usr/bin, this makes it clear to CMake to use
$HOST-strip, as it otherwise may pick plain /usr/bin/strip, which
may not be able to strip the cross built executables.
2025-06-30 14:12:02 +03:00
Martin Storsjö 9d5860a02d build-llvm: Set CMAKE_ASM_COMPILER_TARGET when cross compiling with Clang
CMAKE_ASM_COMPILER is set implicitly from CMAKE_C_COMPILER,
but the target flags aren't implied in the same way.

This fixes cross compiling LLVM with clang for an x86_64 target.

This wasn't an issue when cross compiling LLVM with clang for an
aarch64 target, because the BLAKE3 aarch64 SIMD is in the form
of a C file (with intrinsics), not a standalone .S file.
2025-06-30 14:12:02 +03:00
Martin Storsjö ee2239a2b8 build-llvm: Unset CLEAN in build-llvm for --macos-native-tools
In this case, we want to incrementally build the remaining tools,
not do a full build. In case someone runs build-all.sh with CLEAN
set, the --macos-native-tools invocation of build-llvm.sh shouldn't
wipe the build directory.
2025-06-30 00:18:22 +03:00
Martin Storsjö 6d31f358d8 build-llvm: Add options for doing PGO builds
Passing --instrumented=IR or --instrumented=Frontend builds
instrumented tool binaries. After running them and merging the
output profile files, run build-llvm.sh with
--profile=profile.profdata.
2025-06-25 11:51:06 +03:00
Martin Storsjö 19f1c90a15 build-llvm: Add a --macos-native-tools option
This augments the result of an earlier build, with tools required
for building for macOS with the tools built with build-llvm.sh.
2025-06-25 11:51:06 +03:00
Martin Storsjö f5d8121ea2 build-llvm: Use llvm-libtool-darwin if doing LTO macOS builds with a custom clang 2025-06-25 11:51:06 +03:00
Martin Storsjö efb8b34932 build-llvm: Support using --with-clang in a --host cross build
When cross compiling with llvm-mingw, we already implicitly use
clang and lld, but we don't need to specify these options as they
are set implicitly via the llvm-mingw wrappers.
2025-06-25 11:51:06 +03:00
Martin Storsjö 5f28a085f5 build-llvm: Change the (unused) --stage2 option into --with-clang
Don't use tools from $PREFIX/bin automatically; this can be
confusing and problematic. If running with $PREFIX/bin in path,
the build at this stage gets reconfigured if rebuilding after
installing clang.

For multistage builds, install into separate toolchain
directories and add the right one to $PATH before invoking
build-llvm.sh. If one really wants to use the tools from $PREFIX
for a new build into the same directory, one has to add that
directory to the path manually.
2025-06-25 11:51:06 +03:00
Martin Storsjö 28748c4b2d build-llvm: Bump to LLVM 20.1.7 2025-06-13 09:56:49 +03:00
Martin Storsjö fc13a3a5b1 build-llvm: Implicitly set LLVM_USE_RELATIVE_PATHS_IN_FILES when using ccache
This is an option I set outside of this script in a number of
build cases where I build with ccache; move this into the script.

In practice it has little effect though; one has to set
CCACHE_BASEDIR anyway in order to be able to share a ccache
between build directories.

If enabling ccache by adding e.g. /usr/lib/ccache to the front of
PATH, without using the COMPILER_LAUNCHER variable, this won't
get enabled.
2025-06-11 16:48:03 +03:00
Martin Storsjö 40ccfd163e build-llvm: Bump to LLVM 20.1.6 2025-05-28 23:03:14 +03:00
Martin Storsjö 5609c66213 build-llvm: Bump to LLVM 20.1.5 2025-05-14 22:25:18 +03:00
Martin Storsjö 4c82a47afb build-llvm: Bump to LLVM 20.1.4 2025-04-30 12:07:34 +03:00
Martin Storsjö c608b57a2e build-llvm: Bump to LLVM 20.1.3 2025-04-17 14:56:18 +03:00
Martin Storsjö c2b534c206 build-llvm: Bump to LLVM 20.1.2
This version adds support for the --identify flag in llvm-dlltool.
2025-04-02 11:47:31 +03:00
Martin Storsjö 4ba1178755 build-llvm: Bump to LLVM 20.1.1 2025-03-19 11:18:31 +02:00
Martin Storsjö dc3e0ecbe6 build-llvm: Bump to LLVM 20.1.0 final 2025-03-05 09:48:25 +02:00