This is an archive of the discontinued LLVM Phabricator instance.

[clang][deps] Fix handling of -MT in module command-line
ClosedPublic

Authored by benlangmuir on Jul 12 2022, 5:32 PM.

Details

Summary

Follow-up to 6626f6fec3d3, this fixes the handling of -MT

  • If no targets are provided, we need to invent one since cc1 expects the driver to have handled it. The default is to use -o, quoting as necessary for a make target.
  • Fix the splitting for empty string, which was incorrectly treated as {""} instead of {}.
  • Add a way to test this behaviour in clang-scan-deps.

Diff Detail

Event Timeline

benlangmuir created this revision.Jul 12 2022, 5:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2022, 5:32 PM
Herald added a subscriber: mgorny. · View Herald Transcript
benlangmuir requested review of this revision.Jul 12 2022, 5:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2022, 5:32 PM
This revision is now accepted and ready to land.Jul 13 2022, 1:13 PM