Commit Graph

38443 Commits

Author SHA1 Message Date
mlugg 3f1dead2fc Merge pull request 'Use struct-of-arrays style for std.lang.Type' (#35234) from Der_Teufel/zig:soa-builtin-type into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35234
2026-05-28 09:45:54 +02:00
Elaine Gibson 8d1b6e3397 compiler: fix spirv makeWritable 2026-05-28 04:56:12 +02:00
Zhalkhas f04799dc9c implicitly enable LLVM when TSan is enabled (#35311)
FIxes #32127

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35311
2026-05-28 04:32:23 +02:00
Alex Rønne Petersen 7ee6e7d61e std.debug.Dwarf.Unwind.VM: deal with negative offsets in unsigned CFI insns
The DWARF spec has CFI instructions that take signed offsets, but at least LLVM
always emits the unsigned variants, even for e.g. `.cfi_def_cfa_offset -4`.
2026-05-28 04:03:47 +02:00
Alex Rønne Petersen a3508c4b3a ci: update to QEMU 11.0.1 2026-05-28 04:03:00 +02:00
Andrew Kelley 3de725074d CLI: replace uses of '{s}' in format strings with {q}
Example output:

$ zig build-exe "-freference-trace=b\" 'ah"
error: unable to parse reference_trace count "b\" 'ah": InvalidCharacter

Before this change:
error: unable to parse reference_trace count 'b" 'ah': InvalidCharacter

Zig does not have single-quoted strings, plus it wasn't escaping the
single quotes anyway. Better to use actual double quote string syntax
than to fake a fake syntax.
2026-05-28 02:47:36 +02:00
Jacob Young 2a07273224 lldb: fix and test some regressions 2026-05-28 01:41:37 +02:00
Andrew Kelley 7b5280b687 build.zig: poison the configure cache appropriately
Until #35473 is implemented we have to re-run configure logic in case of
these things:
* git commit changes
* test-cases on the file system changed
* test-incremental on the file system changed
2026-05-27 13:12:36 -07:00
Andrew Kelley ba634c44ba Maker.Step.Run: fix not printing failed command
regressed in 349053e322

I added comments to help prevent this regression in the future.
2026-05-27 13:04:19 -07:00
Techatrix ea044a4b82 std.Build: do not clobber properties of a package like named modules
Repeated calls to `addModule` with the same name will override the
module that is visible to dependants which is likely unintentional.
Instead it should assert that no existing module has already been added
with the given name.

The same issue applies to `addNamedWriteFiles` and `addNamedLazyPath`.
2026-05-27 18:54:08 +02:00
Krzysztof Wolicki 9e80795623 all: update to use new std.lang.Type definitions 2026-05-27 10:03:51 +01:00
Krzysztof Wolicki 964cc8047e stage1: update zig1.wasm
Using wasm-opt version 118.

Signed-off-by: Matthew Lugg <mlugg@mlugg.co.uk>
2026-05-27 10:02:51 +01:00
Krzysztof Wolicki 5ed8e9324e Sema: generate new struct-of-arrays style values in zirTypeInfo 2026-05-27 09:19:51 +01:00
Siddharth Sinha 284ab0ad86 std.Io.Uring: handle ReadOnlyFileSystem in dirOpenDir and dirRealPathFile
f4eecf8d7d added ROFS handling to openat but missed these two read-only
callers, breaking compilation of any Io.Evented program.
2026-05-27 09:42:02 +02:00
Alex Rønne Petersen 333724ff77 Maker.Step.Run: set WASMTIME_BACKTRACE_DETAILS=1 by default for Wasmtime
Similar in spirit to what we do with WINEDEBUG when using Wine, i.e. provide
more helpful defaults.
2026-05-27 07:52:49 +02:00
Alex Rønne Petersen fba9a28a67 ci: bump timeout for aarch64-freebsd and aarch64-netbsd by 1 hour 2026-05-27 03:16:06 +02:00
Alex Rønne Petersen 0a22dae4a7 ci: only run aarch64-freebsd and aarch64-netbsd on master pushes for now 2026-05-27 03:15:30 +02:00
zacoons be7065f7f5 std.Io: fix openSocketPosix ignoring ip6_only option 2026-05-27 03:12:49 +02:00
Andrew Kelley d0c6ed189b Maker: fix Target deserialization
more disciplined Target / Query separation even though they're both
serialized in the same struct
2026-05-27 03:04:31 +02:00
Alan Cocanour 9c56550931 Respect environment variable preference for color in all zig commands
This makes all commands in the zig executable that support color
output respect the user's preference for color output based on the
NO_COLOR and CLICOLOR_FORCE environment variables. Setting color
preference via command line option still overrides preferences set via
environment variables.
2026-05-26 17:56:40 -07:00
Alex Rønne Petersen 3852c8eae4 Revert "test: add x86-freebsd to the module test matrix"
This reverts commit 7451f5d117.

https://codeberg.org/ziglang/zig/actions/runs/3954/jobs/16/attempt/1
2026-05-27 02:34:30 +02:00
pentuppup e4512531d5 fix some missed errors from build system rework 2026-05-27 02:18:25 +02:00
Andrew Kelley 4d56c66362 Merge pull request 'Maker: memory usage optimizations' (#35471) from build-runner-process into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35471
2026-05-27 00:48:11 +02:00
Alex Rønne Petersen 7451f5d117 test: add x86-freebsd to the module test matrix
While it's not supported as a native install architecture anymore, it's still a
supported compatibility target.
2026-05-27 00:28:44 +02:00
Alex Rønne Petersen 197ba11787 std.debug.SelfInfo.Elf: update lists of supported architectures 2026-05-27 00:28:15 +02:00
Alex Rønne Petersen 5c64311fab std.debug.cpu_context: add mcontext_t for x86-freebsd 2026-05-27 00:28:00 +02:00
Alex Rønne Petersen 833c6d9792 std.debug.cpu_context: add missing align(16) on x86_64-freebsd mcontext_t 2026-05-27 00:28:00 +02:00
Alex Rønne Petersen 6aa6a07955 std.debug.cpu_context: add mcontext_t for hppa-linux and hppa64-linux 2026-05-27 00:28:00 +02:00
Alex Rønne Petersen 12790e69a7 std.debug.cpu_context: add mcontext_t for hppa-netbsd 2026-05-27 00:27:06 +02:00
Alex Rønne Petersen 7d5e400911 std.debug.cpu_context: sheb-openbsd doesn't exist 2026-05-26 23:30:48 +02:00
Alex Rønne Petersen f3a7a4c5e2 Merge pull request 'NetBSD 11.0 cross libc support' (#35464) from alexrp/zig:netbsd-11 into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35464
2026-05-26 20:55:53 +02:00
Carl Åstholm fc3406a961 std.debug.Pdb: deduplicate inline source locations
Previously, if the same inline function was called multiple times
by the same caller, the inline function's frame would be repeated
multiple times, once for each prior call.
2026-05-26 20:37:09 +02:00
Andrew Kelley 456b2ec07a forgejo: update the bug template 2026-05-26 11:04:23 -07:00
Jacob Young 5940f65503 lldb: update for upcoming hash map rename 2026-05-26 19:32:01 +02:00
Andrew Kelley e966d0c385 Merge PR 'Fix build script compilation when usize is u32' (#32060)
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/32060
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-05-26 09:54:03 -07:00
Andrew Kelley fd63f57cd8 build system: update more usize to u64 for maxrss
makes the build system compile on 32 bit systems

bonus, also fix incorrectly passing advanced debug options to the maker
process which doesn't care about them
2026-05-26 09:50:48 -07:00
Sertonix 7228dc0ef9 langref: fix compilation if usize is u32 2026-05-26 09:43:40 -07:00
Sertonix 8455563ed8 Fix build script compilation when usize is u32
On 32-bit systems usize is not u64 but it was assumed in multiple places
of the build script.

Sometimes using u64 instead of usize since available and used memory can
exceed usize on 32-bit systems (just like totalSystemMemory)

Example errors:

lib/compiler/build_runner.zig:508:26: error: expected type 'usize', found 'u64'
        .available_rss = max_rss,
                         ^~~~~~~
lib/compiler/build_runner.zig:508:26: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
referenced by:
    callMain [inlined]: lib/std/start.zig:699:88
    callMainWithArgs [inlined]: lib/std/start.zig:638:20
    posixCallMainAndExit: lib/std/start.zig:590:38
    2 reference(s) hidden; use '-freference-trace=5' to see all references
lib/std/Build/WebServer.zig:849:38: error: expected type 'usize', found 'u64'
    const buf = gpa.realloc(old_buf, new_len) catch @panic("out of memory");
                                     ^~~~~~~
lib/std/Build/WebServer.zig:849:38: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
lib/std/mem/Allocator.zig:399:58: note: parameter type declared here
pub fn realloc(self: Allocator, old_mem: anytype, new_n: usize) Error!@TypeOf(old_mem) {
                                                         ^~~~~
build.zig:548:10: error: type 'usize' cannot represent integer value '9300000000'
        .max_rss = 9_300_000_000,
        ~^~~~~~~~~~~~~~~~~~~~~~~
build.zig:778:10: error: type 'usize' cannot represent integer value '8000000000'
        .max_rss = 8_000_000_000,
        ~^~~~~~~~~~~~~~~~~~~~~~~
2026-05-26 09:43:39 -07:00
Andrew Kelley 33680ced58 CI: switch which script gets --maker-opt=Debug 2026-05-26 09:03:34 -07:00
Andrew Kelley 29df938c22 zig build: add "first time setup" to progress node
when building the maker, so that users who freshly downloaded zig don't
worry that it will take this long every time they run zig build
2026-05-26 09:03:34 -07:00
Andrew Kelley 349053e322 Maker: memory usage optimizations
- choose smp_allocator depending on optimization mode
- organize the globals
- avoid pessimistically allocating failed command string
- recover the PkgConfig memory
- recover the memory from captureChildProcess
- make Step.result_stderr gpa-owned so it doesn't leak when a step that
  fails with stderr is re-run
- recover memory from evalZigTest and evalGeneric child process stdio
  streams
2026-05-26 09:03:34 -07:00
Andrew Kelley 0ff175b69e Merge pull request 'zig build: separate the maker process from the configurer process' (#35428) from build-runner-process into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35428
2026-05-26 18:00:16 +02:00
Alex Rønne Petersen a6275ad16f test: add riscv32-netbsd-none and riscv64-netbsd-none to module test matrix 2026-05-26 15:40:42 +02:00
Alex Rønne Petersen 0b4132b7a7 test: add riscv32-netbsd-none and riscv64-netbsd-none to llvm_targets 2026-05-26 15:40:42 +02:00
Alex Rønne Petersen 6ed30064d3 std.debug.cpu_context: add mcontext_t for riscv32-netbsd and riscv64-netbsd 2026-05-26 15:40:42 +02:00
Alex Rønne Petersen 7c2efe5000 std.zig.target: add riscv32-netbsd-none and riscv64-netbsd-none 2026-05-26 15:40:42 +02:00
Alex Rønne Petersen b2dd1469da std.Target: add dynamic linker path for riscv32-netbsd and riscv64-netbsd 2026-05-26 15:40:42 +02:00
Alex Rønne Petersen 912dd0b451 std.Target: bump max NetBSD version to 11.0 2026-05-26 15:40:42 +02:00
Alex Rønne Petersen 1e2bac6153 libc: update NetBSD headers to 11.0 2026-05-26 15:40:40 +02:00
Huang Zhichao c84f0f49d6 std.os.linux: fix dirfd type in mknodat() 2026-05-26 20:49:56 +08:00