Commit Graph

13691 Commits

Author SHA1 Message Date
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
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
pentuppup e4512531d5 fix some missed errors from build system rework 2026-05-27 02:18:25 +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
Jacob Young 5940f65503 lldb: update for upcoming hash map rename 2026-05-26 19:32:01 +02: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 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 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 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
Huang Zhichao c84f0f49d6 std.os.linux: fix dirfd type in mknodat() 2026-05-26 20:49:56 +08:00
Alex Rønne Petersen 66bcba6b9d drop powerpc-netbsd-eabi target support
Turns out this target is very poorly supported upstream and doesn't even build
in NetBSD 11, so let's not pretend to support it.
2026-05-26 14:35:23 +02:00
Alex Rønne Petersen 84a100b3e0 std.os: no longer require libc for xtensa-linux
Not that any of our vendored libcs support xtensa anyway.
2026-05-26 08:11:04 +02:00
Alex Rønne Petersen b0bda2d744 std.Thread: implement LinuxThreadImpl.freeAndExit() for xtensa 2026-05-26 08:11:04 +02:00
Alex Rønne Petersen ecc47695ef std.os.linux: add xtensa arch bits
closes https://codeberg.org/ziglang/zig/issues/30947
2026-05-26 08:11:04 +02:00
Alex Rønne Petersen 0142405f86 std.os.linux.tls: add xtensa support 2026-05-26 08:11:04 +02:00
Alex Rønne Petersen a6ab353532 std.pie: add xtensa support
This might need more work to handle the DT_XTENSA_GOT_LOC_{OFF,SZ} insanity,
but this is at least a start.
2026-05-26 08:11:04 +02:00
Alex Rønne Petersen 5143239e2b std.start: add xtensa support 2026-05-26 08:11:04 +02:00
Alex Rønne Petersen 68d2bef8c0 std.debug: FP unwinding is useless on xtensa
Like MIPS, we'd have to do backwards code scanning for it to be useful, and at
least for now, we're not willing to do that.
2026-05-26 08:11:04 +02:00
Alex Rønne Petersen c96d1cc0c1 std.elf: add DT_XTENSA_GOT_LOC_{OFF,SZ} 2026-05-26 08:11:04 +02:00
Alex Rønne Petersen 2625e42a68 std.os: no longer require libc for alpha-linux 2026-05-26 05:12:29 +02:00
Andrew Kelley a9e0eb5340 std.Build.Step.Compile: deprecate out_filename 2026-05-25 19:27:16 -07:00
Andrew Kelley 19c63406d4 LazyPath: store relative paths as actual strings 2026-05-25 18:54:37 -07:00
Andrew Kelley bd1b47733b zig build: remove --build-runner CLI parameter
There is no concept of a "build runner" any more; it has been split in two:
configurer and maker.

Users of this feature will likely want to no longer override any logic, and
instead consume the configuration file produced by configurer.

If overriding one or the other of these is desired, the feature will need to be
re-introduced (as --override-maker or --override-configurer).
2026-05-25 18:54:36 -07:00
Andrew Kelley 9eb85c4e5e build system: track TODOs outside source code
related to #363
2026-05-25 18:54:36 -07:00
Andrew Kelley ea151030bc std.Io.Writer: implement {q} formatter
This is intended to replace the common pattern:

print("invalid foobar: '{s}': {t}", ...)

The idea is to not invent imaginary syntax. If the string contained
single quotes for example, this would be a nonsensical error message.
On the other hand with the new pattern:

print("invalid foobar: {q}: {t}", ...)

It's both easier on the eyes at the print site, and also it will allow
the user to copy paste a properly escaped string, should the quoted text
contain any odd characters, including invisible ones like null bytes.
2026-05-25 18:54:36 -07:00
Andrew Kelley bc031bedaa std.Build.Step: delete legacy Maker fields 2026-05-25 18:54:36 -07:00
Andrew Kelley 9a788dccf8 std.Build.lazyImport: fix compilation errors 2026-05-25 18:54:36 -07:00
Andrew Kelley 4ba2bcbbec std.Build.Configuration: fix loading on big endian 2026-05-25 18:54:36 -07:00
Andrew Kelley 642d017fea Maker: fix resolveLazyPath accidental mutation 2026-05-25 18:54:36 -07:00
Andrew Kelley 3e75a3e36b Configuration: add new target info 2026-05-25 18:54:36 -07:00
Andrew Kelley 9989f72c61 Maker: implement ConfigHeader 2026-05-25 18:54:36 -07:00
Andrew Kelley ed1f005826 Maker: finish implementing Step.Compile.appendIncludeDirFlags 2026-05-25 18:54:36 -07:00
Andrew Kelley 92038675af zig build: implement findProgram (not lazy) 2026-05-25 18:54:36 -07:00
Andrew Kelley 1edc5d7d67 Maker: implement FindProgram (lazy) 2026-05-25 18:54:36 -07:00
Andrew Kelley 54bb8d2dd9 implement the concept of configure cache poisoning 2026-05-25 18:54:36 -07:00
Andrew Kelley df8aaad058 maker: extract some pkg-config logic into reusable API 2026-05-25 18:54:36 -07:00
Andrew Kelley c678f94daa std.array_list: add last method, deprecated getLast 2026-05-25 18:54:36 -07:00
Andrew Kelley a874e729df zig build: remove "cc args" from Run steps
Not sure what I was thinking. This is silly, translate-c package simply
needs to pass this data (link_libc and target) to the CLI application,
which can then do the appropriate behavior.
2026-05-25 18:54:36 -07:00