Commit graph

33513 commits

Author SHA1 Message Date
Dacheng Gao
596e0bd47b std.os.linux: add constants for ETH 2025-04-06 02:52:20 +02:00
Jacob Young
9827ffe1de x86_64: fix incorrect handling of unreusable operands
Closes #23448
2025-04-05 20:49:56 -04:00
Jan200101
1a5dcff8e4
std.Build: update build-id flag description
it now denotes:
- all supported styles
- what a given style outputs
- what formats a given style supports
2025-04-05 22:11:07 +02:00
homersimpsons
95fdbc579f pow: fix typo 0 instead of inf 2025-04-05 21:20:10 +02:00
Andrew Kelley
0cd31fc7ff
Merge pull request #22780 from ziglang/llvm20
LLVM 20
2025-04-05 01:46:13 -04:00
Andrew Kelley
cefe65c1b8 ci: update tarballs to 0.15.0-dev.203+53270f008
these have assertions enabled
2025-04-04 15:28:18 -07:00
Andrew Kelley
8acedfd5ba
Merge pull request #23459 from ziglang/linked-lists
de-genericify linked lists
2025-04-04 17:48:06 -04:00
Carmen
84c9cee502 fix review 2025-04-04 12:42:28 +01:00
Carmen
65c943671e OpenMode is exhaustive 2025-04-04 12:42:28 +01:00
Carmen
a61678b754 dont return tuple, split into 2 functions 2025-04-04 12:42:28 +01:00
Carmen
45afde2036 Payload -> @FieldType and use mem.sliceTo 2025-04-04 12:42:28 +01:00
Carmen
2112167f8c std.os.uefi.protocol.File: fix some typed definitions 2025-04-04 12:42:28 +01:00
Zenomat
8a83fc7eba
std.net: Implement if_nametoindex for windows (#22555) 2025-04-04 11:40:44 +00:00
Andrew Kelley
810f70ef42 update compiler usage of DoublyLinkedList API 2025-04-03 22:58:52 -07:00
Alex Rønne Petersen
7c85dc4602
test: Disable error union switch with call operand (ReleaseSafe) on macos.
This started failing in LLVM 20:

test
+- test-stack-traces
   +- check error union switch with call operand (ReleaseSafe llvm) failure
error:
========= expected this stdout: =========
error: TheSkyIsFalling
source.zig:3:5: [address] in [function]
    return error.TheSkyIsFalling;
    ^

========= but found: ====================
error: TheSkyIsFalling
source.zig:13:27: [address] in [function]
        error.NonFatal => return,
                          ^
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
4b360a1ff0
ci: Update tarballs to 0.15.0-dev.203+53270f008. 2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
957a5ae560
cmake: Pass -fno-sanitize=undefined when building zig2.
We build zig2.c and compiler_rt.c with -O0 but then proceed to link with -O3.
So zig2.o and compiler_rt.o will have references to ubsan-rt symbols, but the
-O3 causes the compiler to not link ubsan-rt. We don't actually need the safety
here, so just explicitly disable ubsan.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
c3e88a21fb
compiler: Recognize -fno-sanitize=<...> in addition to -fsanitize=<...>. 2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
7c5412c7a4
build: Rename -Dtest-slow-targets to -Dtest-extra-targets.
This can be used more broadly for targets that aren't quite ready to be tested
by default yet.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
15a05fc324
Revert "compiler: Don't consider powerpc to have red zone support yet."
This reverts commit 4fad60fd3a.

Closes #23056.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
9e4199d629
Compilation: Remove the PowerPC soft float preprocessor workaround.
Closes #21411.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
28469636ba
zig cc: Avoid passing any "CPU" features related to float ABI to Clang. 2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
6667e0fbb4
Revert "glibc: Patch to work around missing features in LLVM's s390x assembler."
This reverts commit b230e4f598.

Closes #21329.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
0d6f3aa6c1
llvm: Remove workaround for zero-length memset/memcpy on wasm.
Closes #16360.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
33103071a7
std: Disable link with relative paths and linkat with different directories tests for mips64(el).
These started failing with LLVM 20 for unclear reasons:

test-std
└─ run test std-mips64-linux.4.19...6.13.4-gnuabi64.2.28-mips64r2-Debug-libc 2798/2878 passed, 2 failed, 78 skipped
error: 'posix.test.test.link with relative paths' failed: expected 2, found 0
/home/alexrp/Source/ziglang/zig-llvm20/lib/std/testing.zig:103:17: 0x1d9e5bf in expectEqualInner__anon_47031 (test)
                return error.TestExpectedEqual;
                ^
/home/alexrp/Source/ziglang/zig-llvm20/lib/std/posix/test.zig:311:9: 0x3650f57 in test.link with relative paths (test)
        try testing.expectEqual(@as(@TypeOf(nstat.nlink), 2), nstat.nlink);
        ^
error: 'posix.test.test.linkat with different directories' failed: expected 2, found 0
/home/alexrp/Source/ziglang/zig-llvm20/lib/std/testing.zig:103:17: 0x1d9e5bf in expectEqualInner__anon_47031 (test)
                return error.TestExpectedEqual;
                ^
/home/alexrp/Source/ziglang/zig-llvm20/lib/std/posix/test.zig:355:9: 0x3653377 in test.linkat with different directories (test)
        try testing.expectEqual(@as(@TypeOf(nstat.nlink), 2), nstat.nlink);
        ^
error: while executing test 'zig.system.darwin.macos.test.detect', the following test command failed:
qemu-mips64 -L /opt/glibc/mips64-linux-gnu-n64 /home/alexrp/Source/ziglang/zig-llvm20/.zig-cache/o/22a8c3762ea56ae3a674fa9ad15f6657/test --seed=0xa1dbb43c --cache-dir=/home/alexrp/Source/ziglang/zig-llvm20/.zig-cache --listen=-

test-std
└─ run test std-mips64-linux.4.19...6.13.4-gnuabi64.2.28-mips64r2-Debug-libc 2798/2878 passed, 1 failed, 79 skipped
error: 'posix.test.test.linkat with different directories' failed: expected 2, found 0
/home/alexrp/Source/ziglang/zig-llvm20/lib/std/testing.zig:103:17: 0x1d9e22f in expectEqualInner__anon_47031 (test)
                return error.TestExpectedEqual;
                ^
/home/alexrp/Source/ziglang/zig-llvm20/lib/std/posix/test.zig:356:9: 0x3650b47 in test.linkat with different directories (test)
        try testing.expectEqual(@as(@TypeOf(nstat.nlink), 2), nstat.nlink);
        ^
error: while executing test 'zig.system.darwin.macos.test.detect', the following test command failed:
qemu-mips64 -L /opt/glibc/mips64-linux-gnu-n64 /home/alexrp/Source/ziglang/zig-llvm20/.zig-cache/o/22a8c3762ea56ae3a674fa9ad15f6657/test --seed=0xa1dbb43c --cache-dir=/home/alexrp/Source/ziglang/zig-llvm20/.zig-cache --listen=-

Unfortunately, neither GDB nor LLDB want to play nice with qemu-mips64(el) at
the moment, so I can't easily debug these failures.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
96fe4fb969
Revert "test: Partially disable vector float operators on mips."
This reverts commit 19a91084c2.

Closes #21051.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
b9456d64d7
test: mips32 is no longer a slow target with LLVM 20.
We can now run these tests as part of test-modules w/o -Dtest-slow-targets.

Closes #21096.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
7109e462b7
llvm: Use muslabin32/muslabi64 environments in the target triple.
Closes #2909.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
9a59cff27f
llvm: Allow FastISel on mips again.
Closes #21215.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
166766d63d
llvm: never_tail implies never_inline, so set noinline in this case too. 2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
7415739e36
Sema: Prevent tail calls of std.builtin.returnError().
LLVM 20 started tail-calling it in some of our test cases, resulting in:

    error: AndMyCarIsOutOfGas
    /home/alexrp/Source/ziglang/zig-llvm20/repro.zig:2:5: 0x103ef9d in main (repro)
        return error.TheSkyIsFalling;
        ^
    /home/alexrp/Source/ziglang/zig-llvm20/repro.zig:6:5: 0x103efa5 in main (repro)
        return error.AndMyCarIsOutOfGas;
        ^
    /home/alexrp/Source/ziglang/zig-llvm20/lib/std/start.zig:656:37: 0x103ee83 in posixCallMainAndExit (repro)
                const result = root.main() catch |err| {
                                        ^

instead of the expected:

    error: AndMyCarIsOutOfGas
    /home/alexrp/Source/ziglang/zig-llvm20/repro.zig:2:5: 0x103f00d in main (repro)
        return error.TheSkyIsFalling;
        ^
    /home/alexrp/Source/ziglang/zig-llvm20/repro.zig:6:5: 0x103f015 in main (repro)
        return error.AndMyCarIsOutOfGas;
        ^
    /home/alexrp/Source/ziglang/zig-llvm20/repro.zig:11:9: 0x103f01d in main (repro)
            try bar();
            ^
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
82b9d9c0f6
compiler-rt: Fix names of some float/int conversion routines for hexagon. 2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
858305385d
llvm: Update the list of targets that use native f16/f128.
Closes #22003.
Closes #22013.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
cf9c6f5298
compiler: Update max int alignments for some targets. 2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
4c5c5bcd91
llvm: Fix i128 alignment for various targets.
This ABI bug was fixed in LLVM 20.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
3d1cfdb365
llvm: Set target-abi module flag.
LLVM is increasingly making use of this module flag when present.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
e99c11856d
libtsan: Update to LLVM 20. 2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
d67d52abe5
zig cc: Update options data to Clang 20. 2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
8954e9748a
std.Target: Add Abi.muslf32 and Abi.muslsf. 2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
1599f8ade0
std.Target: Bump baseline hexagon model to hexagonv68.
https://github.com/llvm/llvm-project/pull/125584
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
eefb334885
std.Target: Bump baseline bpfel/bpfeb model to v3.
https://github.com/llvm/llvm-project/pull/131691
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
4de368a1b6
std.Target: Update CPU models/features for LLVM 20.
Closes #21818.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
8ea2e1ded5
compiler: Updates for LLVM/Clang 20 API changes. 2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
156ab87500
libcxx: Update to Clang 20.
See:

* https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc/77319
* https://discourse.llvm.org/t/rfc-project-hand-in-hand-llvm-libc-libc-code-sharing/77701

We're dropping support for C++03 for Zig due to the first change; it would be
insane to ship 1018 duplicate header files just for this outdated use case.

As a result of the second change, I had to bring in a subset of the headers from
llvm-libc since libc++ now depends on these. Hopefully we can continue to get
away with not copying the entirety of llvm-libc.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
7ab01c9a42
libcxxabi: Update to Clang 20. 2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
a89b343256
libunwind: Update to LLVM 20. 2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
ce754724b3
zig cc: Update intrinsic headers to Clang 20. 2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
0181cfe8ad
zig cc: Update driver files to Clang 20. 2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
c712f18d74
build: Update to LLVM/Clang 20. 2025-04-04 06:08:08 +02:00
Alex Rønne Petersen
50cb2fa0a2
ci: Stop triggering the workflow for llvm branches.
We usually do a PR for the llvm branches, so triggering a run for the branch
means we do extra work for no reason.
2025-04-04 06:06:39 +02:00