-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
when building, use a temporary directory instead of dumping garbage in cwd #298
Comments
Here's my proposal for how this is going to work: How the Cache WorksWhen you build an executable, library, or object, the output goes into a In addition to outputting the build artifacts, Zig computes metadata about what
The manifest is serialized into a plain text file and stored in the cache, When building an executable, library, or object, Zig first computes this hash On the other hand, if Zig finds the manifest file, then it checks the list of |
Plan BBecause all of this has to be done generically in the Zig Build System anyway, One idea is that there could be a command line argument to provide these object So Zig would have a command line argument to output the list of zig source This leaves the problem of when zig is invoked without the build system, We can eliminate One way we could solve this is to wait until we self-host. Then this A nice benefit of Plan B is we would get to write it in Zig instead of C++. In summary:
|
Steps 1 and 2 are done. Step 3 is for milestone 0.2.0. See also #330 |
Duplicate of #330 |
Currently when you invoke zig, it dumps .o files everywhere. Instead it should have a scratch space temporary directory where it can do this work.
When choosing a filename for temporary objects, one of two strategies should be chosen:
The text was updated successfully, but these errors were encountered: