aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
AgeCommit message (Collapse)Author
4 dayscompiler: handle cancelation from finishPrelinkQueueAndrew Kelley
4 daysstd: rename other Dir "make" functions to "create"Andrew Kelley
4 dayscompiler: fix compilation when linking libcAndrew Kelley
4 dayscompiler: fix build failures from std.Io-fsAndrew Kelley
4 daysfix more fallout from locking stderrAndrew Kelley
4 dayscompiler: fix most compilation errors from std.fs changesAndrew Kelley
4 daysupdate lockStderrWriter sitesAndrew Kelley
use the application's Io implementation where possible. This correctly makes writing to stderr cancelable, fallible, and participate in the application's event loop. It also removes one more hard-coded dependency on a secondary Io implementation.
4 dayscompiler: update various code to new fs APIAndrew Kelley
4 daysfix a handful of compilation errors related to std.fs migrationAndrew Kelley
4 daysupdate makeDir() sites to specify permissionsAndrew Kelley
4 daysupdate all readFileAlloc() to accept Io instanceAndrew Kelley
4 daysupdate all rename() to rename(io)Andrew Kelley
4 daysstd.Build.Cache: remove readSmallFile and writeSmallFileAndrew Kelley
These were to support optimizations involving detecting when to avoid calling into LLD, which are no longer implemented.
4 daysupdate all access() to access(io)Andrew Kelley
4 daysstd: move abort and exit from posix into processAndrew Kelley
and delete the unit tests that called fork() no forking allowed in the std lib, including unit tests, except to implement child process spawning.
4 daysupdate all stat() to stat(io)Andrew Kelley
4 daysupdate all openDir() sites to accept io instanceAndrew Kelley
4 daysupdate all std.fs.cwd() to std.Io.Dir.cwd()Andrew Kelley
4 daysupdate all occurrences of openFile to receive an io instanceAndrew Kelley
4 daysupdate all occurrences of std.fs.Dir to std.Io.DirAndrew Kelley
4 daysupdate all occurrences of std.fs.File to std.Io.FileAndrew Kelley
4 daysupdate all occurrences of close() to close(io)Andrew Kelley
6 dayscompiler: replace thread pool with `std.Io`Matthew Lugg
Eliminate the `std.Thread.Pool` used in the compiler for concurrency and asynchrony, in favour of the new `std.Io.async` and `std.Io.concurrent` primitives. This removes the last usage of `std.Thread.Pool` in the Zig repository.
2025-12-06Compilation: fix appendFileSystemInput race between main thread and C object ↵Alex Rønne Petersen
workers Co-authored-by: Matthew Lugg <mlugg@mlugg.co.uk>
2025-12-05Compilation: track indirect file system inputs from clang's depfileAlex Rønne Petersen
Co-authored-by: Matthew Lugg <mlugg@mlugg.co.uk>
2025-12-05compiler: support --dependency-file linker optionAlex Rønne Petersen
closes https://github.com/ziglang/zig/issues/22213
2025-11-24frontend: introduce error.CanceledAndrew Kelley
2025-11-20update deprecated ArrayListUnmanaged usage (#25958)Benjamin Jurk
2025-11-20update Aro and translate-c to latestVeikka Tuominen
2025-11-19compiler: fix crash if file contents change during updateMatthew Lugg
When reporting a compile error, we would load the new file, but assume we could apply old AST/token indices (etc) to it, potentially causing crashes. Instead, if the file stat has changed since it was loaded, just emit an error that the file was modified mid-update.
2025-11-14represent Mac Catalyst as aarch64-maccatalyst-none rather than ↵Alex Rønne Petersen
aarch64-ios-macabi Apple's own headers and tbd files prefer to think of Mac Catalyst as a distinct OS target. Earlier, when DriverKit support was added to LLVM, it was represented a distinct OS. So why Apple decided to only represent Mac Catalyst as an ABI in the target triple is beyond me. But this isn't the first time they've ignored established target triple norms (see: armv7k and aarch64_32) and it probably won't be the last. While doing this, I also audited all Darwin OS prongs throughout the codebase and made sure they cover all the tags.
2025-11-07Move/coalesce RcIncludes enum to `std.zig.RcIncludes`Ryan Liptak
2025-11-07Move/coalesce CompressDebugSections enum to `std.zig.CompressDebugSections`Ryan Liptak
2025-11-05Move `std.Target.SubSystem` to `std.zig.Subsystem`Carl Åstholm
Also updates the field names to conform with the rest of std.
2025-10-30Merge pull request #25558 from jacobly0/elfv2-load-objJacob Young
Elf2: start implementing input object loading
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-29Elf2: load archivesJacob Young
2025-10-29Elf2: load relocations from input objectsJacob Young
2025-10-29Elf2: start implementing input object loadingJacob Young
2025-10-29compiler: update for introduction of std.IoAndrew Kelley
only thing remaining is using libc dns resolution when linking libc
2025-10-29progress towards compiler building againAndrew Kelley
2025-10-26Compilation: define __illumos__ for C/C++ when targeting illumosAlex Rønne Petersen
Per the illumos GCC fork.
2025-10-10Coff: implement threadlocal variablesJacob Young
2025-10-09- Output error messages for fatal translate-c errorskcbanner
2025-10-09- aroDiagnosticsToErrorBundle: fixup not clearing notes after flushing the ↵kcbanner
current error - Compilation: renameTmpIntoCache doesn't need to be pub after the `translateC` change
2025-10-09- Rework common translate-c and cImport logic into `Compilation.translateC`kcbanner
- Add std.zig.Server.allocErrorBundle, replace duplicates
2025-10-09- Rework translate-c to integrate with the build system (by outputing error ↵kcbanner
bundles on stdout) via --zig-integration - Revive some of the removed cache integration logic in `cmdTranslateC` now that `translate-c` can return error bundles - Fixup inconsistent path separators (on Windows) when building the aro include path - Move some error bundle logic from resinator into aro.Diagnostics - Add `ErrorBundle.addRootErrorMessageWithNotes` (extracted from resinator)
2025-10-06Elf2: implement virtual allocationJacob Young
This allows segments to be moved around in the output file without needing to reapply relocations until virtual address space is exhaused.
2025-10-05InternPool: use sequential string indices instead of byte offsetsJacob Young
This allows more bytes to be referenced by a smaller index range. Closes #22867 Closes #25297 Closes #25339
2025-10-03Merge pull request #25430 from jacobly0/x86_64-winJacob Young
Coff2: create a new linker from scratch