This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Optionally ignore empty index file
ClosedPublic

Authored by tejohnson on Jan 6 2017, 12:53 PM.

Details

Summary

In order to simplify distributed build system integration, where actions
may be scheduled before the Thin Link which determines the list of
objects selected by the linker. The gold plugin currently will emit
0-sized index files for objects not selected by the link, to enable
checking for expected output files by the build system. If the build
system then schedules a backend action for these bitcode files, we want
to be able to fall back to normal compilation instead of failing.

This is the LLVM side support for optionally enabling fallback
instead of issuing an error. Return a null CombinedIndex from
llvm::getModuleSummaryIndexForFile under the option when the file
is empty. Clang can then ignore the index when it is null.

Clang patch is D28362.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson updated this revision to Diff 83406.Jan 6 2017, 12:53 PM
tejohnson retitled this revision from to [ThinLTO] Optionally ignore empty index file.
tejohnson updated this object.
tejohnson added a reviewer: mehdi_amini.
tejohnson added a subscriber: llvm-commits.
mehdi_amini accepted this revision.Jan 6 2017, 1:47 PM
mehdi_amini edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jan 6 2017, 1:47 PM
This revision was automatically updated to reflect the committed changes.