Skip to content

compiler: default to .whole cache mode for self-hosted backends - #22982

Merged
jacobly0 merged 3 commits into
ziglang:masterfrom
mlugg:cache-mode
Mar 3, 2025
Merged

jacobly0 merged 3 commits into
ziglang:masterfrom
mlugg:cache-mode

Conversation

@mlugg

@mlugg mlugg commented Feb 23, 2025 •

Copy link
Copy Markdown
Member

This is a better default cache mode until incremental compilation is enabled by default.

Closes #22642

@andrewrk andrewrk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice try

Comment thread src/main.zig Outdated
@mlugg
mlugg enabled auto-merge (rebase) February 23, 2025 12:57
@mlugg
mlugg disabled auto-merge February 26, 2025 00:01
@mlugg
mlugg force-pushed the cache-mode branch 3 times, most recently from 57244d5 to 3ee4f17 Compare February 26, 2025 03:09
@actondev

Copy link
Copy Markdown

Is this going to fix the issue where when using the native backend zig build while re-analyze & re-emit binary code even if the code unmodified? So waiting for this until I start using mainly the native backend 🙏

mlugg and others added 3 commits March 2, 2025 16:39
This is a better default cache mode until incremental compilation is
enabled by default.
Windows is a ridiculous operating system designed by toddlers, and so
requires us to close all file handles in the `tmp/xxxxxxx` cache dir
before renaming it into `o/xxxxxxx`. We have a hack in place to handle
this for the main output file, but the MachO linker also outputs a file
with debug symbols, and we weren't closing it! This led to a fuckton of
CI failures when we enabled `.whole` cache mode by default for
self-hosted backends.

thanks jacob for figuring this out while i sat there
@jacobly0
jacobly0 enabled auto-merge March 2, 2025 21:44
@jacobly0
jacobly0 merged commit 00a8742 into ziglang:master Mar 3, 2025
@mlugg
mlugg deleted the cache-mode branch May 18, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unable to codegen: InputOutput on Linux with Self-Hosted x86 Backend

4 participants