This is an archive of the discontinued LLVM Phabricator instance.

[clang-cl] Use the Windows response file tokenizer
ClosedPublic

Authored by rnk on Jul 15 2015, 11:02 AM.

Details

Summary

We were still using the Unix response file tokenizer for all driver
modes. This was difficult to get right in the beginning because there is
a circular dependency. The Driver class also can't officially determine
its mode until it can see all possible --driver-mode= flags, and those
flags could come from the response file.

Now we use the Windows parsing algorithm if the program name looks like
clang-cl, or if the --driver-mode=cl flag is present on the main command
line.

Diff Detail

Repository
rL LLVM

Event Timeline

rnk updated this revision to Diff 29799.Jul 15 2015, 11:02 AM
rnk retitled this revision from to [clang-cl] Use the Windows response file tokenizer.
rnk updated this object.
rnk added a reviewer: hans.
rnk added a subscriber: cfe-commits.
majnemer added inline comments.
tools/driver/driver.cpp
239–240 ↗(On Diff #29799)

You could do this in-place on ProgName to save a copy.

hans accepted this revision.Jul 15 2015, 1:47 PM
hans edited edge metadata.

lgtm!

tools/driver/driver.cpp
400 ↗(On Diff #29799)

Maybe expand this comment pointing out that we're checking for --driver-mode manually here because it's very early and we don't know the mode yet, like you said in the change description.

This revision is now accepted and ready to land.Jul 15 2015, 1:47 PM
This revision was automatically updated to reflect the committed changes.