feat: Add config setting which allows adding additional include paths to the VFS. #18880
+67
−3
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.
The motivation for this is resolving unresolved symbols for Firefox. We build Rust code with cargo but generate some code via our primary build system mach. Additionally, we bundle the windows crate in an out-of-source and out-of-build location. Essentially the same idea as discussed here, Firefox issue tracked here.
I investigated instead populating the vfs via rustc's
--emit=dep-info
as cargo already emits .d files but at this time cargo does not relay .d file changes as it hazards the unspecified cargo directory layout becoming defacto specified.This change therefore instead adds a config option to manually specify extra includes for the VFS as suggested in the above Zulip conversation and in this bug (similarly motivated by Firefox's needs).
I don't believe this change ready to land but it's in a place where it's sufficient to anchor a conversation on what's necessary beyond a minimal implementation, and I've verified this works with both Firefox's XPCOM generated functions and windows includes.