This is an archive of the discontinued LLVM Phabricator instance.

[clang][driver] Introduce new -fdriver-only flag
ClosedPublic

Authored by jansvoboda11 on Jun 9 2022, 8:39 AM.

Details

Summary

This patch introduces the new -fdriver-only flag which instructs Clang to only execute the driver logic without running individual jobs. In a way, this is very similar to -###, with the following differences:

  • it doesn't automatically print all jobs,
  • it doesn't avoid side effects (e.g. it will generate compilation database when -MJ is specified).

This flag will be useful in testing D121997.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Jun 9 2022, 8:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2022, 8:39 AM
jansvoboda11 requested review of this revision.Jun 9 2022, 8:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2022, 8:39 AM
This revision is now accepted and ready to land.Jun 10 2022, 5:47 AM
dexonsmith accepted this revision.Jun 10 2022, 11:35 AM

LGTM with a minor comment on the test.

clang/test/Driver/driver-only.c
14

Should there be a -check-epmty or similar when -v is not passed? (This tests the positive, but I don’t see a test that it’s not ALWAYS verbose.)

This revision was automatically updated to reflect the committed changes.