Skip to content

Compilation: add missing link file options to cache manifest #23921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

mlugg
Copy link
Member

@mlugg mlugg commented May 18, 2025

I unintentionally closed #23891 while pruning branches; this is the exact same diff.

Resolves: #23869

@mlugg mlugg requested a review from andrewrk May 18, 2025 20:15
Copy link
Member

@alexrp alexrp left a comment

Choose a reason for hiding this comment

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

I'm not Andrew but FWIW this looks fine to me.

@mlugg
Copy link
Member Author

mlugg commented May 29, 2025

I'll take that, I certainly don't think it can cause any issues. I'll try and double check that it actually fixes the issue (I barely tested this locally lol) and merge if all is well.

@mlugg mlugg force-pushed the link-file-options-cache-manifest branch from 336fbe0 to 7cf04d6 Compare June 16, 2025 11:19
@mlugg
Copy link
Member Author

mlugg commented Jun 16, 2025

Rebased, and tested the -fentry case locally -- and at that point I had pretty much written a standalone test case anyway, so I added that in. The test is confirmed as failing on master and passing on this PR.

@mlugg mlugg enabled auto-merge (rebase) June 16, 2025 11:20
Also add a standalone test which covers the `-fentry` case. It does this
by performing two reproducible compilations which are identical other
than having different entry points, and checking whether the emitted
binaries are identical (they should *not* be).

Resolves: ziglang#23869
@mlugg mlugg force-pushed the link-file-options-cache-manifest branch from 7cf04d6 to 998b7a0 Compare June 17, 2025 09:28
@mlugg
Copy link
Member Author

mlugg commented Jun 17, 2025

-fentry is either broken on our Mach-O linker or requires something special, so I've just hardcoded the standalone test target to x86_64-linux, since I know it works there. That's fine, since we're mainly trying to test the frontend there, and in particular the caching mechanism.

@mlugg mlugg merged commit 8aab222 into ziglang:master Jun 17, 2025
10 checks passed
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.

Potential cache issue leading to inconsistent
2 participants