-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Driver/SourceKit] Handle filelist driver args in getSingleFrontendInvocationFromDriverArguments #32281
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
[Driver/SourceKit] Handle filelist driver args in getSingleFrontendInvocationFromDriverArguments #32281
Conversation
@swift-ci please test |
Build failed |
@swift-ci please test OS X Platform |
@swift-ci please test Linux |
lib/Driver/FrontendUtil.cpp
Outdated
@@ -27,9 +29,21 @@ bool swift::driver::getSingleFrontendInvocationFromDriverArguments( | |||
ArrayRef<const char *> Argv, DiagnosticEngine &Diags, | |||
llvm::function_ref<bool(ArrayRef<const char *> FrontendArgs)> Action, | |||
bool ForceNoOutputs) { | |||
|
|||
// Expand any file list args. | |||
SmallVector<const char *, 256> ExpandedArgv(Argv.begin(), Argv.end()); |
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 shouldn't need two SmallVectors here; can we just use "Args"?
…vocationFromDriverArguments getSingleFrontendInvocationFromDriverArguments is set up to never produce file lists in the output frontend arguments, but since the driver accepts file lists as input arguments, this should too.
ab56ee9
to
50dc7d8
Compare
@swift-ci please test |
Build failed |
Build failed |
getSingleFrontendInvocationFromDriverArguments
is set up to never produce file lists in the output frontend arguments (since none of its clients care about command line argument limits), but since the driver proper accepts file lists as input arguments it seems like this function should handle them too.This was causing the sourcekitd stress tester (which passes whatever the build gives to the driver through to sourcekitd verbatim) to report failures that didn't reproduce in Xcode (which seems to never include file lists when computing the arguments to pass through to sourcekitd).