From a139b69e125cc91e32a4c852a7b3268a732f7df0 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 22 Feb 2018 19:06:15 +0000 Subject: [ThinLTO] Always create linked objects file for --thinlto-index-only= Summary: ThinLTO indexing may decide to skip all objects. If we don't write something to the list build system may consider this as failure or linker can reuse a file from the previews build. Reviewers: pcc, tejohnson Subscribers: mehdi_amini, inglorion, eraman, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D43415 llvm-svn: 325819 --- llvm/tools/llvm-lto2/llvm-lto2.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'llvm/tools/llvm-lto2/llvm-lto2.cpp') diff --git a/llvm/tools/llvm-lto2/llvm-lto2.cpp b/llvm/tools/llvm-lto2/llvm-lto2.cpp index 2ba7bd55747..0baa34eb513 100644 --- a/llvm/tools/llvm-lto2/llvm-lto2.cpp +++ b/llvm/tools/llvm-lto2/llvm-lto2.cpp @@ -243,7 +243,11 @@ static int run(int argc, char **argv) { ThinBackend Backend; if (ThinLTODistributedIndexes) - Backend = createWriteIndexesThinBackend("", "", true, "", {}); + Backend = createWriteIndexesThinBackend(/* OldPrefix */ "", + /* NewPrefix */ "", + /* ShouldEmitImportsFiles */ true, + /* LinkedObjectsFile */ nullptr, + /* OnWrite */ {}); else Backend = createInProcessThinBackend(Threads); LTO Lto(std::move(Conf), std::move(Backend)); -- cgit v1.2.3