aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2025-11-04libc: Add mach-o/getsect.h and mach/exception.h macOS headersLinus Groh
Closes #18257.
2025-11-04libc: Add all macOS CommonCrypto headersLinus Groh
Closes #23795.
2025-10-30std.debug.lockStderrWriter: also return ttyconfMatthew Lugg
`std.Io.tty.Config.detect` may be an expensive check (e.g. involving syscalls), and doing it every time we need to print isn't really necessary; under normal usage, we can compute the value once and cache it for the whole program's execution. Since anyone outputting to stderr may reasonably want this information (in fact they are very likely to), it makes sense to cache it and return it from `lockStderrWriter`. Call sites who do not need it will experience no significant overhead, and can just ignore the TTY config with a `const w, _` destructure.
2025-10-30Merge pull request #25733 from GasInfinity-Forks/x86_16-cpu_contextAlex Rønne Petersen
* fix: add `i86` cpu in `update_cpu_features` * feat: add `x86_16` debug `cpu_context`
2025-10-29Merge pull request #25592 from ziglang/init-std.IoAndrew Kelley
std: Introduce `Io` Interface
2025-10-29fix: add `i86` cpu in `update_cpu_features`GasInfinity
2025-10-29remove all IBM AIX and z/OS supportAlex Rønne Petersen
As with Solaris (dba1bf935390ddb0184a4dc72245454de6c06fd2), we have no way to actually audit contributions for these OSs. IBM also makes it even harder than Oracle to actually obtain these OSs. closes #23695 closes #23694 closes #3655 closes #23693
2025-10-29std.Io.Threaded: add ioBasic which disables networkingAndrew Kelley
2025-10-29incr-check: windows source files depend on ws2_32Andrew Kelley
2025-10-29update some tests and tools for new Io APIsAndrew Kelley
2025-10-29std: fix compilation errors on WindowsAndrew Kelley
2025-10-29fix miscellaneous compilation errorsAndrew Kelley
- ILSEQ -> error.BadPathName - implement dirStatPath for WASI
2025-10-09- Rework common translate-c and cImport logic into `Compilation.translateC`kcbanner
- Add std.zig.Server.allocErrorBundle, replace duplicates
2025-10-03Add depth function to `Walker.Entry`Ryan Liptak
This enables depth-related use cases without any dependency on the Walker's internal stack which doesn't always pertain to the actual depth of the current entry (i.e. recursing into a directory immediately affects the stack).
2025-10-03fix: Check if key exists instead of trying to match on nullHenry Kupty
Co-Authored-By: Ryan Liptak <squeek502@hotmail.com>
2025-10-03fix: Match prefix with static string mapHenry Kupty
Co-authored-by: Ryan Liptak <squeek502@hotmail.com>
2025-10-03refactor: Reimplement tool using SelectiveWalkerHenry Kupty
This skips directory trees where top-level directories do not match the defined ones
2025-09-19std: delete SegmentedList againAndrew Kelley
The data structure was originally added in 41e1cd185b82a518c58c92544c45f0348c03ef74 and then removed in 50a336fff899ebd8a687c453ec6beb18a5a9baf9, but brought back in 711bf55eaa643c3d05640bebbf3e4315477b8ed8 for Decl in the compiler frontend, and then the last reference to it was eliminated in 548a087fafeda5b07d2237d5137906b8d07da699 which removed Decl in favor of Nav and Cau.
2025-09-19tools: eliminate dependency on std.SegmentedListAndrew Kelley
2025-09-18std.Target: adjustments to LoongArch CPU modelsAlex Rønne Petersen
* Remove the generic model; we already have generic_la32 and generic_la64 and pick appropriately based on bitness. * Remove the loongarch64 model. We used this as our baseline for 64-bit, but it's actually pretty misleading and useless; it doesn't represent any real CPU and has less features than generic_la64. * Add la64v1_0 and la64v1_1 models. * Change our baseline CPU model for 64-bit to be la64v1_0, thus adding LSX to the baseline feature set.
2025-09-16tools: Update fetch_them_macos_headers.zig for macOS 26Linus Groh
2025-09-04std.elf: change STV enum from u2 to u3Alex Rønne Petersen
In gABI 4.3, st_other was changed such that the lower 3 bits are reserved for the visibility, up from the previous 2 bits.
2025-08-30Merge pull request #25077 from ziglang/GenericReaderAndrew Kelley
std.Io: delete GenericReader, AnyReader, FixedBufferStream; and related API breakage
2025-08-30update tools and other miscellaneous things to new APIsAndrew Kelley
2025-08-30std.Target.x86: purge avx10.n-256, rename avx10.n_512 to avx10.n, require ↵Alex Rønne Petersen
evex512 for avx512f Intel has abandoned AVX10.N/128,256; AVX10.N is now always 512-bit.
2025-08-30update_cpu_features: bump branch quota for amdgcnAlex Rønne Petersen
/lib/std/Target/amdgcn.zig:1656:5: error: evaluation exceeded 1000 backwards branches for (&result, 0..) |*elem, i| { ^~~
2025-08-30update_cpu_features: fix a fmtId call to be fmtIdPUAlex Rønne Petersen
2025-08-28update langref and docs to avoid GenericWriterAndrew Kelley
2025-08-28update more to avoid GenericWriterAndrew Kelley
2025-08-14Rewrite `generate_linux_syscalls` to be completely table basedStephen Gregoratto
Changes by Arnd Bergmann have migrated all supported architectures to use a table for their syscall lists. This removes the need to use the C pre-processor and simplifies the logic considerably. All currently supported architectures have been added, with the ones Zig doesn't support being commented out. Speaking of; OpenRisc has been enabled for generation.
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-08-08zig std: fix build failuresAndrew Kelley
2025-08-08std.Io: remove BufferedWriterAndrew Kelley
2025-08-07Merge pull request #24661 from alichraghi/spv4Andrew Kelley
spirv: refactor and remove deduplication ISel
2025-08-04spirv: define and use extended instruction set opcodesAli Cheraghi
2025-08-02spirv: refactorAli Cheraghi
2025-08-01build system: replace fuzzing UI with build UI, add time reportmlugg
This commit replaces the "fuzzer" UI, previously accessed with the `--fuzz` and `--port` flags, with a more interesting web UI which allows more interactions with the Zig build system. Most notably, it allows accessing the data emitted by a new "time report" system, which allows users to see which parts of Zig programs take the longest to compile. The option to expose the web UI is `--webui`. By default, it will listen on `[::1]` on a random port, but any IPv6 or IPv4 address can be specified with e.g. `--webui=[::1]:8000` or `--webui=127.0.0.1:8000`. The options `--fuzz` and `--time-report` both imply `--webui` if not given. Currently, `--webui` is incompatible with `--watch`; specifying both will cause `zig build` to exit with a fatal error. When the web UI is enabled, the build runner spawns the web server as soon as the configure phase completes. The frontend code consists of one HTML file, one JavaScript file, two CSS files, and a few Zig source files which are built into a WASM blob on-demand -- this is all very similar to the old fuzzer UI. Also inherited from the fuzzer UI is that the build system communicates with web clients over a WebSocket connection. When the build finishes, if `--webui` was passed (i.e. if the web server is running), the build runner does not terminate; it continues running to serve web requests, allowing interactive control of the build system. In the web interface is an overall "status" indicating whether a build is currently running, and also a list of all steps in this build. There are visual indicators (colors and spinners) for in-progress, succeeded, and failed steps. There is a "Rebuild" button which will cause the build system to reset the state of every step (note that this does not affect caching) and evaluate the step graph again. If `--time-report` is passed to `zig build`, a new section of the interface becomes visible, which associates every build step with a "time report". For most steps, this is just a simple "time taken" value. However, for `Compile` steps, the compiler communicates with the build system to provide it with much more interesting information: time taken for various pipeline phases, with a per-declaration and per-file breakdown, sorted by slowest declarations/files first. This feature is still in its early stages: the data can be a little tricky to understand, and there is no way to, for instance, sort by different properties, or filter to certain files. However, it has already given us some interesting statistics, and can be useful for spotting, for instance, particularly complex and slow compile-time logic. Additionally, if a compilation uses LLVM, its time report includes the "LLVM pass timing" information, which was previously accessible with the (now removed) `-ftime-report` compiler flag. To make time reports more useful, ZIR and compilation caches are ignored by the Zig compiler when they are enabled -- in other words, `Compile` steps *always* run, even if their result should be cached. This means that the flag can be used to analyze a project's compile time without having to repeatedly clear cache directory, for instance. However, when using `-fincremental`, updates other than the first will only show you the statistics for what changed on that particular update. Notably, this gives us a fairly nice way to see exactly which declarations were re-analyzed by an incremental update. If `--fuzz` is passed to `zig build`, another section of the web interface becomes visible, this time exposing the fuzzer. This is quite similar to the fuzzer UI this commit replaces, with only a few cosmetic tweaks. The interface is closer than before to supporting multiple fuzz steps at a time (in line with the overall strategy for this build UI, the goal will be for all of the fuzz steps to be accessible in the same interface), but still doesn't actually support it. The fuzzer UI looks quite different under the hood: as a result, various bugs are fixed, although other bugs remain. For instance, viewing the source code of any file other than the root of the main module is completely broken (as on master) due to some bogus file-to-module assignment logic in the fuzzer UI. Implementation notes: * The `lib/build-web/` directory holds the client side of the web UI. * The general server logic is in `std.Build.WebServer`. * Fuzzing-specific logic is in `std.Build.Fuzz`. * `std.Build.abi` is the new home of `std.Build.Fuzz.abi`, since it now relates to the build system web UI in general. * The build runner now has an **actual** general-purpose allocator, because thanks to `--watch` and `--webui`, the process can be arbitrarily long-lived. The gpa is `std.heap.DebugAllocator`, but the arena remains backed by `std.heap.page_allocator` for efficiency. I fixed several crashes caused by conflation of `gpa` and `arena` in the build runner and `std.Build`, but there may still be some I have missed. * The I/O logic in `std.Build.WebServer` is pretty gnarly; there are a *lot* of threads involved. I anticipate this situation improving significantly once the `std.Io` interface (with concurrency support) is introduced.
2025-07-23std.Io.poll: update to new I/O APIAndrew Kelley
2025-07-21objcopy: delete most of itAndrew Kelley
this code is not up to zig project standards tracked by #24522 oh, and fix not adjusting buffer seek position in std.fs.File.Reader
2025-07-16update compilerAndrew Kelley
2025-07-16tools: fix some bitrotAlex Rønne Petersen
2025-07-15update dump-cov for alignment and writergate changesdweiller
2025-07-14spirv: snake-case the specAli Cheraghi
2025-07-11Remove numerous things deprecated during the 0.14 release cycleLinus Groh
Basically everything that has a direct replacement or no uses left. Notable omissions: - std.ArrayHashMap: Too much fallout, needs a separate cleanup. - std.debug.runtime_safety: Too much fallout. - std.heap.GeneralPurposeAllocator: Lots of references to it remain, not a simple find and replace as "debug allocator" is not equivalent to "general purpose allocator". - std.io.Reader: Is being reworked at the moment. - std.unicode.utf8Decode(): No replacement, needs a new API first. - Manifest backwards compat options: Removal would break test data used by TestFetchBuilder. - panic handler needs to be a namespace: Many tests still rely on it being a function, needs a separate cleanup.
2025-07-07update autodocs and langref to new APIAndrew Kelley
2025-07-07update standalone and incremental tests to new APIAndrew Kelley
2025-07-07remove `usingnamespace` from the languageAndrew Kelley
closes #20663
2025-07-07remove `async` and `await` keywordsAndrew Kelley
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-06-23remove `spirv` cpu archAli Cheraghi
2025-06-19Target: pass and use locals by pointer instead of by valueJacob Young
This struct is larger than 256 bytes and code that copies it consistently shows up in profiles of the compiler.