This is an archive of the discontinued LLVM Phabricator instance.

[ELF] --plugin-opt=thinlto-index-only: create empty index even if all bitcode files are lazy
ClosedPublic

Authored by MaskRay on May 1 2019, 8:35 PM.

Details

Summary

The gold plugin behavior (creating empty index files for lazy bitcode
files) was added in D46034, but it missed the case when there is no
non-lazy bitcode files, e.g.

ld.lld -shared crti.o crtbeginS.o --start-lib bitcode.o --end-lib ...

crti.o crtbeginS.o are not bitcode, but our distributed build system
wants bitcode.o.thinlto.bc to confirm all expected outputs are created
based on all of the modules provided to the linker.

Event Timeline

MaskRay created this revision.May 1 2019, 8:35 PM
MaskRay updated this revision to Diff 197705.May 1 2019, 10:27 PM
MaskRay retitled this revision from [ELF] --plugin-opt=thinlto-index-only: create empty index if all bitcode files are lazy to [ELF] --plugin-opt=thinlto-index-only: create empty index even if all bitcode files are lazy.
MaskRay edited the summary of this revision. (Show Details)

Update descriptions

tejohnson accepted this revision.May 2 2019, 6:44 AM

Thanks! LGTM with one suggestion below.

ELF/LTO.cpp
217

Suggest renaming to thinLTOCreateEmptyIndexFiles for clarity.

This revision is now accepted and ready to land.May 2 2019, 6:44 AM
MaskRay updated this revision to Diff 197771.May 2 2019, 6:53 AM
MaskRay edited the summary of this revision. (Show Details)

Rename to thinLTOCreateEmptyIndexFiles

MaskRay marked an inline comment as done.May 2 2019, 6:54 AM
MaskRay updated this revision to Diff 197774.May 2 2019, 7:00 AM

Fix comments

This revision was automatically updated to reflect the committed changes.
ruiu added a comment.May 7 2019, 1:46 AM

Is there any way to call thinLTOCreateEmptyIndexFiles from only one place?