-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
build.zig: Warn if "config.h" cannot be located #12133
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
1fbe4ed to
67c4256
Compare
|
Previous discussion: #11501 (review) |
|
Thanks for the context @Vexu - I'll have to rework this one, clearly. I wonder if copying the |
67c4256 to
d43e52a
Compare
|
Added a command to copy "config.h" to the output directory during installation. The intention is that a build of Zig should bootstrap itself with the build configuration used to build it, by default. We may not want "config.h" in the install dir, though. In that case, I'll have to go back to the drawing board. |
andrewrk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really think config.h belongs in the installation of Zig. Although I admit it's mostly personal taste, if you produce an installation of Zig using Zig without going through stage1, then no config.h is produced. It seems like, therefore, a canonical installation of Zig does not include config.h.
Is there something wrong with the recommended way to handle stage1, stage2, and stage3 installations side-by-side by running commands directly from the cmake build directory, or by passing -Dconfig_h with the zig build commands?
|
I share your preference actually 👌
I think this behavior is perfectly fine with the warning added. Let me scale back the change to just that. |
d43e52a to
1ffcc57
Compare
We now warn the user if config.h could not be located. This also updates the search to stop early upon encountering a `.git` directory, so that we avoid recursing outside of the zig source if possible.
1ffcc57 to
7d3268d
Compare
Adds a warning if config.h could not be located:
The search for "config.h" now also stops early if it sees a
.gitfolder, so that we don't go beyond the repo root.