Commit Graph

38365 Commits

Author SHA1 Message Date
Andrew Kelley 1d750d7067 Maker.Step.Run: fix leak in evalGeneric 2026-05-25 20:34:44 -07:00
Andrew Kelley 5b022623cf Maker.Step.Compile: fix memory leak in checkCompileErrors 2026-05-25 20:17:41 -07:00
Andrew Kelley f3dd10d40f Maker: add --debug-maker-leaks flag and fix some leaks 2026-05-25 20:14:34 -07:00
Andrew Kelley a9e0eb5340 std.Build.Step.Compile: deprecate out_filename 2026-05-25 19:27:16 -07:00
Andrew Kelley 66f0564c3a Maker.Watch: clean up a couple error logs 2026-05-25 19:27:16 -07:00
Andrew Kelley cb1f3e0ac4 Maker.Step.Compile: leak into the global arena less 2026-05-25 19:27:16 -07:00
Andrew Kelley a7d1edae8f zig build: save configurations to .zig-cache c/, not o/
keeps the cache directory hierarchy more uniform and avoids too many
files in one directory
2026-05-25 19:27:16 -07:00
Andrew Kelley 198f35c98c Maker: restore commit: clear step inputs when resetting the step
I'm a bit confused because my understanding is that each step is
supposed to make its own decision about whether to clear its watch
inputs and start over, or retain them from the previous update. However,
without this fix in place, the problem from #35224 manifests itself
again.

Since this fix is in place in master branch, I'll leave it for now and
audit the file watching logic later.
2026-05-25 18:54:37 -07:00
Andrew Kelley 19c63406d4 LazyPath: store relative paths as actual strings 2026-05-25 18:54:37 -07:00
Andrew Kelley 860d5ab9c4 Maker: implement relativePath with non-empty subpath for zig_exe 2026-05-25 18:54:36 -07:00
Andrew Kelley 35ee3747eb Maker.Step: avoid unnecessary compilation failure
On s390x the cache line size is 256 so this check was failing. That's
not useful, just check only for more common cache line sizes.
2026-05-25 18:54:36 -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 1aa65d094e Maker.Step.Run: leak into global arena less
There are still some uses:
- fuzzing
- generated paths (will require adjusting all step logic)
- Step.result_stderr
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 65c96c4035 Maker.Step.Run: add missing PATH entries for DLLs 2026-05-25 18:54:36 -07:00
Andrew Kelley d1a4462032 Maker.Step.InstallArtifact: use gpa for fs walking 2026-05-25 18:54:36 -07:00
Andrew Kelley f79ae3214c zig build: close open file handles before spawning child
ever so slightly reduces rlimit pressure in the child. plus it avoids
accounting problems in libc-test
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 2a8e15bc06 disable passing zig progress pipe to nsz libc test
however, this does not actually address the test case that started
failing
2026-05-25 18:54:36 -07:00
Andrew Kelley c5517102e7 Maker: delete ConfigHeader unit tests
these will work better as standalone tests that exercise the std.Build
API.
2026-05-25 18:54:36 -07:00
Andrew Kelley c0504a8fa8 fuzzer: get it working again 2026-05-25 18:54:36 -07:00
Andrew Kelley 1c8d50e062 ci: remove redundant comment
it says it right there in the echo text afterwards
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 0aa613d9bf Maker.Step.Run: fix passing -L to qemu 2026-05-25 18:54:36 -07:00
Andrew Kelley ed492ff51c Maker.Step.WriteFile: fix not creating dir entries 2026-05-25 18:54:36 -07:00
Andrew Kelley 626e410413 Maker: fix regressed dyn lib symlink logic 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 9b6dd7ee5c zig build CLI: change --debug-maker to --maker-opt=[mode]
the --debug- prefixed args are reserved for compiler debugging flags.
2026-05-25 18:54:36 -07:00
Andrew Kelley bd84824d9f Maker: fix compilation on BSDs 2026-05-25 18:54:36 -07:00
Andrew Kelley fed031031d Maker: fix compilation on windows 2026-05-25 18:54:36 -07:00
Andrew Kelley b069a2eb21 Maker: update macos file watching code to new api 2026-05-25 18:54:36 -07:00
Andrew Kelley 05fbeb4ea7 Maker.Step.Run: fix wrong allocator used 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 e7546f8dfd CI: --debug-maker in ci/x86_64-linux-debug-llvm.sh
in case any build system bugs are introduced this will make it quicker
to find the cause.
2026-05-25 18:54:36 -07:00
Andrew Kelley fa7433a924 fix std-docs.zig compilation 2026-05-25 18:54:36 -07:00
Andrew Kelley 8b4e55372a fix incr-check tests 2026-05-25 18:54:36 -07:00
Andrew Kelley 2edeeb5a64 zig build: add CLI usage for --print-configuration 2026-05-25 18:54:36 -07:00
Andrew Kelley 6d5fbb26da Maker: enhance debuggability when resolveLazyPath fails 2026-05-25 18:54:36 -07:00
Andrew Kelley 9989f72c61 Maker: implement ConfigHeader 2026-05-25 18:54:36 -07:00
Andrew Kelley e435299cfa Maker: progress towards ConfigHeader
however... why is this done in the make phase anyway? making a header
like this is typically done by the configure phase...
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 31c159c228 Maker: implement CheckFile 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