compiletest: Support --extern options with proc-macro directive
#151258
+60
−27
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.
So that
pub-priv1.rstest does not have to (ab)use theaux-cratedirective for this purpose. Which in turn makes it possible to make//@ no-prefer-dynamicactually not try to link dynamically. See #151257 and the test failure.This is very edge-casey so I don't think we should document this in rustc-dev-guide. If someone needs to do this they will look at the code and easily find the functionality.
This is a bit hacky since
--extern priv:pm.rsis not valid, but we can make our directives work however we want. And I think this is a fine pragmatic balance. Doing it "the right way" would be a lot of work for not much gain. Plus, that work can be done incrementally in small steps in the future if needed and wanted.Unblocks: