ThinLTO compilation may decide not to split module and keep at as regular LTO.
In this can this module already processed during indexing and already a part of
merged object file. So here we can just skip it.
Details
- Reviewers
pcc tejohnson - Commits
- rGc35ff824de59: [ThinLTO] Ignore object files with no ThinLTO modules if -fthinlto-index= is set
rL325410: [ThinLTO] Ignore object files with no ThinLTO modules if -fthinlto-index= is set
rC325410: [ThinLTO] Ignore object files with no ThinLTO modules if -fthinlto-index= is set
Diff Detail
- Build Status
Buildable 14687 Build 14687: arc lint + arc unit
Event Timeline
LGTM (minor comment fix in test needed)
clang/test/CodeGen/thinlto_backend.ll | ||
---|---|---|
23 | Comment line length too long, and sentence isn't complete. |
This doesn't seem right to me. In a mixed full/thin LTO link the full LTO module would be compiled during the indexing phase. We don't want to compile it again in the backend as it could lead at best to duplicate symbol errors and at worst to miscompiles of llvm.type.* intrinsic calls.
Good point. The build system will presumably expect an output file to be generated, so probably just compile an "empty" Module in this case?
This looks ok to me, assuming it produces the empty output file as I expect it should. Please wait for pcc to take a look as well.
clang/lib/CodeGen/CodeGenAction.cpp | ||
---|---|---|
959 | It looks like this should result in an empty .o file being produced, but please confirm in the test (otherwise the build system may complain that expected output not produced). | |
clang/test/CodeGen/thinlto_backend.ll | ||
24 | comment isn't complete (ends in "which"). | |
26 | Check that empty $t4.o is produced. |
It looks like this should result in an empty .o file being produced, but please confirm in the test (otherwise the build system may complain that expected output not produced).