Commit Graph
100 Commits
Author SHA1 Message Date
Alex Rønne Petersen 151314346d Merge pull request #25055 from ziglang/llvm21
LLVM 21
2025-08-30 21:00:53 +02:00
Alex Rønne Petersen 8896046b11 ci: update tarballs to 0.16.0-dev.104+689461e31 2025-08-30 13:27:25 +02:00
Alex Rønne Petersen d2a038c082 stage1: update zig1.wasm
Needed because some std.Target.aarch64 features were renamed in LLVM 21.

Signed-off-by: Alex Rønne Petersen <alex@alexrp.com>
2025-08-30 13:27:25 +02:00
Alex Rønne Petersen 66b43234bb std: disable sha3-512 single test on RISC-V with V support
https://github.com/ziglang/zig/issues/25083
2025-08-30 13:27:25 +02:00
Alex Rønne Petersen 0071917621 test: disable some varargs behavior tests on RISC-V due to LLVM 21 regression
https://github.com/ziglang/zig/issues/25064
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 3a5b7a31ff test: use -Wno-unterminated-string-initialization for cbe tests
https://github.com/llvm/llvm-project/issues/153314
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 2cb412ff1b test: re-enable a bunch of vector behavior tests on hexagon 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 0683e1564c test: use long calls for hexagon-linux module tests 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen f149112951 test: expand C ABI test coverage to hexagon-linux-musl 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen f6879c35af std.posix.test: fix mmap() test to use actual page size instead of 4096 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 59ee4e8e54 std.hash.xxhash: disable xxhash3 test on all mips64 targets
See also dd1de18f96.

https://github.com/ziglang/zig/issues/23807
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen af78c55676 std: skip some failing tests on hexagon 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 367be3777c std.Thread: make unreachable errors in sleep() clearer 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen e351ee3b7f Revert "llvm: workaround crashes in llvm loop optimizations"
This reverts commit b4fd57a9c1.

https://github.com/llvm/llvm-project/pull/149743
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 907b5b73b4 compiler: remove medium code model workaround for loongarch64
The default was changed in LLVM 21.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen e4f38a611f llvm: switch to native f16 IR type for all hexagon targets
This was fixed in LLVM 21, in particular for targets older than v68.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 1c858ba7e3 llvm: remove f16 special case for soft float aarch64 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen d4882d10f8 llvm: switch to native f128 IR type for nvptx
LLVM 21 added support for this.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 53c53a2697 llvm: switch to native f16 IR type for s390x
LLVM 21 added support for this.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen c4592da882 compiler-rt: use native f16 type for loongarch
This ABI changed in LLVM 21.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen e9ac2ce116 compiler-rt: move strlen from libzigc to here
LLVM 21 has started recognizing strlen-like idioms and optimizing them to strlen
calls, so we need this function provided in compiler-rt for libc-less
compilations.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen dfa55e193d musl: replace .data.rel.ro with .section .data.rel.ro,"aw"
The former was an LLVM extension that appears to have been removed in LLVM 21.

I won't bother fixing gen_stubs.zig; see #23881.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 2b84eb85ee llvm: update data layout strings for LLVM 21 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen c44f631c72 zig cc: pass -mthumb to the assembler as necessary 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 8c47dda7df zig cc: pass CPU features to Clang using the new -Xclangas when assembling
Unfortunately, we cannot yet remove the special-casing for RISC-V CPU features,
so that code stays.

Closes #10411.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen c0cfe571f9 zig cc: update options data to LLVM 21 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 5b80900a5d std.zig.system: update aarch64 and powerpc cpu detection for LLVM 21 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 0b9f5e2549 std.Target: fix alignment for int/long types on m68k 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen fdd32a2257 std.Target: add managarm OS tag 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 464eef390b std.Target: make ultrasparc3 the baseline for sparc64-solaris
https://github.com/llvm/llvm-project/pull/149990
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 978555eea4 std.Target.x86: purge avx10.n-256, rename avx10.n_512 to avx10.n, require evex512 for avx512f
Intel has abandoned AVX10.N/128,256; AVX10.N is now always 512-bit.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 2c0cc81e74 std.Target: bump feature bit count from 288 to 317
/lib/std/debug.zig:559:14: error: reached unreachable code
        if (!ok) unreachable; // assertion failure
                 ^~~~~~~~~~~
    /lib/std/Target/riscv.zig:335:21: note: called at comptime here
        std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
        ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 587eddda28 std.Target: update CPU features to LLVM 21 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 94f95fefe3 update_cpu_features: bump branch quota for amdgcn
/lib/std/Target/amdgcn.zig:1656:5: error: evaluation exceeded 1000 backwards branches
        for (&result, 0..) |*elem, i| {
        ^~~
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 5739ce786e update_cpu_features: fix a fmtId call to be fmtIdPU 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 7e6cb7c7a5 compiler: respond to API changes in LLVM 21 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen ac20506090 libtsan: update to LLVM 21 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen 85438e75e0 libunwind: update to LLVM 21 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen c34fc8f198 llvm-libc: update to LLVM 21
Still only the subset needed for libcxx.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen d9f0fbf983 libcxx: update to LLVM 21 2025-08-30 06:36:40 +02:00
Alex Rønne Petersen e84e9d3a01 libcxxabi: update to LLVM 21 2025-08-30 06:36:40 +02:00
Alex Rønne Petersen ce7339e80a zig cc: update intrinsic headers to LLVM 21 2025-08-30 06:36:40 +02:00
Alex Rønne Petersen b7a8c045ef zig cc: update driver files to LLVM 21 2025-08-30 06:36:40 +02:00
Alex Rønne Petersen 008affa645 build: update to LLVM 21
Closes #20966.
2025-08-30 06:36:40 +02:00
Alex Rønne Petersen 98e9dde389 ci: update to QEMU 10.1.0 2025-08-29 10:52:32 +02:00
Alex Rønne Petersen 5cb8cdef10 Merge pull request #25045 from kada49/libc/common-impl-ceil
libc: delete some superfluous libc c implementations
2025-08-29 00:25:23 +02:00
Alex Rønne Petersen 417c68d249 std.os.linux: powerpc syscalls clobber ctr and xer
https://git.musl-libc.org/cgit/musl/commit/?id=f6944eb3c4ce1c97dc39dc36d32390dc9f70b67b
2025-08-28 07:41:22 +02:00
Alex Rønne Petersen ade570f0d5 zig cc: don't pass -mcmodel for assembly files
It does nothing but generate a warning for these.
2025-08-25 21:59:35 +02:00
Alex Rønne Petersen 9924897c06 Merge pull request #24995 from alexrp/ubsan-rt-hidden
ubsan-rt: export symbols with hidden visibility
2025-08-25 17:07:33 +02:00
Alex Rønne Petersen 5d019abe4e start adding big endian RISC-V support
The big endian RISC-V effort is mostly driven by MIPS (the company) which is
pivoting to RISC-V, and presumably needs a big endian variant to fill the niche
that big endian MIPS (the ISA) did.

GCC already supports these targets, but LLVM support will only appear in 22;
this commit just adds the necessary target knowledge and checks on our end.
2025-08-25 16:15:17 +02:00
Alex Rønne Petersen 837e564312 Compilation: avoid ZCU strategy for ubsan-rt in Windows DLLs 2025-08-25 06:45:31 +02:00
Alex Rønne Petersen afea419470 std.zig.system: fix check for sparc "v8+" in getExternalExecutor()
Targeting v9 on sparc32 doesn't by itself imply "v8+" mode (64-bit instructions
in 32-bit code).
2025-08-25 06:20:41 +02:00
Alex Rønne Petersen bed8171d4e ubsan-rt: export symbols with hidden visibility
see 092352ec63
2025-08-25 05:10:12 +02:00
Alex Rønne Petersen 77c09d16f9 std.fs.Dir: fix updateFile() to flush the file before updating its times
AtomicFile.finish() calls flush() which renders any previous updateTimes() calls
useless. Regression introduced in f2a3ac7c05.

Closes #24927.
2025-08-23 12:32:14 -07:00
Alex Rønne Petersen 07cc32b004 wasi-libc: update to c89896107d7b57aef69dcadede47409ee4f702ee 2025-08-20 19:18:11 +02:00
Alex Rønne Petersen 47e6528762 Merge pull request #24702 from The-King-of-Toasters/syscall-tables
Rewrite Linux syscalls generation
2025-08-15 05:38:02 +02:00
Alex Rønne Petersen be51d69dc7 Merge pull request #24845 from alexrp/netbsd-fixes
Update NetBSD system headers; make TSan cross-compilable for NetBSD
2025-08-14 22:55:02 +02:00
Alex Rønne Petersen 6317417fe1 test: enable tsan test for x86_64-netbsd 2025-08-14 08:25:50 +02:00
Alex Rønne Petersen 234630bb8d netbsd: add some missing system headers
The Lua headers are needed because, yes, NetBSD has a kernel module for Lua
support. soundcard.h is technically a system header but is installed by
libossaudio and so was missed previously.

This also removes some riscv headers that shouldn't have been added because
NetBSD does not yet officially support the riscv32/riscv64 ports.

Closes #24737.
2025-08-14 08:25:08 +02:00
Alex Rønne Petersen 007cc817a1 tsan: remove usage of libnvmm and libncurses headers on netbsd
https://github.com/llvm/llvm-project/pull/153534
2025-08-14 07:11:07 +02:00
Alex Rønne Petersen 27d6614f81 Merge pull request #24825 from alexrp/freebsd-fixes 2025-08-14 01:00:30 +02:00
Alex Rønne Petersen 113d3dd3f0 std.Target: bump default android API level from 24 to 29
According to https://apilevels.com, 88.5% of Android users are on 29+. Older API
levels require libc as of https://github.com/ziglang/zig/pull/24629, which has
confused some users. Seems reasonable to bump the default so most people won't
be confused by this.
2025-08-13 08:59:13 +02:00
Alex Rønne Petersen 662303d7e7 Merge pull request #24734 from Rexicon226/tsan-fix 2025-08-13 08:57:52 +02:00
Alex Rønne Petersen b7602a17f8 freebsd: correctly define __FreeBSD_version to the first stable release
See: https://docs.freebsd.org/en/books/porters-handbook/versions

Closes #24819.
2025-08-13 08:46:52 +02:00
Alex Rønne Petersen e089d21439 freebsd: fix PIC macro not being defined for crt1_s.S
Closes #24818.
2025-08-13 08:40:56 +02:00
Alex Rønne Petersen e37fc57495 tsan: remove usage of libcrypt and libncurses headers
https://github.com/llvm/llvm-project/pull/153351

Closes #24736.
2025-08-13 08:40:35 +02:00
Alex Rønne Petersen 6bb6013d3a Merge pull request #24768 from alichraghi/spv5
spirv: remove prune_unused ISel
2025-08-10 19:45:16 +02:00
Alex Rønne Petersen d984e7d2fa ci: trigger ci-pr-riscv64-linux workflow on unlabeled events
This way, if the ci-riscv64-linux label was added to a PR previously, removing
it will cause the concurrency group of the workflow to cancel the runs triggered
by the label being added.
2025-08-08 17:15:44 +02:00
Alex Rønne Petersen 63b663a63b ci: fix concurrency group for ci-pr-riscv64-linux workflow 2025-08-08 17:11:59 +02:00
Alex Rønne Petersen 87f2dadbf1 ci: run riscv64-linux jobs if ci-riscv64-linux label is applied
This needs to be a separate workflow so that it doesn't interfere with non-CI
labeling of pull requests.
2025-08-08 17:08:14 +02:00
Alex Rønne Petersen ac3229a435 Revert "ci: run riscv64-linux jobs if ci-riscv64-linux label is applied"
This reverts commit 8101104db0.
2025-08-08 17:05:20 +02:00
Alex Rønne Petersen 8101104db0 ci: run riscv64-linux jobs if ci-riscv64-linux label is applied 2025-08-08 16:49:54 +02:00
Alex Rønne Petersen 0d0f09fb0e std.os.windows: map RtlGenRandom() failure to error.SystemResources
Closes #23666.
2025-08-08 07:25:26 +02:00
Alex Rønne Petersen 8843631f7e Merge pull request #24709 from rootbeer/24380-fstatat-race-fix 2025-08-07 16:36:52 +02:00
Alex Rønne Petersen 7ee6dab39f Revert "Sema: Stop adding Windows implib link inputs for extern "..." syntax."
This reverts commit b461d07a54.

After some discussion in the team, we've decided that this is too disruptive,
especially because the linker errors are less than helpful. That's a fixable
problem, so we might reconsider this in the future, but revert it for now.
2025-08-06 06:15:13 +02:00
Alex Rønne Petersen 163e9ce7d9 Merge pull request #24629 from alexrp/android-requires-libc
`std.Target`: require libc for Android API levels prior to 29
2025-08-04 17:59:47 +02:00
Alex Rønne Petersen 65db19a289 Merge pull request #24680 from alexrp/target-os-versions
`std.Target`: Bump min/max OS versions for 0.15.0
2025-08-04 11:02:50 +02:00
Alex Rønne Petersen 493265486c Revert "ci: target baseline instead of spacemit_x60 on riscv64-linux"
This reverts commit fa445d86a1.

Narrator: It did, in fact, make a difference.

For whatever reason, building LLVM against spacemit_x60 or baseline makes no
noticeable difference in terms of performance, but building the Zig compiler
against spacemit_x60 does. Also, the miscompilation that was causing
riscv64-linux-debug to fail was in the LLVM libraries, not in the Zig compiler,
so we may as well take the win here.
2025-08-03 22:40:13 +02:00
Alex Rønne Petersen ba7cc72c47 std.Target: bump watchos min version to 8.0.0 2025-08-03 20:08:19 +02:00
Alex Rønne Petersen 71722df4ab std.Target: bump driverkit min version to 20.0.0 2025-08-03 20:08:07 +02:00
Alex Rønne Petersen e9093b8d18 std.Target: bump max versions for Apple targets 2025-08-03 20:05:21 +02:00
Alex Rønne Petersen 5b74d33471 std.Target: bump amdhsa max version to 6.4.2 2025-08-03 20:00:32 +02:00
Alex Rønne Petersen afe458e9b6 std.Target: bump vulkan max version to 1.4.321 2025-08-03 19:59:46 +02:00
Alex Rønne Petersen 7f2140710f std.Target: bump cuda max version to 12.9.1 2025-08-03 19:59:46 +02:00
Alex Rønne Petersen 39b653c5e7 std.Target: bump freebsd max version to 14.3.0 2025-08-03 19:59:43 +02:00
Alex Rønne Petersen af3baee5ca std.Target: bump linux max version to 6.16.0 2025-08-03 19:59:40 +02:00
Alex Rønne Petersen 1808ecfa04 std.Target: bump fuchsia max version to 27.0.0 2025-08-03 19:59:35 +02:00
Alex Rønne Petersen 765825b802 ci: bump riscv64-linux timeout from 6 hours to 7 hours
GitHub is apparently very bad at arithmetic and so will cancel jobs that pass
the 5 hours mark, even if they're nowhere near the 6 hours timeout. So add an
hour to assist GitHub in this very difficult task.
2025-08-03 16:46:15 +02:00
Alex Rønne Petersen a5f891d0b3 Merge pull request #24562 from h57624paen/fix-win-spawn-double-normalize
std.process.Child: fix double path normalization in spawnWindows
2025-08-03 11:19:10 +02:00
Alex Rønne Petersen fa445d86a1 ci: target baseline instead of spacemit_x60 on riscv64-linux
Doesn't seem to make much of a difference anyway, and LLVM 20 appears to still
have some miscompilations with vector and bitmanip extensions enabled.
2025-08-03 11:05:04 +02:00
Alex Rønne Petersen 239efa7e67 Merge branch 'riscv-ci' 2025-08-02 09:41:04 +02:00
Alex Rønne Petersen bab0de92b7 ci: re-renable riscv64-linux-debug and riscv64-linux-release for master 2025-08-02 09:39:56 +02:00
Alex Rønne Petersen 4ec232a346 ci: set riscv64-linux timeouts to 6 hours 2025-08-02 09:37:53 +02:00
Alex Rønne Petersen 930c6ca49d ci: don't run test-standalone on riscv64-linux 2025-08-02 09:34:55 +02:00
Alex Rønne Petersen a0e58501af ci: use -Dskip-compile-errors on riscv64-linux 2025-08-02 09:34:55 +02:00
Alex Rønne Petersen bcaae562d6 build: add -Dskip-compile-errors option
Skips tests in test/cases/compile_errors.
2025-08-02 09:34:55 +02:00
Alex Rønne Petersen 761857e3f9 ci: temporarily disable test-link on riscv64-linux
https://github.com/ziglang/zig/issues/24663
2025-08-02 09:34:53 +02:00
Alex Rønne Petersen a00edbd52d Merge pull request #24640 from alexrp/glibc-2.42
glibc 2.42
2025-08-01 19:17:56 +02:00
Alex Rønne Petersen 675b1a15a1 glibc: update crt0 code to 2.42 2025-08-01 09:00:27 +02:00
Alex Rønne Petersen 1804251dfb glibc: update headers to 2.42 2025-07-31 22:02:37 +02:00