-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
cmake: separate installing and building (again) #13036
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
Conversation
Doesn't it just copies from cache to install prefix tho? Why would it builds twice? |
Hmm that's a fair point. I suppose instead of this I could enhance incremental cache mode to detect when there are no changes. Let me try that and get back to you... |
Enhancing incremental compilation will be a sub-project in and of itself. For now I made self-hosted act closer to the behavior of stage1, which I think will be a satisfactory solution for the 0.10.0 release, and will allow us to merge this PR. See the commit that I force-pushed for more details. In summary...
Now it has the desired behavior as you described here 👍 |
Alright I solved the bug that was causing the Windows CI to fail. Hopefully it will pass now. |
build.zig: add a 'compile' step to compile the self-hosted compiler without installing it. Compilation: set cache mode to whole when using the LLVM backend and --enable-cache is passed. This makes `zig build` act the same as it does with stage1. Upside is that a second invocation of `zig build` on an unmodified source tree will avoid redoing the compilation again. Downside is that it will proliferate more garbage in the project-local cache (same as stage1). This can eventually be fixed when Zig's incremental compilation is more robust; we can go back to having LLVM use CacheMode.incremental and rely on it detecting no changes and avoiding doing the flush() step.
Windows gives AccessDenied if you delete a directory which contains open file handles. This could be triggered when using CacheMode.whole when cross compiling macho test binaries.
Upstream PR ziglang/zig#13036 Signed-off-by: Eric Joldasov <[email protected]>
Upstream PR ziglang/zig#13036 Signed-off-by: Eric Joldasov <[email protected]> Closes: #27849 Signed-off-by: Sam James <[email protected]>
Extracted from #12747
Closes #12722