Commit Graph

37759 Commits

Author SHA1 Message Date
rpkak 778f8d557b add cimport file to zcu.alive_files 2026-04-13 13:17:58 +02:00
Andrew Kelley edfc4727e2 Merge pull request 'init objdump subcommand' (#31827) from objdump into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31827
2026-04-12 10:38:19 +02:00
Andrew Kelley 8da2f93bd0 Merge pull request 'update aro and translate-c to latest' (#31826) from aro-sync into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31826
2026-04-12 07:28:18 +02:00
David Rubin 06ab4f702e llvm: correctly bitcast for memset intrinsic path 2026-04-12 05:28:54 +02:00
Andrew Kelley f7dabba561 objdump: recognize some file types 2026-04-11 18:56:51 -07:00
Andrew Kelley 1809a19c27 add objdump subcommand
does nothing so far
2026-04-11 18:56:51 -07:00
Andrew Kelley 2322d45d80 Merge pull request 'Implement variadic functions for Win64 in the x86_64 backend' (#31672) from kcbanner/zig:win64_varargs into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31672
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-12 01:34:16 +02:00
Corentin Kerisit 07f05426fc Support ld64.ldd STABS layout in MachOFile.load
Apple's ld emit N_BNSYM and N_ENSYM to mark the start and end of
functions, while ld64.lld doesn't.

This resulted in MachOFile.load bailing out on unsupported STABS
layout when the linker used is ld64.lld.

This commit supports both layouts.
2026-04-12 01:23:17 +02:00
Andrew Kelley c463bdb93d mingw: update to latest aro API 2026-04-11 16:14:14 -07:00
Andrew Kelley 5149128d22 update translate-c to latest
upstream commit 46b5609b5ac4c0a896217d1d984f3ae50e4810b5
2026-04-11 15:17:46 -07:00
Ryan Liptak 67c6ac947a Update resinator for latest aro 2026-04-11 15:17:46 -07:00
Andrew Kelley 68bf81432c update aro to latest
upstream commit 5f5a050569a95ecc40a426f0c3666ae7ef987ede
2026-04-11 15:17:46 -07:00
Frank Denis bc08199ef1 crypto TLS bundle: make AddCertsFromDirPathError compile
It's calling `addCertsFromDir`, which now requires a timestamp,
so it didn't compile any more.

Add a test by the way.
2026-04-12 00:13:59 +02:00
Andrew Kelley 41bc507688 Merge pull request 'Debug I/O color detection fixes/improvements for Windows/POSIX/WASI/Emscripten + tests' (#31108) from castholm/zig:wasm-env-vars into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31108
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-11 21:42:47 +02:00
Carl Åstholm 81be7f62ec Fix debug I/O color detection for most targets
On POSIX, start.zig did not reset the `environ_initialized` field, which
prevented the environment variables from ever actually getting scanned.

On Windows, environment variable scanning is allocation-free, so it's
okay for `std.Io.Threaded.init_single_threaded` to use the global
environment block.
2026-04-11 12:28:24 -07:00
Carl Åstholm c61e18006f Add standalone tests for debug I/O color detection 2026-04-11 12:28:24 -07:00
Carl Åstholm 3223d3a1ac Improve debug I/O color detection/handling for WASI and Emscripten
When linking libc, these targets can get their environment variables
from `std.c.environ`. Additionally, it's okay for WASI to use ANSI
escape sequences; nothing in the relevant specs claim otherwise.
2026-04-11 12:25:22 -07:00
Carl Åstholm 3d48264365 Fix -fwasmtime not inheriting environment variables 2026-04-11 12:23:49 -07:00
kcbanner 91dce64d10 - Fixup != .stage2_x86_64 -> == .stage2_llvm in var_args tests 2026-04-11 14:53:55 -04:00
Luna Schwalbe 0bbf0461d9 std.http: reliably update reader state
Content length based reading would only set the reader state to `ready`
once it returned EOF, but wrapping readers (such as decompressors)
may stop reading from the underlying source without receiving EOF.
In such cases the http reader state would stay set to
`body_remaining_content_length`, even though the entire body had been
read.

Fixes #30060

Co-authored-by: Andrew Kelley <andre@ziglang.org>
2026-04-11 11:04:24 -07:00
Andrew Kelley 29225ae11b Merge pull request 'x64_86 fix: RMI can accept imm16 only for imul r16,r/m16' (#31234) from mathk/zig:x64_86-misscompfix-rmi16 into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31234
Reviewed-by: jacobly <jacobly@noreply.codeberg.org>
2026-04-11 18:08:07 +02:00
Andrew Kelley 75457202d4 langref: deprecate @intFromFloat
and add documentation for new semantics of `@round`, `@ceil`, `@floor`,
and `@trunc`.

follows #30906
relates #31602
2026-04-11 08:36:39 -07:00
Andrew Kelley cbe468a787 Merge pull request 'Sema: allow @round, @floor, @ceil, and @trunc to coerce to integer types' (#30906) from adria/zig:sema-rounding-casts into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30906
2026-04-11 16:44:41 +02:00
regp b6aebc4117 tools: fix outdated filename in std_gdb_pretty_printers.py comment 2026-04-11 17:27:02 +03:00
Alex Rønne Petersen 8d42a86fb3 test: add powerpc64-ps3-none and x86_64-(ps4,ps5)-none to llvm_targets 2026-04-11 12:55:45 +02:00
Alex Rønne Petersen 3898c815ac test: add mipsel-psp-eabihf to llvm_targets 2026-04-11 12:55:45 +02:00
Alex Rønne Petersen d2e42fe9de std.Target: default ABI to eabihf for psp 2026-04-11 12:55:45 +02:00
Alex Rønne Petersen 71e5ee9a51 std.Target: allegrex mips CPU can only be little endian 2026-04-11 12:48:58 +02:00
Alex Rønne Petersen d626dc84d9 test: add s390x-linux-musl to llvm_targets 2026-04-11 12:06:50 +02:00
Alex Rønne Petersen fa9caeba1b std.Io.net.test: disable listen on a port, send bytes, receive bytes
Still happens: https://codeberg.org/ziglang/zig/issues/31388#issuecomment-12968295
2026-04-11 06:50:53 +02:00
Alex Rønne Petersen 13839127b9 test: disable incremental tests on wasm32-wasi-selfhosted
https://codeberg.org/ziglang/zig/issues/31810
2026-04-11 04:40:16 +02:00
Alex Rønne Petersen d6f43caadf Merge pull request 'audit: handle process.Child.Term exhaustively and give useful exit information on process exit' (#31018) from murtaza/zig:child.term-audit into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31018
Reviewed-by: Alex Rønne Petersen <alex@alexrp.com>
2026-04-11 00:59:11 +02:00
Adrià Arrufat 4affe94d79 Sema: proper use of .int_from_float_optimized 2026-04-11 00:11:18 +02:00
glowsquid 8111d3d63c fix comptime @ptrcasting from a larger type to a smaller one (#31774)
closes #30180

Note from mlugg: this fix is very much a hack, but it definitely won't break anything and it demonstrably fixes one case, so I'm merging it for now with the expectation that I'll be replacing the broken code soon.

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31774
Reviewed-by: mlugg <mlugg@noreply.codeberg.org>
Co-authored-by: glowsquid <sachabarsayuracko@gmail.com>
Co-committed-by: glowsquid <sachabarsayuracko@gmail.com>
2026-04-10 23:31:21 +02:00
David 2c6e5006ed Sema: fix comptime @ptrCast to optional slices 2026-04-10 23:27:13 +02:00
Mathieu Suen 244f5aafca fixup! Adding unwrapped error multiply regression test 2026-04-10 23:23:33 +02:00
Mathieu Suen 7addae8f7d Adding unwrapped error multiply regression test 2026-04-10 23:23:33 +02:00
Jacob Young 9ba9865e51 x86_64: allow positive signed imms to match unsigned imm patterns 2026-04-10 23:23:33 +02:00
Jacob Young 1552bc7ad0 x86_64: fix mir rmi signedness 2026-04-10 23:23:33 +02:00
Mathieu Suen 2c88821c56 x64_86 fix: RMI can accept imm16 only for imul r16,r/m16 2026-04-10 23:23:33 +02:00
Matthew Lugg 998b714708 Sema: push to error trace when returning from inline function
There is no reason `inline fn`s should not be subject to error tracing:
they are still functions! So, push to the error trace when we return
from one, and add a test checking that inline functions do appear in
error traces.

This also changes how we emit error trace pushes: we no longer duplicate
the AIR `ret` instruction in the "error" and "non-error" code paths. I
suspect this will lead to slightly better unoptimized codegen, but I may
be wrong---I'll take some performance measurements before I merge this.
2026-04-10 23:17:22 +02:00
Andrew Kelley c3a862522b std: remove managed array hash map variants
And deprecate all the API names except for:
* `std.array_hash_map.Auto`
* `std.array_hash_map.String`
* `std.array_hash_map.Custom`
2026-04-10 17:39:45 +02:00
Andrew Kelley 0606af509f translate-c build step: remove use_clang field
This no longer does anything.
2026-04-09 14:05:45 -07:00
Andrew Kelley 090c32b9d2 update .mailmap
keeps our contributor count in the release notes somewhat accurate
2026-04-09 12:55:27 -07:00
nekogirl ac6fb0b59a Correct Element and Tag in crypto.codecs.asn1 (#31511)
Previously, `std.crypto.codecs.asn1.der.decode` failed to compile because of `std.Io.Reader` usage in `Element.decode` and `Tag.decode` and `DecodeError` not being compatible with `std.Io.Reader.Error`.

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31511
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
Co-authored-by: nekogirl <nekogirl@noreply.codeberg.org>
Co-committed-by: nekogirl <nekogirl@noreply.codeberg.org>
2026-04-09 17:59:16 +02:00
David Rubin 36e2eaf2bd revert zig libc implementation of pow (#31794)
Partially reverts commit b5fbed986b.

Reverts commit 7aae7dd3f4.

Closes #31207

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31794
Co-authored-by: David Rubin <david@vortan.dev>
Co-committed-by: David Rubin <david@vortan.dev>
2026-04-09 17:38:17 +02:00
Andrew Kelley 5ccfeb9268 std.Io.net: add error.PortUnreachable to NetReceive
closes #31787
2026-04-08 22:58:22 +02:00
Jan200101 4bdbcfe95b std.posix: handle ENOTCONN in getpeername 2026-04-08 20:11:25 +02:00
pentuppup 6193470cee error on tuples in extern contexts 2026-04-08 15:22:48 +02:00
Neel 86853ba0a4 Add RISC-V ABI register alias names for inline asm clobbers 2026-04-08 14:37:48 +02:00