-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
std.Build: fix Compile.installHeader
behavior, add WriteFile.addCopyDirectory
#19167
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0b7123f
std.Build: correct behavior of `Step.Compile.installHeader`
castholm ff0bec6
Remove `dest_builder` field from `InstallDir/File`
castholm ce71eb3
Update `addInstallHeaderFile` to take a `LazyPath`
castholm 2c7be4f
Create an include tree of installed headers for dependent modules
castholm e16db29
Implement `WriteFile.addCopyDirectory`
castholm 27c8f89
Add standalone tests for `Compile.installHeaders`
castholm 8ce3a8b
`WriteFile.addCopyDirectory` should include all files by default
castholm 7b1a6a9
Fix install_headers test on macOS (and possibly Linux)
castholm 5af4e91
Oops, forgot to dupe installations in `installLibraryHeaders`
castholm d99e44a
Document added/updated functions
castholm eee5400
Account for dependency boundaries when duping headers
castholm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 tested this with a simple local project where
a
exported a static librarylib
bundling build root-relative headera.h
,b
depended ona
, andb
built and installed an executableexe
with amain.c
root source file that uses symbols froma.h
and which did bothexe.linkLibrary(lib)
andexe.installLibraryHeaders(lib)
.That repro failed with an "unable to update file" error prior to this workaround, but passes now.
If #19313 is accepted and implemented, this workaround can be reverted.
(Thanks @MasterQ32 for indirectly bringing this flaw to my attention.)