This is an archive of the discontinued LLVM Phabricator instance.

[clang] allow -fthinlto-index= without -x ir
ClosedPublic

Authored by inglorion on Jul 11 2019, 5:58 PM.

Details

Summary

Previously, passing -fthinlto-index= to clang required that bitcode
files be explicitly marked by -x ir. This change makes us detect files
with object file extensions as bitcode files when -fthinlto-index= is
present, so that explicitly marking them is no longer necessary.
Explicitly specifying -x ir is still accepted and continues to be part
of the test case to ensure we continue to support it.

Event Timeline

inglorion created this revision.Jul 11 2019, 5:58 PM

This was suggested on D64458.

If we take this change, D64458 can be simplified to just accepting -fthinlto-index= as a CoreOption without needing any further changes to Driver.cpp.

I also changed the error message in this change to reflect the fact that we no longer require -x ir; we just require the input to be a bitcode file.

rnk accepted this revision.Jul 12 2019, 4:56 PM

lgtm

This revision is now accepted and ready to land.Jul 12 2019, 4:56 PM
MaskRay added inline comments.
clang/lib/Driver/Driver.cpp
2123

-fthinlto-index=

tejohnson accepted this revision.Jul 12 2019, 5:16 PM

LGTM with the comment fix from @MaskRay

inglorion updated this revision to Diff 209948.Jul 15 2019, 1:46 PM

Fix typo pointed out by MaskRay (thanks!)

This revision was automatically updated to reflect the committed changes.
inglorion marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2019, 1:53 PM