Andrew Kelley
aa52bb8327
zig fmt
2025-07-07 13:39:16 -07:00
Andrew Kelley
a59c35cbf8
build.zig: bump maxrss for behavior tests
2025-07-07 13:39:16 -07:00
Andrew Kelley
40d11cc25a
remove async and await keywords
...
Also remove `@frameSize`, closing #3654 .
While the other machinery might remain depending on #23446 , it is
settled that there will not be `async`/ `await` keywords in the
language.
2025-07-07 13:39:16 -07:00
Alex Rønne Petersen
31e46be743
std.c: Use __sigemptyset14 for sigemptyset on NetBSD
...
Closes #24344 .
2025-07-07 12:14:58 +02:00
Alex Rønne Petersen
9a1e754a58
compiler-rt: Implement __clear_cache() for mips-netbsd
2025-07-07 09:05:07 +02:00
Alex Rønne Petersen
5209e7e458
compiler-rt: Export __emutls_get_address for OpenHarmony
2025-07-07 07:23:24 +02:00
Alex Rønne Petersen
b5cc658ab4
llvm: Use emulated TLS when appropriate for the target
...
Closes #24236 .
2025-07-07 07:23:24 +02:00
Alex Rønne Petersen
c96c913bab
Merge pull request #24352 from alexrp/wasi-emulated-libs
...
`wasi`: Build emulated libraries into `libc.a`
2025-07-07 03:42:51 +02:00
jaune
ef8db03d52
std.posix.accept: add WSAENOTSOCK
2025-07-07 00:26:21 +02:00
Alex Rønne Petersen
2bf9ff1b42
wasi: Fix libwasi-emulated-process-clocks build
...
Might have been broken in 05d8b565ad1a1d6c0c1e93dc47f1d828043fcafc.
2025-07-06 20:49:19 +02:00
Alex Rønne Petersen
1f1082e36d
wasi: Build emulated libraries into libc.a
...
This matches what we do for small helper libraries like this in MinGW-w64. It
simplifies the compiler a bit, and also means the build system doesn't have to
treat these library names specially.
Closes #24325 .
2025-07-06 20:05:18 +02:00
Alex Rønne Petersen
97ecb6c551
compiler: Disable self-hosted x86_64 backend on NetBSD
...
https://github.com/ziglang/zig/issues/24341
2025-07-06 19:50:29 +02:00
Alex Rønne Petersen
b461d07a54
Sema: Stop adding Windows implib link inputs for extern "..." syntax.
...
Closes #23971 .
2025-07-06 01:00:18 +02:00
Alex Rønne Petersen
044ccf4138
test: More cleanup of Windows targets in the module test matrix
...
It's kind of unclear what `*-windows-none` actually means, but as far as LLVM is
concerned, it's equivalent to `*-windows-msvc`. For clarity, only test
`*-windows-msvc` and `*-windows-gnu`. #20690 will clean this situation up
eventually.
Also ensure coverage of `link_libc = true` and `link_libc = false` for both.
2025-07-05 04:05:34 +02:00
Alex Rønne Petersen
fc993945a9
Merge pull request #24335 from kada49/common-impl-libc-floor
2025-07-05 03:18:31 +02:00
Silver
be20f97eb9
Update TracyAllocator to new allocator API
2025-07-05 00:24:40 +02:00
Alex Rønne Petersen
9a8f1f675b
start: Only issue fninit for x86(_64)-windows
...
Closes #24263 .
2025-07-04 20:09:20 +02:00
David Senoner
b78751051f
delete superfluous assembly libc floor implementations
2025-07-04 20:05:18 +02:00
David Senoner
3124f700c7
delete superfluous libc floor implementations
2025-07-04 12:54:31 +02:00
Alex Rønne Petersen
9ef4bdf234
test: Respect various test skip options in test-cases
2025-07-03 22:18:12 +02:00
Brandon Black
aa1556156e
std.posix.getsockopt: set option length correctly
...
Fixes #24293
2025-07-03 09:41:26 +02:00
Andrew Kelley
31bc6d5a9d
Merge pull request #24322 from ziglang/delete-dead-backends
...
delete abandoned backends
2025-07-03 04:57:25 +02:00
Andrew Kelley
e126e5592d
compiler: delete dead x86 bits file
2025-07-02 15:03:26 -07:00
Andrew Kelley
5ae2428d52
compiler: change canonical path for backend ABI source files
2025-07-02 15:01:50 -07:00
Andrew Kelley
a13f0d40eb
compiler: delete arm backend
...
this backend was abandoned before it was completed, and it is not worth
salvaging.
2025-07-02 14:50:41 -07:00
Andrew Kelley
20a543097b
compiler: delete aarch64 backend
...
this backend was abandoned before it was completed, and it is not worth
salvaging.
2025-07-02 14:42:20 -07:00
Andrew Kelley
80a9b8f326
compiler: delete powerpc backend stub
...
nobody is currently working on this
2025-07-02 14:35:13 -07:00
Alex Rønne Petersen
edf785db0f
Merge pull request #24302 from alexrp/riscv
...
Native RISC-V bootstrap and test fixes
2025-07-02 04:15:10 +02:00
Alex Rønne Petersen
8e511e031f
std.crypto.salsa20: Disable some tests on RISC-V with vector support
...
https://github.com/ziglang/zig/issues/24299
2025-07-01 23:03:15 +02:00
Alex Rønne Petersen
1c9d9b70ec
std.bit_set: Disable IntegerBitSet decltest on RISC-V with vector support
...
https://github.com/ziglang/zig/issues/24300
2025-07-01 23:03:15 +02:00
Alex Rønne Petersen
9f064dff47
langref: runtime_shrExact_overflow does not work as expected on RISC-V
...
https://github.com/ziglang/zig/issues/24304
2025-07-01 23:03:15 +02:00
Alex Rønne Petersen
b739fec841
test: Disable stack_iterator test on riscv64-linux
...
https://github.com/ziglang/zig/issues/24310
2025-07-01 23:03:15 +02:00
Alex Rønne Petersen
1f2e3b39ae
test: Disable vector division operators on RISC-V with vector support
...
https://github.com/ziglang/zig/issues/24301
2025-07-01 23:03:15 +02:00
Alex Rønne Petersen
1fcabe0bfc
test: Only run coff_dwarf test on aarch64, x86, x86_64
...
This will just fail if run on architectures like riscv64.
2025-07-01 23:03:15 +02:00
Alex Rønne Petersen
80c3de40b3
test: Properly limit glibc_compat versions based on the host
2025-07-01 23:03:15 +02:00
Alex Rønne Petersen
3d7fb4f204
std.zig.system.linux: Add detection for some extra RISC-V CPUs
2025-07-01 23:03:15 +02:00
Alex Rønne Petersen
fd2d4507c8
std.os.linux: Define ucontext_t and mcontext_t for RISC-V
...
Closes #24239 .
2025-07-01 23:03:13 +02:00
Ivan Stepanov
ee6d19480d
spirv: fix signed overflow detection for safe subtraction
...
The overflow check for safe signed subtraction was using the formula (rhs < 0) == (lhs > result). This logic is flawed and incorrectly reports an overflow when the right-hand side is zero.
For the expression 42 - 0, this check evaluated to (0 < 0) == (42 > 42), which is false == false, resulting in true. This caused the generated SPIR-V to incorrectly branch to an OpUnreachable instruction, preventing the result from being stored.
Fixes #24281 .
2025-07-01 19:26:21 +02:00
Alex Rønne Petersen
07114e6bc6
llvm: Disable the machine outliner pass on RISC-V
2025-07-01 18:16:40 +02:00
Alex Rønne Petersen
aa7b32d781
llvm: Fix alignment of by-ref ptr_elem_val and slice_elem_val
2025-07-01 18:16:36 +02:00
Micah Switzer
b8ac740a1b
Fix zig std regression FTBFS
...
Regressed in 9176408
2025-06-30 18:06:14 +02:00
Andrew Kelley
79db39307b
Merge pull request #24297 from ziglang/optional-empty-error-set
...
Sema: correct OPV for optional empty error set
2025-06-30 15:25:35 +02:00
Alex Rønne Petersen
6b6e336e07
std.Build.Step.CheckObject: Truncate st_other before interpreting it
...
Tools are free to use the upper bits of this field for whatever; thus, tools
that want to interpret the visibility type should truncate to 2 bits.
2025-06-30 12:21:38 +02:00
Alex Rønne Petersen
b64fe53ad5
std.simd: Increase branch quota in suggestVectorLengthForCpu()
...
This does a bunch of CPU family and feature checks. It would be annoying to have
to @setEvalBranchQuota() at every comptime use site.
2025-06-30 08:01:27 +02:00
Alex Rønne Petersen
197fb26da0
libunwind: Fix return type of DwarfFDECache<A>::findFDE()
...
https://github.com/llvm/llvm-project/pull/146308
2025-06-30 06:40:17 +02:00
Andrew Kelley
d9742acc23
Sema: detect one-possible-value types after function calls
...
produces better Air for backends
2025-06-29 17:53:52 -07:00
Andrew Kelley
7999374b21
Sema: correct OPV for optional empty error set
...
prevents crashes in backends; improves codegen; provides more
comptime-ness.
2025-06-29 17:20:23 -07:00
Alex Rønne Petersen
e837765956
zig rc: Fix include directory detection when cross-compiling from certain host archs ( #24288 )
...
* resinator: Only preprocess when the input is an .rc file
* resinator: Fix include directory detection when cross-compiling from certain host archs
Previously, resinator would use the host arch as the target arch when looking for windows-gnu include directories. However, Zig only thinks it can provide a libc for targets specified in the `std.zig.target.available_libcs` array, which only includes a few for windows-gnu. Therefore, when cross-compiling from a host architecture that doesn't have a windows-gnu target in the available_libcs list, resinator would fail to detect the MinGW include directories.
Now, the custom option `/:target` is passed to `zig rc` which is intended for the COFF object file target, but can be re-used for the include directory target as well. For the include directory target, resinator will convert the MachineType to the relevant arch, or fail if there is no equivalent arch/no support for detecting the includes for the MachineType (currently 64-bit Itanium and EBC).
Fixes the `windows_resources` standalone test failing when the host is, for example, `riscv64-linux`.
2025-06-29 09:59:38 +02:00
Ryan Liptak
d3363b7a61
Replace unreachable with error return for non-standard Windows targets
...
This new error mirrors the error returned from the Elf struct (error.UnsupportedElfArchitecture):
0adcfd60f4/src/link/Lld.zig (L112)
Before:
```
$ zig build-exe -target riscv64-windows-gnu main.zig
thread 543087 panic: reached unreachable code
```
After:
```
$ zig build-exe -target riscv64-windows-gnu main.zig
error: unable to create compilation: UnsupportedCoffArchitecture
```
Closes #24287
2025-06-29 08:32:19 +02:00
Alex Rønne Petersen
6322dbd5bf
compiler: test runner: fix tests never fails on crippled architectures ( #24180 )
...
* compiler: test runner: fix tests never fails on crippled architectures
* riscv64: skip failing tests
* riscv64: enable test summary printing
2025-06-29 08:03:59 +02:00