-
Notifications
You must be signed in to change notification settings - Fork 341
New option format for prefix mapping #10723
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
New option format for prefix mapping #10723
Conversation
@swift-ci Please test LLVM |
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.
We should have a new Driver test that checks the new spelling and confirms the ordering when you mix it with the old spelling is preserved in the cc1 command line.
@@ -5093,6 +5093,18 @@ void Clang::AddPrefixMappingOptions(const ArgList &Args, ArgStringList &CmdArgs, | |||
A->render(Args, CmdArgs); | |||
} | |||
} | |||
|
|||
for (const Arg *A : Args.filtered(options::OPT_fdepscan_prefix_map)) { |
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.
We should make a single loop that handles both OPT_fdepscan_prefix_map
and OPT_fdepscan_prefix_map_EQ
so that the order is preserved with either spelling.
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 implemented this in my recent commit, could you please check that? 😄
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.
Current version looks good.
Can you add some lit tests to use the new flag you added and also mixing it together with the old flag?
e5bb87c
to
40f8661
Compare
There are some |
40f8661
to
83b5c98
Compare
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.
The implementation LGTM, so I think we just need a new driver test that checks the behaviour of mixing this with the old flag.
@swift-ci please test llvm |
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.
LGTM assuming PR tests don't show any related failures. Thanks!
I think there's some tests failing in Edit: should be fixed now, |
@swift-ci please test llvm |
Alright, I think the tests are okay now. The only failing tests are in |
The current option for specifying prefix mappings
-fdepscan-prefix-map=<old>=<new>
fails to handle paths containing=
characters properly. This PR adds a 2nd form of that option-fdepscan-prefix-map old new
while keeping the old format as well to fix this problem.