Skip to content

[DTLTO][ELF][COFF] Add archive support for DTLTO. - #157043

Merged
kbelochapka merged 24 commits into
llvm:mainfrom
kbelochapka:kbelochapka/main/dtlto-archives-support
Dec 31, 2025
Merged

kbelochapka merged 24 commits into
llvm:mainfrom
kbelochapka:kbelochapka/main/dtlto-archives-support

Conversation

@kbelochapka

Copy link
Copy Markdown
Contributor

This patch implements support for handling archive members in DTLTO.

Unlike ThinLTO, where archive members are passed as in-memory buffers,
DTLTO requires archive members to be materialized as individual files on the filesystem.
This is necessary because DTLTO invokes clang externally, which expects file-based inputs.
To support this, this implementation identifies archive members among the input files,
saves them to the filesystem, and updates their module_id to match their file paths.

kbelochapka and others added 2 commits September 3, 2025 02:18
This patch implements support for handling archive members in DTLTO.

Unlike ThinLTO, where archive members are passed as in-memory buffers,
DTLTO requires archive members to be materialized as individual files on the filesystem.
This is necessary because DTLTO invokes clang externally, which expects file-based inputs.
To support this, this implementation identifies archive members among the input files,
saves them to the filesystem, and updates their module_id to match their file paths.
@llvmbot llvmbot added lld lld:MachO lld:ELF lld:COFF platform:windows LTO Link time optimization (regular/full LTO or ThinLTO) labels Sep 5, 2025
@llvmbot

llvmbot commented Sep 5, 2025 •

Copy link
Copy Markdown
Member

@llvm/pr-subscribers-lld
@llvm/pr-subscribers-platform-windows
@llvm/pr-subscribers-lld-coff

@llvm/pr-subscribers-lld-elf

Author: None (kbelochapka)

Changes

This patch implements support for handling archive members in DTLTO.

Unlike ThinLTO, where archive members are passed as in-memory buffers,
DTLTO requires archive members to be materialized as individual files on the filesystem.
This is necessary because DTLTO invokes clang externally, which expects file-based inputs.
To support this, this implementation identifies archive members among the input files,
saves them to the filesystem, and updates their module_id to match their file paths.


Patch is 25.21 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/157043.diff

16 Files Affected:

  • (modified) cross-project-tests/CMakeLists.txt (+1)
  • (added) cross-project-tests/dtlto/archive.test (+80)
  • (added) cross-project-tests/dtlto/archives-mixed-lto-modes-test.test (+35)
  • (added) cross-project-tests/dtlto/archives-same-module-id.test (+55)
  • (modified) lld/COFF/InputFiles.cpp (+1)
  • (modified) lld/ELF/InputFiles.cpp (+1)
  • (modified) lld/ELF/LTO.cpp (+3)
  • (modified) lld/MachO/InputFiles.cpp (+1)
  • (modified) llvm/include/llvm/Bitcode/BitcodeReader.h (+5)
  • (added) llvm/include/llvm/DTLTO/Dtlto.h (+23)
  • (modified) llvm/include/llvm/LTO/LTO.h (+48)
  • (modified) llvm/lib/CMakeLists.txt (+1)
  • (added) llvm/lib/DTLTO/CMakeLists.txt (+7)
  • (added) llvm/lib/DTLTO/Dtlto.cpp (+226)
  • (modified) llvm/lib/LTO/CMakeLists.txt (+1)
  • (modified) llvm/lib/LTO/LTO.cpp (+18-2)
diff --git a/cross-project-tests/CMakeLists.txt b/cross-project-tests/CMakeLists.txt
index 192db87043177..6753a27698eae 100644
--- a/cross-project-tests/CMakeLists.txt
+++ b/cross-project-tests/CMakeLists.txt
@@ -20,6 +20,7 @@ set(CROSS_PROJECT_TEST_DEPS
   check-gdb-llvm-support
   count
   llvm-ar
+  llvm-ar
   llvm-config
   llvm-dwarfdump
   llvm-objdump
diff --git a/cross-project-tests/dtlto/archive.test b/cross-project-tests/dtlto/archive.test
new file mode 100644
index 0000000000000..1c01ae7a5691a
--- /dev/null
+++ b/cross-project-tests/dtlto/archive.test
@@ -0,0 +1,80 @@
+REQUIRES: x86-registered-target,ld.lld,llvm-ar
+
+# Test that a DTLTO link succeeds and outputs the expected set of files
+# correctly when archives are present.
+
+RUN: rm -rf %t && split-file %s %t && cd %t
+# Compile sources into bitcode. -O2 is required for cross-module importing.
+RUN: %clang -O2 --target=x86_64-linux-gnu -flto=thin -c foo.c boo.c moo.c loo.c voo.c main.c
+
+RUN: llvm-ar rcs archive.a foo.o boo.o moo.o
+RUN: llvm-ar rcsT archive.thin.a loo.o voo.o
+
+# Build with DTLTO.
+RUN: %clang -O2 --target=x86_64-linux-gnu -Werror -flto=thin \
+RUN:   -fuse-ld=lld -nostdlib -e main \
+RUN:   main.o archive.a archive.thin.a -o main.elf \
+RUN:   -Wl,--thinlto-distributor=%python \
+RUN:   -Wl,--thinlto-distributor-arg=%llvm_src_root/utils/dtlto/local.py \
+RUN:   -Wl,--thinlto-remote-compiler=%clang \
+RUN:   -Wl,--save-temps
+
+# Check that the required output files have been created.
+RUN: ls | FileCheck %s --check-prefix=OUTPUTS
+
+# JSON jobs description.
+OUTPUTS-DAG:    {{^}}main.[[PID:[0-9]+]].dist-file.json
+
+# Main source.
+OUTPUTS-DAG:    {{^}}main.{{[0-9]+}}.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}main.{{[0-9]+}}.[[PID]].native.o.thinlto.bc{{$}}
+
+# Regular archive members.
+# Filename composition: <archive>(<member> at <offset>).<task>.<pid>.<task>.<pid>.native.o[.thinlto.bc].
+OUTPUTS-DAG:    {{^}}archive.a(boo.o at {{[0-9]+}}).2.[[HEXPID:[a-fA-F0-9]+]].2.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}archive.a(boo.o at {{[0-9]+}}).2.[[HEXPID]].2.[[PID]].native.o.thinlto.bc{{$}}
+
+OUTPUTS-DAG:    {{^}}archive.a(foo.o at {{[0-9]+}}).3.[[HEXPID]].3.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}archive.a(foo.o at {{[0-9]+}}).3.[[HEXPID]].3.[[PID]].native.o.thinlto.bc{{$}}
+
+OUTPUTS-DAG:    {{^}}archive.a(moo.o at {{[0-9]+}}).4.[[HEXPID]].4.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}archive.a(moo.o at {{[0-9]+}}).4.[[HEXPID]].4.[[PID]].native.o.thinlto.bc{{$}}
+
+# Thin archive members.
+OUTPUTS-DAG:    {{^}}voo.{{[0-9]+}}.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}voo.{{[0-9]+}}.[[PID]].native.o.thinlto.bc{{$}}
+
+OUTPUTS-DAG:    {{^}}loo.{{[0-9]+}}.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}loo.{{[0-9]+}}.[[PID]].native.o.thinlto.bc{{$}}
+
+# Executable file.
+OUTPUTS-DAG:    {{^}}main.elf{{$}}
+
+#--- foo.c
+volatile int foo_int;
+__attribute__((retain)) int foo(int x) { return x + foo_int; }
+
+#--- boo.c
+extern int foo(int x);
+__attribute__((retain)) int boo(int x) { return foo(x); }
+
+#--- moo.c
+__attribute__((retain)) int moo() { return 3; }
+
+#--- loo.c
+extern int moo(int x);
+__attribute__((retain)) int loo(int x) { return moo(x); }
+
+#--- voo.c
+extern int foo(int x);
+extern int loo(int x);
+__attribute__((retain)) int voo(int x) { return foo(x) + loo(x + 1) + 7; }
+
+#--- main.c
+extern int boo(int x);
+extern int moo();
+extern int voo(int x);
+__attribute__((retain)) int main(int argc, char** argv) {
+  return boo(argc) + moo() + voo(argc + 3);
+}
+
diff --git a/cross-project-tests/dtlto/archives-mixed-lto-modes-test.test b/cross-project-tests/dtlto/archives-mixed-lto-modes-test.test
new file mode 100644
index 0000000000000..74f146028b4b6
--- /dev/null
+++ b/cross-project-tests/dtlto/archives-mixed-lto-modes-test.test
@@ -0,0 +1,35 @@
+REQUIRES: x86-registered-target,ld.lld,llvm-ar
+
+# Test that DTLTO works with a mixture of FullLTO and ThinLTO bitcode archive members
+# where there is more than one LTO partition.
+
+RUN: rm -rf %t && split-file %s %t && cd %t
+
+RUN: %clang --target=x86_64-linux-gnu -flto -c one.c two.c
+RUN: %clang --target=x86_64-linux-gnu -flto=thin -c three.c
+
+RUN: llvm-ar rc archive.a one.o two.o three.o
+
+# Build with DTLTO.
+RUN: %clang --target=x86_64-linux-gnu -Werror -flto -fuse-ld=lld -nostdlib \
+RUN:   -Wl,--whole-archive archive.a \
+RUN:   -Wl,--thinlto-distributor=%python \
+RUN:   -Wl,--thinlto-distributor-arg=%llvm_src_root/utils/dtlto/local.py \
+RUN:   -Wl,--thinlto-remote-compiler=%clang \
+RUN:   -Wl,--save-temps,--lto-partitions=2
+
+# Show that the FullLTO modules have been prepared for distribution, this is
+# not optimal but has no functional impact.
+RUN: FileCheck %s --input-file=a.out.resolution.txt
+CHECK: archive.a(one.o at {{.*}}).1.[[PID:[a-zA-Z0-9_]+]].o
+CHECK: archive.a(two.o at {{.*}}).2.[[PID]].o
+CHECK: archive.a(three.o at {{.*}}).3.[[PID]].o
+
+#--- one.c
+__attribute__((retain)) void one() {}
+
+#--- two.c
+__attribute__((retain)) void two() {}
+
+#--- three.c
+__attribute__((retain)) void three() {}
diff --git a/cross-project-tests/dtlto/archives-same-module-id.test b/cross-project-tests/dtlto/archives-same-module-id.test
new file mode 100644
index 0000000000000..09d5f7492bfa5
--- /dev/null
+++ b/cross-project-tests/dtlto/archives-same-module-id.test
@@ -0,0 +1,55 @@
+REQUIRES: x86-registered-target,ld.lld,llvm-ar
+
+# Test that a DTLTO link succeeds when there are two archive member files with
+# the same filename path component.
+
+# Split this file into several sources.
+RUN: rm -rf %t && split-file %s %t && cd %t
+
+RUN: %clang -O2 --target=x86_64-linux-gnu -flto=thin -c start.c
+
+# Create first archive.
+RUN: mkdir archive1 && cd archive1
+RUN: %clang -O2 --target=x86_64-linux-gnu -flto=thin -c ../t1.c ../t3.c
+RUN: llvm-ar rc archive.a t3.o t1.o
+RUN: cd ..
+
+# Create second archive.
+RUN: mkdir archive2 && cd archive2
+RUN: %clang -O2 --target=x86_64-linux-gnu -flto=thin -c ../t1.c ../t3.c
+RUN: llvm-ar rc archive.a t3.o t1.o
+RUN: cd ..
+
+RUN: %clang -O2 --target=x86_64-linux-gnu -Werror -flto=thin -fuse-ld=lld \
+RUN:   -nostdlib -Wl,--undefined=t1,--undefined=t3 \
+RUN:    start.o archive1/archive.a archive2/archive.a -o main.elf \
+RUN:   -Wl,--save-temps \
+RUN:   -Wl,--thinlto-distributor=%python \
+RUN:   -Wl,--thinlto-distributor-arg=%llvm_src_root/utils/dtlto/local.py \
+RUN:   -Wl,--thinlto-remote-compiler=%clang
+
+# Check that the required output files have been created.
+RUN: ls | FileCheck %s --check-prefix=OUTPUTS
+
+# JSON jobs description.
+OUTPUTS-DAG:    {{^}}main.[[PID:[0-9]+]].dist-file.json
+
+# Sources.
+OUTPUTS-DAG:    {{^}}start.{{[0-9]+}}.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}start.{{[0-9]+}}.[[PID]].native.o.thinlto.bc{{$}}
+
+# Archive members.
+# Filename composition: <archive>(<member> at <offset>).<task>.<pid>.<task>.<pid>.native.o[.thinlto.bc].
+OUTPUTS-DAG:    {{^}}archive.a(t3.o at {{[0-9]+}}).2.[[HEXPID:[a-fA-F0-9]+]].2.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}archive.a(t3.o at {{[0-9]+}}).2.[[HEXPID]].2.[[PID]].native.o.thinlto.bc{{$}}
+OUTPUTS-DAG:    {{^}}archive.a(t1.o at {{[0-9]+}}).3.[[HEXPID]].3.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}archive.a(t1.o at {{[0-9]+}}).3.[[HEXPID]].3.[[PID]].native.o.thinlto.bc{{$}}
+
+#--- t1.c
+__attribute__((retain)) void t1() { }
+
+#--- start.c
+__attribute__((retain)) void _start() { }
+
+#--- t3.c
+__attribute__((retain)) void t3() { }
diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp
index c08099b8810bb..d415955b6093b 100644
--- a/lld/COFF/InputFiles.cpp
+++ b/lld/COFF/InputFiles.cpp
@@ -1380,6 +1380,7 @@ BitcodeFile *BitcodeFile::create(COFFLinkerContext &ctx, MemoryBufferRef mb,
                                                utostr(offsetInArchive)));
 
   std::unique_ptr<lto::InputFile> obj = check(lto::InputFile::create(mbref));
+  obj->setArchivePathAndName(archiveName, mb.getBufferIdentifier());
   return make<BitcodeFile>(ctx.getSymtab(getMachineType(obj.get())), mb, obj,
                            lazy);
 }
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index a5921feb18299..ec0af9d0c0f4e 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -1874,6 +1874,7 @@ BitcodeFile::BitcodeFile(Ctx &ctx, MemoryBufferRef mb, StringRef archiveName,
   MemoryBufferRef mbref(mb.getBuffer(), name);
 
   obj = CHECK2(lto::InputFile::create(mbref), this);
+  obj->setArchivePathAndName(archiveName, mb.getBufferIdentifier());
 
   Triple t(obj->getTargetTriple());
   ekind = getBitcodeELFKind(t);
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index 8d4a6c9e3a81e..13e9c63495e4d 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -202,6 +202,9 @@ BitcodeCompiler::BitcodeCompiler(Ctx &ctx) : ctx(ctx) {
                                       ctx.arg.ltoPartitions,
                                       ltoModes[ctx.arg.ltoKind]);
 
+  if(!ctx.arg.dtltoDistributor.empty())
+      ltoObj->Dtlto = true;
+
   // Initialize usedStartStop.
   if (ctx.bitcodeFiles.empty())
     return;
diff --git a/lld/MachO/InputFiles.cpp b/lld/MachO/InputFiles.cpp
index 442fc608865d2..8cd4303441a22 100644
--- a/lld/MachO/InputFiles.cpp
+++ b/lld/MachO/InputFiles.cpp
@@ -2361,6 +2361,7 @@ BitcodeFile::BitcodeFile(MemoryBufferRef mb, StringRef archiveName,
                                                sys::path::filename(path) + ")" +
                                                utostr(offsetInArchive)));
   obj = check(lto::InputFile::create(mbref));
+  obj->setArchivePathAndName(archiveName, mb.getBufferIdentifier());
   if (lazy)
     parseLazy();
   else
diff --git a/llvm/include/llvm/Bitcode/BitcodeReader.h b/llvm/include/llvm/Bitcode/BitcodeReader.h
index 4f839d4cd1575..772ca82019278 100644
--- a/llvm/include/llvm/Bitcode/BitcodeReader.h
+++ b/llvm/include/llvm/Bitcode/BitcodeReader.h
@@ -137,6 +137,11 @@ struct ParserCallbacks {
 
     StringRef getModuleIdentifier() const { return ModuleIdentifier; }
 
+    // Assign a new module identifier to this bitcode module.
+    void setModuleIdentifier(llvm::StringRef ModuleId) {
+      ModuleIdentifier = ModuleId;
+    }
+
     /// Read the bitcode module and prepare for lazy deserialization of function
     /// bodies. If ShouldLazyLoadMetadata is true, lazily load metadata as well.
     /// If IsImporting is true, this module is being parsed for ThinLTO
diff --git a/llvm/include/llvm/DTLTO/Dtlto.h b/llvm/include/llvm/DTLTO/Dtlto.h
new file mode 100644
index 0000000000000..aa6af7d0cd9b7
--- /dev/null
+++ b/llvm/include/llvm/DTLTO/Dtlto.h
@@ -0,0 +1,23 @@
+//===- Dtlto.h - Distributed ThinLTO functions and classes ----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===---------------------------------------------------------------------===//
+
+#ifndef LLVM_DTLTO_H
+#define LLVM_DTLTO_H
+
+#include "llvm/LTO/LTO.h"
+#include "llvm/Support/MemoryBuffer.h"
+
+namespace dtlto {
+
+llvm::Expected<llvm::lto::InputFile*> addInput(llvm::lto::LTO *LtoObj,
+                               std::unique_ptr<llvm::lto::InputFile> Input);
+
+llvm::Error process(llvm::lto::LTO &LtoObj);
+} // namespace dtlto
+
+#endif // LLVM_DTLTO_H
diff --git a/llvm/include/llvm/LTO/LTO.h b/llvm/include/llvm/LTO/LTO.h
index 323c478691a92..7183a4429e665 100644
--- a/llvm/include/llvm/LTO/LTO.h
+++ b/llvm/include/llvm/LTO/LTO.h
@@ -32,6 +32,23 @@
 #include "llvm/Transforms/IPO/FunctionAttrs.h"
 #include "llvm/Transforms/IPO/FunctionImport.h"
 
+namespace llvm {
+namespace lto {
+class LTO;
+}
+} // namespace llvm
+
+namespace dtlto {
+class TempFilesRemover {
+  llvm::lto::LTO *Lto = nullptr;
+
+public:
+  TempFilesRemover(llvm::lto::LTO *LtoObj) : Lto{LtoObj} {}
+  ~TempFilesRemover();
+};
+
+} // namespace dtlto
+
 namespace llvm {
 
 class Error;
@@ -135,6 +152,12 @@ class InputFile {
   std::vector<StringRef> DependentLibraries;
   std::vector<std::pair<StringRef, Comdat::SelectionKind>> ComdatTable;
 
+  MemoryBufferRef MbRef;
+  bool IsMemberOfArchive = false;
+  bool IsThinLTO = false;
+  StringRef ArchivePath;
+  StringRef MemberName;
+
 public:
   LLVM_ABI ~InputFile();
 
@@ -193,6 +216,20 @@ class InputFile {
 
   // Returns the only BitcodeModule from InputFile.
   LLVM_ABI BitcodeModule &getSingleBitcodeModule();
+  // Returns the memory buffer reference for this input file.
+  MemoryBufferRef getFileBuffer() const { return MbRef; }
+  // Returns true if this input file is a member of an archive.
+  bool isMemberOfArchive() const { return IsMemberOfArchive; }
+  // Mark this input file as a member of archive.
+  void memberOfArchive(bool MA) { IsMemberOfArchive = MA; }
+
+  // Returns true if bitcode is ThinLTO.
+  bool isThinLTO() const { return IsThinLTO; }
+
+  // Store an archive path and a member name.
+  void setArchivePathAndName(StringRef Path, StringRef Name) { ArchivePath = Path; MemberName = Name; }
+  StringRef getArchivePath() const  { return ArchivePath; }
+  StringRef getMemberName() const  { return MemberName; }
 
 private:
   ArrayRef<Symbol> module_symbols(unsigned I) const {
@@ -580,6 +617,17 @@ class LTO {
 
   // Diagnostic optimization remarks file
   std::unique_ptr<ToolOutputFile> DiagnosticOutputFile;
+
+public:
+  /// DTLTO mode.
+  bool Dtlto = false;
+
+  BumpPtrAllocator PtrAlloc;
+  StringSaver Saver{PtrAlloc};
+
+  // Array of input bitcode files for LTO.
+  std::vector<std::unique_ptr<llvm::lto::InputFile>> InputFiles;
+  std::unique_ptr<dtlto::TempFilesRemover> TempsRemover;
 };
 
 /// The resolution for a symbol. The linker must provide a SymbolResolution for
diff --git a/llvm/lib/CMakeLists.txt b/llvm/lib/CMakeLists.txt
index a9432977718c6..0856af9058fef 100644
--- a/llvm/lib/CMakeLists.txt
+++ b/llvm/lib/CMakeLists.txt
@@ -22,6 +22,7 @@ add_subdirectory(Frontend)
 add_subdirectory(Transforms)
 add_subdirectory(Linker)
 add_subdirectory(Analysis)
+add_subdirectory(DTLTO)
 add_subdirectory(LTO)
 add_subdirectory(MC)
 add_subdirectory(MCA)
diff --git a/llvm/lib/DTLTO/CMakeLists.txt b/llvm/lib/DTLTO/CMakeLists.txt
new file mode 100644
index 0000000000000..51fd8aad6f48b
--- /dev/null
+++ b/llvm/lib/DTLTO/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_llvm_component_library(LLVMDTLTO
+  Dtlto.cpp
+
+  LINK_COMPONENTS
+  Core
+  Support
+  )
diff --git a/llvm/lib/DTLTO/Dtlto.cpp b/llvm/lib/DTLTO/Dtlto.cpp
new file mode 100644
index 0000000000000..356f30188c5c4
--- /dev/null
+++ b/llvm/lib/DTLTO/Dtlto.cpp
@@ -0,0 +1,226 @@
+//===- Dtlto.cpp - Distributed ThinLTO implementation --------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// \file
+// This file implements support functions for Distributed ThinLTO, focusing on
+// archive file handling.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/DTLTO/Dtlto.h"
+
+#include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/StringExtras.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/BinaryFormat/Magic.h"
+#include "llvm/LTO/LTO.h"
+#include "llvm/Support/FileSystem.h"
+#include "llvm/Support/ManagedStatic.h"
+#include "llvm/Support/MemoryBufferRef.h"
+#include "llvm/Support/Path.h"
+#include "llvm/Support/Process.h"
+#include "llvm/Support/raw_ostream.h"
+
+#include <iostream>
+#include <string>
+
+using namespace llvm;
+
+namespace dtlto {
+
+// Removes any temporary regular archive member files that were created during
+// processing.
+TempFilesRemover::~TempFilesRemover() {
+  if (!Lto)
+    return;
+  for (auto &Input : Lto->InputFiles) {
+    if (Input->isMemberOfArchive())
+      sys::fs::remove(Input->getName(), /*IgnoreNonExisting=*/true);
+  }
+}
+
+// Writes the content of a memory buffer into a file.
+static llvm::Error saveBuffer(StringRef FileBuffer, StringRef FilePath) {
+  std::error_code EC;
+  raw_fd_ostream OS(FilePath.str(), EC, sys::fs::OpenFlags::OF_None);
+  if (EC) {
+    return createStringError(inconvertibleErrorCode(),
+                             "Failed to create file %s: %s", FilePath.data(),
+                             EC.message().c_str());
+  }
+  OS.write(FileBuffer.data(), FileBuffer.size());
+  if (OS.has_error()) {
+    return createStringError(inconvertibleErrorCode(),
+                             "Failed writing to file %s", FilePath.data());
+  }
+  return Error::success();
+}
+
+// Compute the file path for a thin archive member.
+//
+// For thin archives, an archive member name is typically a file path relative
+// to the archive file's directory. This function resolves that path.
+SmallString<64> computeThinArchiveMemberPath(const StringRef ArchivePath,
+                                             const StringRef MemberName) {
+  assert(!ArchivePath.empty() && "An archive file path must be non empty.");
+  SmallString<64> MemberPath;
+  if (sys::path::is_relative(MemberName)) {
+    MemberPath = sys::path::parent_path(ArchivePath);
+    sys::path::append(MemberPath, MemberName);
+  } else
+    MemberPath = MemberName;
+  sys::path::remove_dots(MemberPath, /*remove_dot_dot=*/true);
+  return MemberPath;
+}
+
+// Magic string identifying thin archive files.
+static constexpr StringLiteral THIN_ARCHIVE_MAGIC = "!<thin>\n";
+
+// Determines if a file at the given path is a thin archive file.
+//
+// This function uses a cache to avoid repeatedly reading the same file.
+// It reads only the header portion (magic bytes) of the file to identify
+// the archive type.
+Expected<bool> isThinArchive(const StringRef ArchivePath) {
+  static StringMap<bool> ArchiveFiles;
+
+  // Return cached result if available.
+  auto Cached = ArchiveFiles.find(ArchivePath);
+  if (Cached != ArchiveFiles.end())
+    return Cached->second;
+
+  uint64_t FileSize = -1;
+  bool IsThin = false;
+  std::error_code EC = sys::fs::file_size(ArchivePath, FileSize);
+  if (EC)
+    return createStringError(inconvertibleErrorCode(),
+                             "Failed to get file size from archive %s: %s",
+                             ArchivePath.data(), EC.message().c_str());
+  if (FileSize < THIN_ARCHIVE_MAGIC.size())
+    return createStringError(inconvertibleErrorCode(),
+                             "Archive file size is too small %s",
+                             ArchivePath.data());
+
+  // Read only the first few bytes containing the magic signature.
+  ErrorOr<std::unique_ptr<MemoryBuffer>> MemBufferOrError =
+      MemoryBuffer::getFileSlice(ArchivePath, THIN_ARCHIVE_MAGIC.size(), 0);
+
+  if (EC = MemBufferOrError.getError())
+    return createStringError(inconvertibleErrorCode(),
+                             "Failed to read from archive %s: %s",
+                             ArchivePath.data(), EC.message().c_str());
+
+  StringRef MemBuf = (*MemBufferOrError.get()).getBuffer();
+  if (file_magic::archive != identify_magic(MemBuf))
+    return createStringError(inconvertibleErrorCode(),
+                             "Unknown format for archive %s",
+                             ArchivePath.data());
+
+  IsThin = MemBuf.starts_with(THIN_ARCHIVE_MAGIC);
+
+  // Cache the result
+  ArchiveFiles[ArchivePath] = IsThin;
+  return IsThin;
+}
+
+// This function performs the following tasks:
+// 1. Adds the input file to the LTO object's list of input files.
+// 2. For thin archive members, generates a new module ID which is a path to a
+// thin archive member file.
+// 3. For regular archive members, generates a new unique module ID.
+// 4. Updates the bitcode module's identifier.
+Expected<lto::InputFile *> addInput(lto::LTO *LtoObj,
+                                    std::unique_ptr<lto::InputFile> InputPtr) {
+
+  // Add the input file to the LTO object.
+  LtoObj->InputFiles.push_back(std::move(InputPtr));
+  lto::InputFile *Input = LtoObj->InputFiles.back().get();
+
+  // Skip processing if not in DTLTO mode.
+  if (!LtoObj->Dtlto)
+    return Input;
+
+  StringRef ModuleId = Input->getName();
+  StringRef ArchivePath = Input->getArchivePath();
+
+  // Only process archive members.
+  if (ArchivePath.empty())
+    return Input;
+
+  SmallString<64> NewModuleId;
+  BitcodeMod...
[truncated]

@llvmbot

llvmbot commented Sep 5, 2025

Copy link
Copy Markdown
Member

@llvm/pr-subscribers-lld-macho

Author: None (kbelochapka)

Changes

This patch implements support for handling archive members in DTLTO.

Unlike ThinLTO, where archive members are passed as in-memory buffers,
DTLTO requires archive members to be materialized as individual files on the filesystem.
This is necessary because DTLTO invokes clang externally, which expects file-based inputs.
To support this, this implementation identifies archive members among the input files,
saves them to the filesystem, and updates their module_id to match their file paths.


Patch is 25.21 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/157043.diff

16 Files Affected:

  • (modified) cross-project-tests/CMakeLists.txt (+1)
  • (added) cross-project-tests/dtlto/archive.test (+80)
  • (added) cross-project-tests/dtlto/archives-mixed-lto-modes-test.test (+35)
  • (added) cross-project-tests/dtlto/archives-same-module-id.test (+55)
  • (modified) lld/COFF/InputFiles.cpp (+1)
  • (modified) lld/ELF/InputFiles.cpp (+1)
  • (modified) lld/ELF/LTO.cpp (+3)
  • (modified) lld/MachO/InputFiles.cpp (+1)
  • (modified) llvm/include/llvm/Bitcode/BitcodeReader.h (+5)
  • (added) llvm/include/llvm/DTLTO/Dtlto.h (+23)
  • (modified) llvm/include/llvm/LTO/LTO.h (+48)
  • (modified) llvm/lib/CMakeLists.txt (+1)
  • (added) llvm/lib/DTLTO/CMakeLists.txt (+7)
  • (added) llvm/lib/DTLTO/Dtlto.cpp (+226)
  • (modified) llvm/lib/LTO/CMakeLists.txt (+1)
  • (modified) llvm/lib/LTO/LTO.cpp (+18-2)
diff --git a/cross-project-tests/CMakeLists.txt b/cross-project-tests/CMakeLists.txt
index 192db87043177..6753a27698eae 100644
--- a/cross-project-tests/CMakeLists.txt
+++ b/cross-project-tests/CMakeLists.txt
@@ -20,6 +20,7 @@ set(CROSS_PROJECT_TEST_DEPS
   check-gdb-llvm-support
   count
   llvm-ar
+  llvm-ar
   llvm-config
   llvm-dwarfdump
   llvm-objdump
diff --git a/cross-project-tests/dtlto/archive.test b/cross-project-tests/dtlto/archive.test
new file mode 100644
index 0000000000000..1c01ae7a5691a
--- /dev/null
+++ b/cross-project-tests/dtlto/archive.test
@@ -0,0 +1,80 @@
+REQUIRES: x86-registered-target,ld.lld,llvm-ar
+
+# Test that a DTLTO link succeeds and outputs the expected set of files
+# correctly when archives are present.
+
+RUN: rm -rf %t && split-file %s %t && cd %t
+# Compile sources into bitcode. -O2 is required for cross-module importing.
+RUN: %clang -O2 --target=x86_64-linux-gnu -flto=thin -c foo.c boo.c moo.c loo.c voo.c main.c
+
+RUN: llvm-ar rcs archive.a foo.o boo.o moo.o
+RUN: llvm-ar rcsT archive.thin.a loo.o voo.o
+
+# Build with DTLTO.
+RUN: %clang -O2 --target=x86_64-linux-gnu -Werror -flto=thin \
+RUN:   -fuse-ld=lld -nostdlib -e main \
+RUN:   main.o archive.a archive.thin.a -o main.elf \
+RUN:   -Wl,--thinlto-distributor=%python \
+RUN:   -Wl,--thinlto-distributor-arg=%llvm_src_root/utils/dtlto/local.py \
+RUN:   -Wl,--thinlto-remote-compiler=%clang \
+RUN:   -Wl,--save-temps
+
+# Check that the required output files have been created.
+RUN: ls | FileCheck %s --check-prefix=OUTPUTS
+
+# JSON jobs description.
+OUTPUTS-DAG:    {{^}}main.[[PID:[0-9]+]].dist-file.json
+
+# Main source.
+OUTPUTS-DAG:    {{^}}main.{{[0-9]+}}.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}main.{{[0-9]+}}.[[PID]].native.o.thinlto.bc{{$}}
+
+# Regular archive members.
+# Filename composition: <archive>(<member> at <offset>).<task>.<pid>.<task>.<pid>.native.o[.thinlto.bc].
+OUTPUTS-DAG:    {{^}}archive.a(boo.o at {{[0-9]+}}).2.[[HEXPID:[a-fA-F0-9]+]].2.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}archive.a(boo.o at {{[0-9]+}}).2.[[HEXPID]].2.[[PID]].native.o.thinlto.bc{{$}}
+
+OUTPUTS-DAG:    {{^}}archive.a(foo.o at {{[0-9]+}}).3.[[HEXPID]].3.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}archive.a(foo.o at {{[0-9]+}}).3.[[HEXPID]].3.[[PID]].native.o.thinlto.bc{{$}}
+
+OUTPUTS-DAG:    {{^}}archive.a(moo.o at {{[0-9]+}}).4.[[HEXPID]].4.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}archive.a(moo.o at {{[0-9]+}}).4.[[HEXPID]].4.[[PID]].native.o.thinlto.bc{{$}}
+
+# Thin archive members.
+OUTPUTS-DAG:    {{^}}voo.{{[0-9]+}}.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}voo.{{[0-9]+}}.[[PID]].native.o.thinlto.bc{{$}}
+
+OUTPUTS-DAG:    {{^}}loo.{{[0-9]+}}.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}loo.{{[0-9]+}}.[[PID]].native.o.thinlto.bc{{$}}
+
+# Executable file.
+OUTPUTS-DAG:    {{^}}main.elf{{$}}
+
+#--- foo.c
+volatile int foo_int;
+__attribute__((retain)) int foo(int x) { return x + foo_int; }
+
+#--- boo.c
+extern int foo(int x);
+__attribute__((retain)) int boo(int x) { return foo(x); }
+
+#--- moo.c
+__attribute__((retain)) int moo() { return 3; }
+
+#--- loo.c
+extern int moo(int x);
+__attribute__((retain)) int loo(int x) { return moo(x); }
+
+#--- voo.c
+extern int foo(int x);
+extern int loo(int x);
+__attribute__((retain)) int voo(int x) { return foo(x) + loo(x + 1) + 7; }
+
+#--- main.c
+extern int boo(int x);
+extern int moo();
+extern int voo(int x);
+__attribute__((retain)) int main(int argc, char** argv) {
+  return boo(argc) + moo() + voo(argc + 3);
+}
+
diff --git a/cross-project-tests/dtlto/archives-mixed-lto-modes-test.test b/cross-project-tests/dtlto/archives-mixed-lto-modes-test.test
new file mode 100644
index 0000000000000..74f146028b4b6
--- /dev/null
+++ b/cross-project-tests/dtlto/archives-mixed-lto-modes-test.test
@@ -0,0 +1,35 @@
+REQUIRES: x86-registered-target,ld.lld,llvm-ar
+
+# Test that DTLTO works with a mixture of FullLTO and ThinLTO bitcode archive members
+# where there is more than one LTO partition.
+
+RUN: rm -rf %t && split-file %s %t && cd %t
+
+RUN: %clang --target=x86_64-linux-gnu -flto -c one.c two.c
+RUN: %clang --target=x86_64-linux-gnu -flto=thin -c three.c
+
+RUN: llvm-ar rc archive.a one.o two.o three.o
+
+# Build with DTLTO.
+RUN: %clang --target=x86_64-linux-gnu -Werror -flto -fuse-ld=lld -nostdlib \
+RUN:   -Wl,--whole-archive archive.a \
+RUN:   -Wl,--thinlto-distributor=%python \
+RUN:   -Wl,--thinlto-distributor-arg=%llvm_src_root/utils/dtlto/local.py \
+RUN:   -Wl,--thinlto-remote-compiler=%clang \
+RUN:   -Wl,--save-temps,--lto-partitions=2
+
+# Show that the FullLTO modules have been prepared for distribution, this is
+# not optimal but has no functional impact.
+RUN: FileCheck %s --input-file=a.out.resolution.txt
+CHECK: archive.a(one.o at {{.*}}).1.[[PID:[a-zA-Z0-9_]+]].o
+CHECK: archive.a(two.o at {{.*}}).2.[[PID]].o
+CHECK: archive.a(three.o at {{.*}}).3.[[PID]].o
+
+#--- one.c
+__attribute__((retain)) void one() {}
+
+#--- two.c
+__attribute__((retain)) void two() {}
+
+#--- three.c
+__attribute__((retain)) void three() {}
diff --git a/cross-project-tests/dtlto/archives-same-module-id.test b/cross-project-tests/dtlto/archives-same-module-id.test
new file mode 100644
index 0000000000000..09d5f7492bfa5
--- /dev/null
+++ b/cross-project-tests/dtlto/archives-same-module-id.test
@@ -0,0 +1,55 @@
+REQUIRES: x86-registered-target,ld.lld,llvm-ar
+
+# Test that a DTLTO link succeeds when there are two archive member files with
+# the same filename path component.
+
+# Split this file into several sources.
+RUN: rm -rf %t && split-file %s %t && cd %t
+
+RUN: %clang -O2 --target=x86_64-linux-gnu -flto=thin -c start.c
+
+# Create first archive.
+RUN: mkdir archive1 && cd archive1
+RUN: %clang -O2 --target=x86_64-linux-gnu -flto=thin -c ../t1.c ../t3.c
+RUN: llvm-ar rc archive.a t3.o t1.o
+RUN: cd ..
+
+# Create second archive.
+RUN: mkdir archive2 && cd archive2
+RUN: %clang -O2 --target=x86_64-linux-gnu -flto=thin -c ../t1.c ../t3.c
+RUN: llvm-ar rc archive.a t3.o t1.o
+RUN: cd ..
+
+RUN: %clang -O2 --target=x86_64-linux-gnu -Werror -flto=thin -fuse-ld=lld \
+RUN:   -nostdlib -Wl,--undefined=t1,--undefined=t3 \
+RUN:    start.o archive1/archive.a archive2/archive.a -o main.elf \
+RUN:   -Wl,--save-temps \
+RUN:   -Wl,--thinlto-distributor=%python \
+RUN:   -Wl,--thinlto-distributor-arg=%llvm_src_root/utils/dtlto/local.py \
+RUN:   -Wl,--thinlto-remote-compiler=%clang
+
+# Check that the required output files have been created.
+RUN: ls | FileCheck %s --check-prefix=OUTPUTS
+
+# JSON jobs description.
+OUTPUTS-DAG:    {{^}}main.[[PID:[0-9]+]].dist-file.json
+
+# Sources.
+OUTPUTS-DAG:    {{^}}start.{{[0-9]+}}.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}start.{{[0-9]+}}.[[PID]].native.o.thinlto.bc{{$}}
+
+# Archive members.
+# Filename composition: <archive>(<member> at <offset>).<task>.<pid>.<task>.<pid>.native.o[.thinlto.bc].
+OUTPUTS-DAG:    {{^}}archive.a(t3.o at {{[0-9]+}}).2.[[HEXPID:[a-fA-F0-9]+]].2.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}archive.a(t3.o at {{[0-9]+}}).2.[[HEXPID]].2.[[PID]].native.o.thinlto.bc{{$}}
+OUTPUTS-DAG:    {{^}}archive.a(t1.o at {{[0-9]+}}).3.[[HEXPID]].3.[[PID]].native.o{{$}}
+OUTPUTS-DAG:    {{^}}archive.a(t1.o at {{[0-9]+}}).3.[[HEXPID]].3.[[PID]].native.o.thinlto.bc{{$}}
+
+#--- t1.c
+__attribute__((retain)) void t1() { }
+
+#--- start.c
+__attribute__((retain)) void _start() { }
+
+#--- t3.c
+__attribute__((retain)) void t3() { }
diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp
index c08099b8810bb..d415955b6093b 100644
--- a/lld/COFF/InputFiles.cpp
+++ b/lld/COFF/InputFiles.cpp
@@ -1380,6 +1380,7 @@ BitcodeFile *BitcodeFile::create(COFFLinkerContext &ctx, MemoryBufferRef mb,
                                                utostr(offsetInArchive)));
 
   std::unique_ptr<lto::InputFile> obj = check(lto::InputFile::create(mbref));
+  obj->setArchivePathAndName(archiveName, mb.getBufferIdentifier());
   return make<BitcodeFile>(ctx.getSymtab(getMachineType(obj.get())), mb, obj,
                            lazy);
 }
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index a5921feb18299..ec0af9d0c0f4e 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -1874,6 +1874,7 @@ BitcodeFile::BitcodeFile(Ctx &ctx, MemoryBufferRef mb, StringRef archiveName,
   MemoryBufferRef mbref(mb.getBuffer(), name);
 
   obj = CHECK2(lto::InputFile::create(mbref), this);
+  obj->setArchivePathAndName(archiveName, mb.getBufferIdentifier());
 
   Triple t(obj->getTargetTriple());
   ekind = getBitcodeELFKind(t);
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index 8d4a6c9e3a81e..13e9c63495e4d 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -202,6 +202,9 @@ BitcodeCompiler::BitcodeCompiler(Ctx &ctx) : ctx(ctx) {
                                       ctx.arg.ltoPartitions,
                                       ltoModes[ctx.arg.ltoKind]);
 
+  if(!ctx.arg.dtltoDistributor.empty())
+      ltoObj->Dtlto = true;
+
   // Initialize usedStartStop.
   if (ctx.bitcodeFiles.empty())
     return;
diff --git a/lld/MachO/InputFiles.cpp b/lld/MachO/InputFiles.cpp
index 442fc608865d2..8cd4303441a22 100644
--- a/lld/MachO/InputFiles.cpp
+++ b/lld/MachO/InputFiles.cpp
@@ -2361,6 +2361,7 @@ BitcodeFile::BitcodeFile(MemoryBufferRef mb, StringRef archiveName,
                                                sys::path::filename(path) + ")" +
                                                utostr(offsetInArchive)));
   obj = check(lto::InputFile::create(mbref));
+  obj->setArchivePathAndName(archiveName, mb.getBufferIdentifier());
   if (lazy)
     parseLazy();
   else
diff --git a/llvm/include/llvm/Bitcode/BitcodeReader.h b/llvm/include/llvm/Bitcode/BitcodeReader.h
index 4f839d4cd1575..772ca82019278 100644
--- a/llvm/include/llvm/Bitcode/BitcodeReader.h
+++ b/llvm/include/llvm/Bitcode/BitcodeReader.h
@@ -137,6 +137,11 @@ struct ParserCallbacks {
 
     StringRef getModuleIdentifier() const { return ModuleIdentifier; }
 
+    // Assign a new module identifier to this bitcode module.
+    void setModuleIdentifier(llvm::StringRef ModuleId) {
+      ModuleIdentifier = ModuleId;
+    }
+
     /// Read the bitcode module and prepare for lazy deserialization of function
     /// bodies. If ShouldLazyLoadMetadata is true, lazily load metadata as well.
     /// If IsImporting is true, this module is being parsed for ThinLTO
diff --git a/llvm/include/llvm/DTLTO/Dtlto.h b/llvm/include/llvm/DTLTO/Dtlto.h
new file mode 100644
index 0000000000000..aa6af7d0cd9b7
--- /dev/null
+++ b/llvm/include/llvm/DTLTO/Dtlto.h
@@ -0,0 +1,23 @@
+//===- Dtlto.h - Distributed ThinLTO functions and classes ----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===---------------------------------------------------------------------===//
+
+#ifndef LLVM_DTLTO_H
+#define LLVM_DTLTO_H
+
+#include "llvm/LTO/LTO.h"
+#include "llvm/Support/MemoryBuffer.h"
+
+namespace dtlto {
+
+llvm::Expected<llvm::lto::InputFile*> addInput(llvm::lto::LTO *LtoObj,
+                               std::unique_ptr<llvm::lto::InputFile> Input);
+
+llvm::Error process(llvm::lto::LTO &LtoObj);
+} // namespace dtlto
+
+#endif // LLVM_DTLTO_H
diff --git a/llvm/include/llvm/LTO/LTO.h b/llvm/include/llvm/LTO/LTO.h
index 323c478691a92..7183a4429e665 100644
--- a/llvm/include/llvm/LTO/LTO.h
+++ b/llvm/include/llvm/LTO/LTO.h
@@ -32,6 +32,23 @@
 #include "llvm/Transforms/IPO/FunctionAttrs.h"
 #include "llvm/Transforms/IPO/FunctionImport.h"
 
+namespace llvm {
+namespace lto {
+class LTO;
+}
+} // namespace llvm
+
+namespace dtlto {
+class TempFilesRemover {
+  llvm::lto::LTO *Lto = nullptr;
+
+public:
+  TempFilesRemover(llvm::lto::LTO *LtoObj) : Lto{LtoObj} {}
+  ~TempFilesRemover();
+};
+
+} // namespace dtlto
+
 namespace llvm {
 
 class Error;
@@ -135,6 +152,12 @@ class InputFile {
   std::vector<StringRef> DependentLibraries;
   std::vector<std::pair<StringRef, Comdat::SelectionKind>> ComdatTable;
 
+  MemoryBufferRef MbRef;
+  bool IsMemberOfArchive = false;
+  bool IsThinLTO = false;
+  StringRef ArchivePath;
+  StringRef MemberName;
+
 public:
   LLVM_ABI ~InputFile();
 
@@ -193,6 +216,20 @@ class InputFile {
 
   // Returns the only BitcodeModule from InputFile.
   LLVM_ABI BitcodeModule &getSingleBitcodeModule();
+  // Returns the memory buffer reference for this input file.
+  MemoryBufferRef getFileBuffer() const { return MbRef; }
+  // Returns true if this input file is a member of an archive.
+  bool isMemberOfArchive() const { return IsMemberOfArchive; }
+  // Mark this input file as a member of archive.
+  void memberOfArchive(bool MA) { IsMemberOfArchive = MA; }
+
+  // Returns true if bitcode is ThinLTO.
+  bool isThinLTO() const { return IsThinLTO; }
+
+  // Store an archive path and a member name.
+  void setArchivePathAndName(StringRef Path, StringRef Name) { ArchivePath = Path; MemberName = Name; }
+  StringRef getArchivePath() const  { return ArchivePath; }
+  StringRef getMemberName() const  { return MemberName; }
 
 private:
   ArrayRef<Symbol> module_symbols(unsigned I) const {
@@ -580,6 +617,17 @@ class LTO {
 
   // Diagnostic optimization remarks file
   std::unique_ptr<ToolOutputFile> DiagnosticOutputFile;
+
+public:
+  /// DTLTO mode.
+  bool Dtlto = false;
+
+  BumpPtrAllocator PtrAlloc;
+  StringSaver Saver{PtrAlloc};
+
+  // Array of input bitcode files for LTO.
+  std::vector<std::unique_ptr<llvm::lto::InputFile>> InputFiles;
+  std::unique_ptr<dtlto::TempFilesRemover> TempsRemover;
 };
 
 /// The resolution for a symbol. The linker must provide a SymbolResolution for
diff --git a/llvm/lib/CMakeLists.txt b/llvm/lib/CMakeLists.txt
index a9432977718c6..0856af9058fef 100644
--- a/llvm/lib/CMakeLists.txt
+++ b/llvm/lib/CMakeLists.txt
@@ -22,6 +22,7 @@ add_subdirectory(Frontend)
 add_subdirectory(Transforms)
 add_subdirectory(Linker)
 add_subdirectory(Analysis)
+add_subdirectory(DTLTO)
 add_subdirectory(LTO)
 add_subdirectory(MC)
 add_subdirectory(MCA)
diff --git a/llvm/lib/DTLTO/CMakeLists.txt b/llvm/lib/DTLTO/CMakeLists.txt
new file mode 100644
index 0000000000000..51fd8aad6f48b
--- /dev/null
+++ b/llvm/lib/DTLTO/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_llvm_component_library(LLVMDTLTO
+  Dtlto.cpp
+
+  LINK_COMPONENTS
+  Core
+  Support
+  )
diff --git a/llvm/lib/DTLTO/Dtlto.cpp b/llvm/lib/DTLTO/Dtlto.cpp
new file mode 100644
index 0000000000000..356f30188c5c4
--- /dev/null
+++ b/llvm/lib/DTLTO/Dtlto.cpp
@@ -0,0 +1,226 @@
+//===- Dtlto.cpp - Distributed ThinLTO implementation --------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// \file
+// This file implements support functions for Distributed ThinLTO, focusing on
+// archive file handling.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/DTLTO/Dtlto.h"
+
+#include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/StringExtras.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/BinaryFormat/Magic.h"
+#include "llvm/LTO/LTO.h"
+#include "llvm/Support/FileSystem.h"
+#include "llvm/Support/ManagedStatic.h"
+#include "llvm/Support/MemoryBufferRef.h"
+#include "llvm/Support/Path.h"
+#include "llvm/Support/Process.h"
+#include "llvm/Support/raw_ostream.h"
+
+#include <iostream>
+#include <string>
+
+using namespace llvm;
+
+namespace dtlto {
+
+// Removes any temporary regular archive member files that were created during
+// processing.
+TempFilesRemover::~TempFilesRemover() {
+  if (!Lto)
+    return;
+  for (auto &Input : Lto->InputFiles) {
+    if (Input->isMemberOfArchive())
+      sys::fs::remove(Input->getName(), /*IgnoreNonExisting=*/true);
+  }
+}
+
+// Writes the content of a memory buffer into a file.
+static llvm::Error saveBuffer(StringRef FileBuffer, StringRef FilePath) {
+  std::error_code EC;
+  raw_fd_ostream OS(FilePath.str(), EC, sys::fs::OpenFlags::OF_None);
+  if (EC) {
+    return createStringError(inconvertibleErrorCode(),
+                             "Failed to create file %s: %s", FilePath.data(),
+                             EC.message().c_str());
+  }
+  OS.write(FileBuffer.data(), FileBuffer.size());
+  if (OS.has_error()) {
+    return createStringError(inconvertibleErrorCode(),
+                             "Failed writing to file %s", FilePath.data());
+  }
+  return Error::success();
+}
+
+// Compute the file path for a thin archive member.
+//
+// For thin archives, an archive member name is typically a file path relative
+// to the archive file's directory. This function resolves that path.
+SmallString<64> computeThinArchiveMemberPath(const StringRef ArchivePath,
+                                             const StringRef MemberName) {
+  assert(!ArchivePath.empty() && "An archive file path must be non empty.");
+  SmallString<64> MemberPath;
+  if (sys::path::is_relative(MemberName)) {
+    MemberPath = sys::path::parent_path(ArchivePath);
+    sys::path::append(MemberPath, MemberName);
+  } else
+    MemberPath = MemberName;
+  sys::path::remove_dots(MemberPath, /*remove_dot_dot=*/true);
+  return MemberPath;
+}
+
+// Magic string identifying thin archive files.
+static constexpr StringLiteral THIN_ARCHIVE_MAGIC = "!<thin>\n";
+
+// Determines if a file at the given path is a thin archive file.
+//
+// This function uses a cache to avoid repeatedly reading the same file.
+// It reads only the header portion (magic bytes) of the file to identify
+// the archive type.
+Expected<bool> isThinArchive(const StringRef ArchivePath) {
+  static StringMap<bool> ArchiveFiles;
+
+  // Return cached result if available.
+  auto Cached = ArchiveFiles.find(ArchivePath);
+  if (Cached != ArchiveFiles.end())
+    return Cached->second;
+
+  uint64_t FileSize = -1;
+  bool IsThin = false;
+  std::error_code EC = sys::fs::file_size(ArchivePath, FileSize);
+  if (EC)
+    return createStringError(inconvertibleErrorCode(),
+                             "Failed to get file size from archive %s: %s",
+                             ArchivePath.data(), EC.message().c_str());
+  if (FileSize < THIN_ARCHIVE_MAGIC.size())
+    return createStringError(inconvertibleErrorCode(),
+                             "Archive file size is too small %s",
+                             ArchivePath.data());
+
+  // Read only the first few bytes containing the magic signature.
+  ErrorOr<std::unique_ptr<MemoryBuffer>> MemBufferOrError =
+      MemoryBuffer::getFileSlice(ArchivePath, THIN_ARCHIVE_MAGIC.size(), 0);
+
+  if (EC = MemBufferOrError.getError())
+    return createStringError(inconvertibleErrorCode(),
+                             "Failed to read from archive %s: %s",
+                             ArchivePath.data(), EC.message().c_str());
+
+  StringRef MemBuf = (*MemBufferOrError.get()).getBuffer();
+  if (file_magic::archive != identify_magic(MemBuf))
+    return createStringError(inconvertibleErrorCode(),
+                             "Unknown format for archive %s",
+                             ArchivePath.data());
+
+  IsThin = MemBuf.starts_with(THIN_ARCHIVE_MAGIC);
+
+  // Cache the result
+  ArchiveFiles[ArchivePath] = IsThin;
+  return IsThin;
+}
+
+// This function performs the following tasks:
+// 1. Adds the input file to the LTO object's list of input files.
+// 2. For thin archive members, generates a new module ID which is a path to a
+// thin archive member file.
+// 3. For regular archive members, generates a new unique module ID.
+// 4. Updates the bitcode module's identifier.
+Expected<lto::InputFile *> addInput(lto::LTO *LtoObj,
+                                    std::unique_ptr<lto::InputFile> InputPtr) {
+
+  // Add the input file to the LTO object.
+  LtoObj->InputFiles.push_back(std::move(InputPtr));
+  lto::InputFile *Input = LtoObj->InputFiles.back().get();
+
+  // Skip processing if not in DTLTO mode.
+  if (!LtoObj->Dtlto)
+    return Input;
+
+  StringRef ModuleId = Input->getName();
+  StringRef ArchivePath = Input->getArchivePath();
+
+  // Only process archive members.
+  if (ArchivePath.empty())
+    return Input;
+
+  SmallString<64> NewModuleId;
+  BitcodeMod...
[truncated]

@github-actions

github-actions Bot commented Sep 5, 2025

Copy link
Copy Markdown

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
Please turn off Keep my email addresses private setting in your account.
See LLVM Developer Policy and LLVM Discourse for more information.

@github-actions

github-actions Bot commented Sep 5, 2025 •

Copy link
Copy Markdown

✅ With the latest revision this PR passed the C/C++ code formatter.

@tru tru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor nits.

Comment thread cross-project-tests/CMakeLists.txt Outdated
check-gdb-llvm-support
count
llvm-ar
llvm-ar

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a mistake I assume?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, yes that is apparently a merge artifact. Fixed.

Comment thread llvm/lib/LTO/LTO.cpp Outdated
#include "llvm/CGData/CodeGenData.h"
#include "llvm/CodeGen/Analysis.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/DTLTO/Dtlto.h"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at it like this - I think the filename should be capitalized as well. It just looks wrong :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, renamed to DTLTO.h and DTLTO.cpp

Comment thread llvm/include/llvm/DTLTO/Dtlto.h Outdated
namespace dtlto {

llvm::Expected<llvm::lto::InputFile *>
addInput(llvm::lto::LTO *LtoObj, std::unique_ptr<llvm::lto::InputFile> Input);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have the style guide available to me right now, but I am pretty sure functions outside classes should be capitalised. But please check before changing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to LLVM coding standards any function name should be camel case. I did not find any exceptions in the standards documents. So I will leave this as it is.

@kbelochapka kbelochapka changed the title [DTLTO][ELF][COFF][MachO] Add archive support for DTLTO. [DTLTO][ELF][COFF] Add archive support for DTLTO. Sep 9, 2025
# Build with DTLTO.
RUN: %clang --target=x86_64-linux-gnu -Werror -flto -fuse-ld=lld -nostdlib \
RUN: -Wl,--whole-archive archive.a \
RUN: -Wl,--thinlto-distributor=%python \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know in some earlier instances tests that where referring to %python needed to be quoted when running on windows. I still see this in some of the tests but not all of them - was there a rule when this was needed @bd1976bris ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know in some earlier instances tests that where referring to %python needed to be quoted when running on windows. I still see this in some of the tests but not all of them - was there a rule when this was needed @bd1976bris ?

Good thought! The quoting was only needed in the response-file case when %python expanded to a path containing spaces. In normal runs, lit expands %python and takes care of Windows quoting, so extra quotes aren’t required.

@teresajohnson teresajohnson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks better but you aren't taking advantage of the polymorphism, comments and suggestions below.

Comment thread llvm/lib/DTLTO/DTLTO.cpp Outdated
// It reads only the header portion (magic bytes) of the file to identify
// the archive type.
Expected<bool> isThinArchive(const StringRef ArchivePath) {
static StringMap<bool> ArchiveFiles;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This static var can/should be converted to a DTLTO non-static data member?

Comment thread lld/ELF/LTO.cpp Outdated
llvm::lto::LTO::LTOKind::LTOK_UnifiedThin,
llvm::lto::LTO::LTOKind::LTOK_UnifiedRegular,
llvm::lto::LTO::LTOKind::LTOK_Default};
ltoObj = std::make_unique<lto::DTLTO>(createConfig(ctx), backend,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why unconditionally create a DTLTO derived class? This could instead be:

ltoObj = ctx.arg.dtltoDistributor.empty() ?
     std::make_unique<lto::LTO>(....)  :
     std::make_unique<lto::DTLTO>(....) 

Then the Dtlto flag can go away and just rely on virtual class overrides to get the appropriate behavior. I.e. like you have already done to addInput and dtlto_process, although I don't think the base class implementations are being called currently because you are always constructing a DTLTO object.

Comment thread llvm/include/llvm/DTLTO/DTLTO.h Outdated
LLVM_ABI virtual Expected<std::shared_ptr<lto::InputFile>>
addInput(std::unique_ptr<lto::InputFile> InputPtr) override;

LLVM_ABI virtual llvm::Error dtlto_process() override;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make this something like "handleArchiveInputs"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this will make the code cleaner. I have implemented all your suggestions in a last commit.

@teresajohnson teresajohnson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks looks good just some minor cleanups noted below (isThinArchive can become a private member func, make member funcs/vars private where possible, and add documenting comments to the declarations). Otherwise lgtm

Comment thread llvm/lib/DTLTO/DTLTO.cpp Outdated
Expected<bool> isThinArchive(const StringRef ArchivePath) {
static StringMap<bool> ArchiveFiles;

Expected<bool> isThinArchive(lto::DTLTO *Dtlto, const StringRef ArchivePath) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just make this a private member of the DTLTO class so that you don't have to pass in the object.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for suggestion, done.

}

virtual llvm::Error dtlto_process() { return llvm::Error::success(); }
virtual llvm::Error handleArchiveInputs() { return llvm::Error::success(); }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

Comment thread llvm/include/llvm/DTLTO/DTLTO.h Outdated
LLVM_ABI virtual llvm::Error dtlto_process() override;
LLVM_ABI virtual llvm::Error handleArchiveInputs() override;

StringMap<bool> ArchiveFiles;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be private once isThinArchive is a member function (see comment below). Also, document with comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

~DTLTO() { removeTempFiles(); }

BumpPtrAllocator PtrAlloc;
StringSaver Saver{PtrAlloc};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document what the allocator/saver are for (and make private?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.

addInput(std::unique_ptr<lto::InputFile> InputPtr) override;

LLVM_ABI virtual llvm::Error dtlto_process() override;
LLVM_ABI virtual llvm::Error handleArchiveInputs() override;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document this function and addInput above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

LLVM_ABI void removeTempFiles();

// Array of input bitcode files for LTO.
std::vector<std::shared_ptr<lto::InputFile>> InputFiles;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make private

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, made it private

StringSaver Saver{PtrAlloc};

// Remove temporary files.
LLVM_ABI void removeTempFiles();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make private

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

bool Dtlto = false;

virtual Expected<std::shared_ptr<lto::InputFile>>
addInput(std::unique_ptr<lto::InputFile> InputPtr) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

Comment thread llvm/include/llvm/LTO/LTO.h Outdated
namespace lto {
class LTO;
}
} // namespace llvm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed this because clang-format is complaining about the extra line below. Why is this new block needed? I don't see any added references to the LTO class below that would require the forward declaration - can it be removed? In fact, there is already a forward declaration of LTO at line 121 below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, removed this unnecessary leftover code.

Comment thread llvm/lib/DTLTO/DTLTO.cpp Outdated
namespace dtlto {

// Writes the content of a memory buffer into a file.
static llvm::Error saveBuffer(StringRef FileBuffer, StringRef FilePath) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather than make this static, just make the namespace enclosing this anonymous. Also do computeThinArchiveMemberPath, saveInputArchiveMember, and saveInputArchiveMembers need to be in a named namespace since they are only called within this TU? I'd suggest putting all of these into an anonymous namespace

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, made saveInputArchiveMember() and saveInputArchiveMembers() functions private and placed other functions into an anonymous namespace.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since saveBuffer() is now in anonymous name space, made it non static.

@kbelochapka
kbelochapka merged commit b66557d into llvm:main Dec 31, 2025
@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder amdgpu-offload-ubuntu-22-cmake-build-only running on rocm-docker-ubu-22 while building cross-project-tests,lld,llvm at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/203/builds/32825

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[3108/8273] Creating library symlink lib/libLLVMMCDisassembler.so
[3109/8273] Linking CXX shared library lib/libLLVMSPIRVInfo.so.22.0git
[3110/8273] Building NVVMOps.h.inc...
[3111/8273] Creating library symlink lib/libLLVMMCA.so
[3112/8273] Linking CXX shared library lib/libLLVMDWARFCFIChecker.so.22.0git
[3113/8273] Creating library symlink lib/libLLVMSPIRVInfo.so
[3114/8273] Creating library symlink lib/libLLVMDWARFCFIChecker.so
[3115/8273] Linking CXX shared library lib/libLLVMFrontendHLSL.so.22.0git
[3116/8273] Linking CXX shared library lib/libLLVMCFGuard.so.22.0git
[3117/8273] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib && :
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
DTLTO.cpp:(.text._ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x12): undefined reference to `llvm::lto::InputFile::~InputFile()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x66): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x295): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x66): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x279): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::isThinArchive(llvm::StringRef) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO13isThinArchiveENS_9StringRefE+0x6fa): undefined reference to `llvm::identify_magic(llvm::StringRef)'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::removeTempFiles()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO15removeTempFilesEv+0x4e): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile> >) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0xaf): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x166): undefined reference to `llvm::lto::InputFile::getSingleBitcodeModule()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::saveInputArchiveMember(llvm::lto::InputFile*) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO22saveInputArchiveMemberEPNS0_9InputFileE+0x32): undefined reference to `llvm::lto::InputFile::getName() const'
collect2: error: ld returned 1 exit status
[3118/8273] Creating library symlink lib/libLLVMFrontendHLSL.so
[3119/8273] Creating library symlink lib/libLLVMCFGuard.so
[3120/8273] Building TosaOps.h.inc...
[3121/8273] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/OffloadBundle.cpp.o
[3122/8273] Building NVVMOpsAttributes.h.inc...
[3123/8273] Building NVVMOpsEnums.cpp.inc...
[3124/8273] Building SPIRVSerialization.inc...
[3125/8273] Linking CXX shared library lib/libLLVMSPIRVDesc.so.22.0git
[3126/8273] Building NVVMOpsEnums.h.inc...
[3127/8273] Linking CXX shared library lib/libLLVMAsmParser.so.22.0git
[3128/8273] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOModule.cpp.o
[3129/8273] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
[3130/8273] Building CXX object lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/BitcodeWriter.cpp.o
[3131/8273] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOCodeGenerator.cpp.o
[3132/8273] Building X86GenRegisterInfo.inc...
[3133/8273] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/ThreadSafeModule.cpp.o
[3134/8273] Building CXX object lib/ToolDrivers/llvm-lib/CMakeFiles/LLVMLibDriver.dir/LibDriver.cpp.o
[3135/8273] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
[3136/8273] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOBackend.cpp.o
Step 7 (build cmake config) failure: build cmake config (failure)
...
[3108/8273] Creating library symlink lib/libLLVMMCDisassembler.so
[3109/8273] Linking CXX shared library lib/libLLVMSPIRVInfo.so.22.0git
[3110/8273] Building NVVMOps.h.inc...
[3111/8273] Creating library symlink lib/libLLVMMCA.so
[3112/8273] Linking CXX shared library lib/libLLVMDWARFCFIChecker.so.22.0git
[3113/8273] Creating library symlink lib/libLLVMSPIRVInfo.so
[3114/8273] Creating library symlink lib/libLLVMDWARFCFIChecker.so
[3115/8273] Linking CXX shared library lib/libLLVMFrontendHLSL.so.22.0git
[3116/8273] Linking CXX shared library lib/libLLVMCFGuard.so.22.0git
[3117/8273] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib && :
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
DTLTO.cpp:(.text._ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x12): undefined reference to `llvm::lto::InputFile::~InputFile()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x66): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x295): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x66): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x279): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::isThinArchive(llvm::StringRef) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO13isThinArchiveENS_9StringRefE+0x6fa): undefined reference to `llvm::identify_magic(llvm::StringRef)'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::removeTempFiles()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO15removeTempFilesEv+0x4e): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile> >) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0xaf): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x166): undefined reference to `llvm::lto::InputFile::getSingleBitcodeModule()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::saveInputArchiveMember(llvm::lto::InputFile*) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO22saveInputArchiveMemberEPNS0_9InputFileE+0x32): undefined reference to `llvm::lto::InputFile::getName() const'
collect2: error: ld returned 1 exit status
[3118/8273] Creating library symlink lib/libLLVMFrontendHLSL.so
[3119/8273] Creating library symlink lib/libLLVMCFGuard.so
[3120/8273] Building TosaOps.h.inc...
[3121/8273] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/OffloadBundle.cpp.o
[3122/8273] Building NVVMOpsAttributes.h.inc...
[3123/8273] Building NVVMOpsEnums.cpp.inc...
[3124/8273] Building SPIRVSerialization.inc...
[3125/8273] Linking CXX shared library lib/libLLVMSPIRVDesc.so.22.0git
[3126/8273] Building NVVMOpsEnums.h.inc...
[3127/8273] Linking CXX shared library lib/libLLVMAsmParser.so.22.0git
[3128/8273] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOModule.cpp.o
[3129/8273] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
[3130/8273] Building CXX object lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/BitcodeWriter.cpp.o
[3131/8273] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOCodeGenerator.cpp.o
[3132/8273] Building X86GenRegisterInfo.inc...
[3133/8273] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/ThreadSafeModule.cpp.o
[3134/8273] Building CXX object lib/ToolDrivers/llvm-lib/CMakeFiles/LLVMLibDriver.dir/LibDriver.cpp.o
[3135/8273] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
[3136/8273] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOBackend.cpp.o

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder openmp-offload-amdgpu-runtime-2 running on rocm-worker-hw-02 while building cross-project-tests,lld,llvm at step 5 "compile-openmp".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/19757

Here is the relevant piece of the build log for the reference
Step 5 (compile-openmp) failure: build (failure)
...
                 from /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/cmake/Modules/../../libc/src/stdio/printf_core/strerror_converter.h:15,
                 from /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/cmake/Modules/../../libc/src/stdio/printf_core/converter.h:15,
                 from /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/cmake/Modules/../../libc/src/__support/RPC/rpc_server.h:47,
                 from /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/cmake/Modules/../../libc/shared/rpc_server.h:13,
                 from /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/tools/llvm-gpu-loader/server.h:17,
                 from /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/tools/llvm-gpu-loader/amdhsa.cpp:17:
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/cmake/Modules/../../libc/src/stdio/printf_core/writer.h:49:30: warning: ‘maybe_unused’ attribute ignored [-Wattributes]
   49 |   [[maybe_unused]] WriteMode write_mode_;
      |                              ^~~~~~~~~~~
9.036 [968/64/3777] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib && :
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
DTLTO.cpp:(.text._ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x12): undefined reference to `llvm::lto::InputFile::~InputFile()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x66): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x295): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x66): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x279): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::isThinArchive(llvm::StringRef) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO13isThinArchiveENS_9StringRefE+0x6fa): undefined reference to `llvm::identify_magic(llvm::StringRef)'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::removeTempFiles()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO15removeTempFilesEv+0x4e): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile> >) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0xaf): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x166): undefined reference to `llvm::lto::InputFile::getSingleBitcodeModule()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::saveInputArchiveMember(llvm::lto::InputFile*) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO22saveInputArchiveMemberEPNS0_9InputFileE+0x32): undefined reference to `llvm::lto::InputFile::getName() const'
collect2: error: ld returned 1 exit status
9.037 [968/63/3778] Building CXX object tools/llvm-ifs/CMakeFiles/llvm-ifs.dir/llvm-ifs-driver.cpp.o
9.038 [968/62/3779] Building CXX object tools/llvm-exegesis/lib/X86/CMakeFiles/obj.LLVMExegesisX86.dir/Target.cpp.o
9.038 [968/61/3780] Building CXX object tools/llvm-itanium-demangle-fuzzer/CMakeFiles/llvm-itanium-demangle-fuzzer.dir/DummyDemanglerFuzzer.cpp.o
9.039 [968/60/3781] Building CXX object tools/llvm-ifs/CMakeFiles/llvm-ifs.dir/llvm-ifs.cpp.o
9.042 [968/59/3782] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/WebKit/RawPtrRefLocalVarsChecker.cpp.o
9.046 [968/58/3783] Linking CXX executable bin/llvm-cxxfilt
9.059 [968/57/3784] Linking CXX shared library lib/libLLVMDiff.so.22.0git
9.061 [968/56/3785] Linking CXX executable bin/llvm-dlang-demangle-fuzzer
9.071 [968/55/3786] Building CXX object tools/clang/tools/clang-installapi/CMakeFiles/clang-installapi.dir/Options.cpp.o
9.072 [968/54/3787] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/WebKit/RetainPtrCtorAdoptChecker.cpp.o
9.075 [968/53/3788] Building CXX object tools/clang/lib/StaticAnalyzer/Frontend/CMakeFiles/obj.clangStaticAnalyzerFrontend.dir/AnalysisConsumer.cpp.o
9.098 [968/52/3789] Building CXX object tools/clang/lib/StaticAnalyzer/Frontend/CMakeFiles/obj.clangStaticAnalyzerFrontend.dir/ModelInjector.cpp.o
9.112 [968/51/3790] Building CXX object tools/clang/lib/StaticAnalyzer/Frontend/CMakeFiles/obj.clangStaticAnalyzerFrontend.dir/FrontendActions.cpp.o
9.208 [968/50/3791] Building CXX object tools/clang/tools/clang-import-test/CMakeFiles/clang-import-test.dir/clang-import-test.cpp.o
9.220 [968/49/3792] Building CXX object tools/clang/tools/clang-fuzzer/handle-cxx/CMakeFiles/obj.clangHandleCXX.dir/handle_cxx.cpp.o
9.230 [968/48/3793] Building CXX object tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/CodeCompletion.cpp.o
9.243 [968/47/3794] Building CXX object tools/clang/tools/clang-diff/CMakeFiles/clang-diff.dir/ClangDiff.cpp.o
9.247 [968/46/3795] Building CXX object tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/IncrementalAction.cpp.o
In file included from /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/lib/Interpreter/IncrementalAction.cpp:9:

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder amdgpu-offload-rhel-9-cmake-build-only running on rocm-docker-rhel-9 while building cross-project-tests,lld,llvm at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/205/builds/31614

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[2912/8273] Building LLVMAttrInterfaces.cpp.inc...
[2913/8273] Building LLVMInterfaces.cpp.inc...
[2914/8273] Building LLVMInterfaces.h.inc...
[2915/8273] Building LLVMTypeInterfaces.cpp.inc...
[2916/8273] Creating library symlink lib/libLLVMFrontendHLSL.so
[2917/8273] Building LLVMTypeInterfaces.h.inc...
[2918/8273] Building NVGPU.h.inc...
[2919/8273] Building NVGPUDialect.cpp.inc...
[2920/8273] Building MPITypesGen.h.inc...
[2921/8273] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib && :
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
DTLTO.cpp:(.text._ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0xe): undefined reference to `llvm::lto::InputFile::~InputFile()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x4e): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x265): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x4e): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x259): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::isThinArchive(llvm::StringRef) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO13isThinArchiveENS_9StringRefE+0x6ba): undefined reference to `llvm::identify_magic(llvm::StringRef)'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::removeTempFiles()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO15removeTempFilesEv+0x36): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile> >) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x98): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x136): undefined reference to `llvm::lto::InputFile::getSingleBitcodeModule()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::saveInputArchiveMember(llvm::lto::InputFile*) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO22saveInputArchiveMemberEPNS0_9InputFileE+0x1b): undefined reference to `llvm::lto::InputFile::getName() const'
collect2: error: ld returned 1 exit status
[2922/8273] Building NVGPUDialect.h.inc...
[2923/8273] Building MPITypesGen.cpp.inc...
[2924/8273] Building NVGPUTypes.h.inc...
[2925/8273] Building NVGPUTypes.cpp.inc...
[2926/8273] Building NVGPUOps.cpp.inc...
[2927/8273] Linking CXX shared library lib/libLLVMMCParser.so.22.0git
[2928/8273] Building LLVMConversionEnumsFromLLVM.inc...
[2929/8273] Building LLVMConversionEnumsToLLVM.inc...
[2930/8273] Building LLVMOpFromLLVMIRConversions.inc...
[2931/8273] Building LLVMConversions.inc...
[2932/8273] Building CXX object lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/BitcodeWriter.cpp.o
[2933/8273] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOModule.cpp.o
[2934/8273] Building X86GenRegisterInfo.inc...
[2935/8273] Building CXX object tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[2936/8273] Building CXX object lib/ToolDrivers/llvm-lib/CMakeFiles/LLVMLibDriver.dir/LibDriver.cpp.o
[2937/8273] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/ThreadSafeModule.cpp.o
[2938/8273] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOCodeGenerator.cpp.o
[2939/8273] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
[2940/8273] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOBackend.cpp.o
Step 7 (build cmake config) failure: build cmake config (failure)
...
[2912/8273] Building LLVMAttrInterfaces.cpp.inc...
[2913/8273] Building LLVMInterfaces.cpp.inc...
[2914/8273] Building LLVMInterfaces.h.inc...
[2915/8273] Building LLVMTypeInterfaces.cpp.inc...
[2916/8273] Creating library symlink lib/libLLVMFrontendHLSL.so
[2917/8273] Building LLVMTypeInterfaces.h.inc...
[2918/8273] Building NVGPU.h.inc...
[2919/8273] Building NVGPUDialect.cpp.inc...
[2920/8273] Building MPITypesGen.h.inc...
[2921/8273] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib && :
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
DTLTO.cpp:(.text._ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0xe): undefined reference to `llvm::lto::InputFile::~InputFile()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x4e): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x265): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x4e): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x259): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::isThinArchive(llvm::StringRef) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO13isThinArchiveENS_9StringRefE+0x6ba): undefined reference to `llvm::identify_magic(llvm::StringRef)'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::removeTempFiles()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO15removeTempFilesEv+0x36): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile> >) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x98): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x136): undefined reference to `llvm::lto::InputFile::getSingleBitcodeModule()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::saveInputArchiveMember(llvm::lto::InputFile*) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO22saveInputArchiveMemberEPNS0_9InputFileE+0x1b): undefined reference to `llvm::lto::InputFile::getName() const'
collect2: error: ld returned 1 exit status
[2922/8273] Building NVGPUDialect.h.inc...
[2923/8273] Building MPITypesGen.cpp.inc...
[2924/8273] Building NVGPUTypes.h.inc...
[2925/8273] Building NVGPUTypes.cpp.inc...
[2926/8273] Building NVGPUOps.cpp.inc...
[2927/8273] Linking CXX shared library lib/libLLVMMCParser.so.22.0git
[2928/8273] Building LLVMConversionEnumsFromLLVM.inc...
[2929/8273] Building LLVMConversionEnumsToLLVM.inc...
[2930/8273] Building LLVMOpFromLLVMIRConversions.inc...
[2931/8273] Building LLVMConversions.inc...
[2932/8273] Building CXX object lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/BitcodeWriter.cpp.o
[2933/8273] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOModule.cpp.o
[2934/8273] Building X86GenRegisterInfo.inc...
[2935/8273] Building CXX object tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[2936/8273] Building CXX object lib/ToolDrivers/llvm-lib/CMakeFiles/LLVMLibDriver.dir/LibDriver.cpp.o
[2937/8273] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/ThreadSafeModule.cpp.o
[2938/8273] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOCodeGenerator.cpp.o
[2939/8273] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
[2940/8273] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOBackend.cpp.o

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder amdgpu-offload-rhel-8-cmake-build-only running on rocm-docker-rhel-8 while building cross-project-tests,lld,llvm at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/204/builds/31635

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[3039/8273] Building PDLInterpOpsDialect.cpp.inc...
[3040/8273] Building OpenMPOpsInterfaces.cpp.inc...
[3041/8273] Building OpenMPTypeInterfaces.cpp.inc...
[3042/8273] Building OpenMPOpsInterfaces.h.inc...
[3043/8273] Building OpenMPTypeInterfaces.h.inc...
[3044/8273] Building XeVMOpsDialect.cpp.inc...
[3045/8273] Building XeVMOpsDialect.h.inc...
[3046/8273] Building XeVMOpsTypes.cpp.inc...
[3047/8273] Building XeVMOpsAttributes.cpp.inc...
[3048/8273] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-array-bounds -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib && :
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
DTLTO.cpp:(.text._ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0xe): undefined reference to `llvm::lto::InputFile::~InputFile()'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::removeTempFiles() [clone .localalias.2]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO15removeTempFilesEv+0x36): undefined reference to `llvm::lto::InputFile::getName() const'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x1ec): undefined reference to `llvm::lto::LTO::~LTO()'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x1e2): undefined reference to `llvm::lto::LTO::~LTO()'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::isThinArchive(llvm::StringRef) [clone .localalias.3]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO13isThinArchiveENS_9StringRefE+0x6c2): undefined reference to `llvm::identify_magic(llvm::StringRef)'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile> >) [clone .localalias.4]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x9c): undefined reference to `llvm::lto::InputFile::getName() const'
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x147): undefined reference to `llvm::lto::InputFile::getSingleBitcodeModule()'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::saveInputArchiveMember(llvm::lto::InputFile*)':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO22saveInputArchiveMemberEPNS0_9InputFileE+0x10): undefined reference to `llvm::lto::InputFile::getName() const'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::saveInputArchiveMembers() [clone .localalias.0]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO23saveInputArchiveMembersEv+0x37): undefined reference to `llvm::lto::InputFile::getName() const'
collect2: error: ld returned 1 exit status
[3049/8273] Building XeVMOpsAttributes.h.inc...
[3050/8273] Building XeVMOps.cpp.inc...
[3051/8273] Building XeVMOps.h.inc...
[3052/8273] Building XeVMConversions.inc...
[3053/8273] Building XeVMOpsTypes.h.inc...
[3054/8273] Building XeVMOpsEnums.cpp.inc...
[3055/8273] Building PDLInterpOpsDialect.h.inc...
[3056/8273] Building PDLInterpOpsTypes.cpp.inc...
[3057/8273] Building XeVMOpsEnums.h.inc...
[3058/8273] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
[3059/8273] Building CXX object lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/BitcodeWriter.cpp.o
In file included from /usr/include/c++/8/cassert:44,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ProfileData/InstrProf.h:40,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ProfileData/DataAccessProf.h:25,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ProfileData/IndexedMemProfData.h:18,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ProfileData/MemProfRadixTree.h:17,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:66:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘llvm::ArrayRef<llvm::InstrProfValueSiteRecord> llvm::InstrProfRecord::getValueSitesForKind(uint32_t) const’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ProfileData/InstrProf.h:1027:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
Step 7 (build cmake config) failure: build cmake config (failure)
...
[3039/8273] Building PDLInterpOpsDialect.cpp.inc...
[3040/8273] Building OpenMPOpsInterfaces.cpp.inc...
[3041/8273] Building OpenMPTypeInterfaces.cpp.inc...
[3042/8273] Building OpenMPOpsInterfaces.h.inc...
[3043/8273] Building OpenMPTypeInterfaces.h.inc...
[3044/8273] Building XeVMOpsDialect.cpp.inc...
[3045/8273] Building XeVMOpsDialect.h.inc...
[3046/8273] Building XeVMOpsTypes.cpp.inc...
[3047/8273] Building XeVMOpsAttributes.cpp.inc...
[3048/8273] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-array-bounds -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib && :
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
DTLTO.cpp:(.text._ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0xe): undefined reference to `llvm::lto::InputFile::~InputFile()'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::removeTempFiles() [clone .localalias.2]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO15removeTempFilesEv+0x36): undefined reference to `llvm::lto::InputFile::getName() const'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x1ec): undefined reference to `llvm::lto::LTO::~LTO()'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x1e2): undefined reference to `llvm::lto::LTO::~LTO()'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::isThinArchive(llvm::StringRef) [clone .localalias.3]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO13isThinArchiveENS_9StringRefE+0x6c2): undefined reference to `llvm::identify_magic(llvm::StringRef)'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile> >) [clone .localalias.4]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x9c): undefined reference to `llvm::lto::InputFile::getName() const'
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x147): undefined reference to `llvm::lto::InputFile::getSingleBitcodeModule()'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::saveInputArchiveMember(llvm::lto::InputFile*)':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO22saveInputArchiveMemberEPNS0_9InputFileE+0x10): undefined reference to `llvm::lto::InputFile::getName() const'
lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: In function `llvm::lto::DTLTO::saveInputArchiveMembers() [clone .localalias.0]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO23saveInputArchiveMembersEv+0x37): undefined reference to `llvm::lto::InputFile::getName() const'
collect2: error: ld returned 1 exit status
[3049/8273] Building XeVMOpsAttributes.h.inc...
[3050/8273] Building XeVMOps.cpp.inc...
[3051/8273] Building XeVMOps.h.inc...
[3052/8273] Building XeVMConversions.inc...
[3053/8273] Building XeVMOpsTypes.h.inc...
[3054/8273] Building XeVMOpsEnums.cpp.inc...
[3055/8273] Building PDLInterpOpsDialect.h.inc...
[3056/8273] Building PDLInterpOpsTypes.cpp.inc...
[3057/8273] Building XeVMOpsEnums.h.inc...
[3058/8273] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
[3059/8273] Building CXX object lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/BitcodeWriter.cpp.o
In file included from /usr/include/c++/8/cassert:44,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ProfileData/InstrProf.h:40,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ProfileData/DataAccessProf.h:25,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ProfileData/IndexedMemProfData.h:18,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ProfileData/MemProfRadixTree.h:17,
                 from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:66:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘llvm::ArrayRef<llvm::InstrProfValueSiteRecord> llvm::InstrProfRecord::getValueSitesForKind(uint32_t) const’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/ProfileData/InstrProf.h:1027:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder bolt-aarch64-ubuntu-shared running on bolt-worker-aarch64 while building cross-project-tests,lld,llvm at step 6 "test-build-bolt-check-bolt".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/218/builds/1770

Here is the relevant piece of the build log for the reference
Step 6 (test-build-bolt-check-bolt) failure: test (failure)
...
8.508 [969/34/701] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/StackExhaustionHandler.cpp.o
8.515 [968/34/702] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/TargetID.cpp.o
8.528 [967/34/703] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/TargetInfo.cpp.o
8.691 [966/34/704] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/IdentifierTable.cpp.o
8.921 [965/34/705] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Targets.cpp.o
8.943 [964/34/706] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Targets/ARC.cpp.o
8.974 [963/34/707] Building CXX object lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o
9.019 [962/34/708] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/DiagnosticIDs.cpp.o
9.033 [961/34/709] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Targets/AVR.cpp.o
9.039 [960/34/710] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-dangling-reference -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics   -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/buildbot/workspace/bolt-aarch64-ubuntu-shared/build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/buildbot/workspace/bolt-aarch64-ubuntu-shared/build/lib && :
ld.lld: error: undefined symbol: llvm::lto::InputFile::~InputFile()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose())

ld.lld: error: undefined symbol: llvm::identify_magic(llvm::StringRef)
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::isThinArchive(llvm::StringRef) (.localalias))

ld.lld: error: undefined symbol: llvm::lto::InputFile::getName() const
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::removeTempFiles())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())
>>> referenced 2 more times

ld.lld: error: undefined symbol: llvm::lto::LTO::~LTO()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())

ld.lld: error: undefined symbol: llvm::lto::InputFile::getSingleBitcodeModule()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile>>) (.localalias))
collect2: error: ld returned 1 exit status
9.150 [960/33/711] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Targets/AArch64.cpp.o
9.318 [960/32/712] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Targets/ARM.cpp.o
9.327 [960/31/713] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Targets/BPF.cpp.o
9.757 [960/30/714] Building CXX object tools/lld/wasm/CMakeFiles/lldWasm.dir/MarkLive.cpp.o
10.015 [960/29/715] Building CXX object tools/lld/wasm/CMakeFiles/lldWasm.dir/OutputSegment.cpp.o
10.390 [960/28/716] Building CXX object tools/lld/wasm/CMakeFiles/lldWasm.dir/MapFile.cpp.o
10.443 [960/27/717] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOModule.cpp.o
10.472 [960/26/718] Building CXX object tools/lld/wasm/CMakeFiles/lldWasm.dir/OutputSections.cpp.o
10.495 [960/25/719] Building CXX object tools/lld/wasm/CMakeFiles/lldWasm.dir/InputChunks.cpp.o
10.501 [960/24/720] Building CXX object tools/lld/wasm/CMakeFiles/lldWasm.dir/Relocations.cpp.o

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder hip-third-party-libs-test running on ext_buildbot_hw_05-hip-docker while building cross-project-tests,lld,llvm at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/206/builds/11133

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/hip-tpl.py --jobs=32' (failure)
...
[6130/8273] Building CXX object tools/clang/lib/Serialization/CMakeFiles/obj.clangSerialization.dir/PCHContainerOperations.cpp.o
[6131/8273] Building CXX object tools/clang/lib/Serialization/CMakeFiles/obj.clangSerialization.dir/ModuleManager.cpp.o
[6132/8273] Linking CXX shared library lib/libMLIRAsyncTransforms.so.22.0git
[6133/8273] Linking CXX shared library lib/libMLIRSCFTransformOps.so.22.0git
[6134/8273] Creating library symlink lib/libMLIRAsyncTransforms.so
[6135/8273] Linking CXX shared library lib/libMLIRXeGPUTransforms.so.22.0git
[6136/8273] Linking CXX shared library lib/libMLIRTosaToLinalg.so.22.0git
[6137/8273] Creating library symlink lib/libMLIRSCFTransformOps.so
[6138/8273] Creating library symlink lib/libMLIRXeGPUTransforms.so
[6139/8273] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/hip-third-party-libs-test/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/hip-third-party-libs-test/build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/hip-third-party-libs-test/build/lib && :
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
DTLTO.cpp:(.text._ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x12): undefined reference to `llvm::lto::InputFile::~InputFile()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x66): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x295): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x66): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x279): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::isThinArchive(llvm::StringRef) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO13isThinArchiveENS_9StringRefE+0x6fa): undefined reference to `llvm::identify_magic(llvm::StringRef)'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::removeTempFiles()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO15removeTempFilesEv+0x4e): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile> >) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0xaf): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x166): undefined reference to `llvm::lto::InputFile::getSingleBitcodeModule()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::saveInputArchiveMember(llvm::lto::InputFile*) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO22saveInputArchiveMemberEPNS0_9InputFileE+0x32): undefined reference to `llvm::lto::InputFile::getName() const'
collect2: error: ld returned 1 exit status
[6140/8273] Creating library symlink lib/libMLIRTosaToLinalg.so
[6141/8273] Linking CXX shared library lib/libMLIRArmSMEToLLVM.so.22.0git
[6142/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/XCore.cpp.o
[6143/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/Types.cpp.o
[6144/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/PPCLinux.cpp.o
[6145/8273] Building CXX object tools/clang/lib/Options/CMakeFiles/obj.clangOptions.dir/OptionUtils.cpp.o
[6146/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/PPCFreeBSD.cpp.o
[6147/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/InterfaceStubs.cpp.o
[6148/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/XRayArgs.cpp.o
[6149/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/ZOS.cpp.o
[6150/8273] Linking CXX shared library lib/libMLIRCAPIAsync.so.22.0git
[6151/8273] Linking CXX shared library lib/libMLIRSPIRVTransforms.so.22.0git
[6152/8273] Linking CXX shared library lib/libMLIRUBToSPIRV.so.22.0git
[6153/8273] Linking CXX shared library lib/libMLIRControlFlowToSPIRV.so.22.0git
[6154/8273] Linking CXX shared library lib/libMLIRComplexToSPIRV.so.22.0git
[6155/8273] Linking CXX shared library lib/libMLIRMemRefToSPIRV.so.22.0git
[6156/8273] Linking CXX shared library lib/libMLIRTestConvertToSPIRV.so.22.0git
[6157/8273] Linking CXX shared library lib/libMLIRFuncToSPIRV.so.22.0git
[6158/8273] Linking CXX shared library lib/libMLIRXeGPUTransformOps.so.22.0git
Step 7 (build cmake config) failure: build cmake config (failure)
...
[6130/8273] Building CXX object tools/clang/lib/Serialization/CMakeFiles/obj.clangSerialization.dir/PCHContainerOperations.cpp.o
[6131/8273] Building CXX object tools/clang/lib/Serialization/CMakeFiles/obj.clangSerialization.dir/ModuleManager.cpp.o
[6132/8273] Linking CXX shared library lib/libMLIRAsyncTransforms.so.22.0git
[6133/8273] Linking CXX shared library lib/libMLIRSCFTransformOps.so.22.0git
[6134/8273] Creating library symlink lib/libMLIRAsyncTransforms.so
[6135/8273] Linking CXX shared library lib/libMLIRXeGPUTransforms.so.22.0git
[6136/8273] Linking CXX shared library lib/libMLIRTosaToLinalg.so.22.0git
[6137/8273] Creating library symlink lib/libMLIRSCFTransformOps.so
[6138/8273] Creating library symlink lib/libMLIRXeGPUTransforms.so
[6139/8273] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/hip-third-party-libs-test/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/hip-third-party-libs-test/build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/botworker/bbot/hip-third-party-libs-test/build/lib && :
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
DTLTO.cpp:(.text._ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x12): undefined reference to `llvm::lto::InputFile::~InputFile()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x66): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x295): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x66): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD0Ev[_ZN4llvm3lto5DTLTOD5Ev]+0x279): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::isThinArchive(llvm::StringRef) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO13isThinArchiveENS_9StringRefE+0x6fa): undefined reference to `llvm::identify_magic(llvm::StringRef)'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::removeTempFiles()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO15removeTempFilesEv+0x4e): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile> >) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0xaf): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x166): undefined reference to `llvm::lto::InputFile::getSingleBitcodeModule()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::saveInputArchiveMember(llvm::lto::InputFile*) [clone .localalias]':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO22saveInputArchiveMemberEPNS0_9InputFileE+0x32): undefined reference to `llvm::lto::InputFile::getName() const'
collect2: error: ld returned 1 exit status
[6140/8273] Creating library symlink lib/libMLIRTosaToLinalg.so
[6141/8273] Linking CXX shared library lib/libMLIRArmSMEToLLVM.so.22.0git
[6142/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/XCore.cpp.o
[6143/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/Types.cpp.o
[6144/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/PPCLinux.cpp.o
[6145/8273] Building CXX object tools/clang/lib/Options/CMakeFiles/obj.clangOptions.dir/OptionUtils.cpp.o
[6146/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/PPCFreeBSD.cpp.o
[6147/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/InterfaceStubs.cpp.o
[6148/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/XRayArgs.cpp.o
[6149/8273] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/ZOS.cpp.o
[6150/8273] Linking CXX shared library lib/libMLIRCAPIAsync.so.22.0git
[6151/8273] Linking CXX shared library lib/libMLIRSPIRVTransforms.so.22.0git
[6152/8273] Linking CXX shared library lib/libMLIRUBToSPIRV.so.22.0git
[6153/8273] Linking CXX shared library lib/libMLIRControlFlowToSPIRV.so.22.0git
[6154/8273] Linking CXX shared library lib/libMLIRComplexToSPIRV.so.22.0git
[6155/8273] Linking CXX shared library lib/libMLIRMemRefToSPIRV.so.22.0git
[6156/8273] Linking CXX shared library lib/libMLIRTestConvertToSPIRV.so.22.0git
[6157/8273] Linking CXX shared library lib/libMLIRFuncToSPIRV.so.22.0git
[6158/8273] Linking CXX shared library lib/libMLIRXeGPUTransformOps.so.22.0git

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder polly-x86_64-linux-shared-plugin running on polly-x86_64-gce2 while building cross-project-tests,lld,llvm at step 5 "build".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/118/builds/9939

Here is the relevant piece of the build log for the reference
Step 5 (build) failure: 'ninja' (failure)
...
[2067/4583] Building NVPTXGenSubtargetInfo.inc...
[2068/4583] Linking CXX shared library lib/libLLVMCore.so.22.0git
[2069/4583] Creating library symlink lib/libLLVMCore.so
[2070/4583] Linking CXX shared library lib/libLLVMDebugInfoDWARFLowLevel.so.22.0git
[2071/4583] Linking CXX shared library lib/libLLVMFrontendHLSL.so.22.0git
[2072/4583] Linking CXX shared library lib/libLLVMBitReader.so.22.0git
[2073/4583] Creating library symlink lib/libLLVMFrontendHLSL.so
[2074/4583] Creating library symlink lib/libLLVMBitReader.so
[2075/4583] Linking CXX shared library lib/libLLVMCFGuard.so.22.0git
[2076/4583] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-dangling-reference -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics   -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/worker/workers/polly-x86_64-gce2/polly-x86_64-linux-shared-plugin/llvm.obj/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/worker/workers/polly-x86_64-gce2/polly-x86_64-linux-shared-plugin/llvm.obj/lib && :
ld.lld: error: undefined symbol: llvm::lto::InputFile::~InputFile()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose())

ld.lld: error: undefined symbol: llvm::identify_magic(llvm::StringRef)
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::isThinArchive(llvm::StringRef) (.localalias))

ld.lld: error: undefined symbol: llvm::lto::InputFile::getName() const
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::removeTempFiles())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())
>>> referenced 2 more times

ld.lld: error: undefined symbol: llvm::lto::LTO::~LTO()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())

ld.lld: error: undefined symbol: llvm::lto::InputFile::getSingleBitcodeModule()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile>>) (.localalias))
collect2: error: ld returned 1 exit status
[2077/4583] Creating library symlink lib/libLLVMCFGuard.so
ninja: build stopped: subcommand failed.
Cache directory:              /home/worker/.cache/ccache
Config file:                  /home/worker/.config/ccache/ccache.conf
System config file:           /etc/ccache.conf
Stats updated:                Wed Dec 31 08:49:05 2025
Cacheable calls:               1954 / 1955 (99.95%)
  Hits:                        1922 / 1954 (98.36%)
    Direct:                    1922 / 1922 (100.0%)
    Preprocessed:                 0 / 1922 ( 0.00%)

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder polly-x86_64-linux-shared running on polly-x86_64-gce2 while building cross-project-tests,lld,llvm at step 5 "build".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/97/builds/10219

Here is the relevant piece of the build log for the reference
Step 5 (build) failure: 'ninja' (failure)
...
[2066/4583] Linking CXX shared library lib/libLLVMCore.so.22.0git
[2067/4583] Linking CXX shared library lib/libLLVMDebugInfoDWARFLowLevel.so.22.0git
[2068/4583] Creating library symlink lib/libLLVMCore.so
[2069/4583] Creating library symlink lib/libLLVMDebugInfoDWARFLowLevel.so
[2070/4583] Linking CXX shared library lib/libLLVMFrontendHLSL.so.22.0git
[2071/4583] Linking CXX shared library lib/libLLVMBitReader.so.22.0git
[2072/4583] Creating library symlink lib/libLLVMFrontendHLSL.so
[2073/4583] Creating library symlink lib/libLLVMBitReader.so
[2074/4583] Linking CXX shared library lib/libLLVMCFGuard.so.22.0git
[2075/4583] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-dangling-reference -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics   -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/worker/workers/polly-x86_64-gce2/polly-x86_64-linux-shared/llvm.obj/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/worker/workers/polly-x86_64-gce2/polly-x86_64-linux-shared/llvm.obj/lib && :
ld.lld: error: undefined symbol: llvm::lto::InputFile::~InputFile()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose())

ld.lld: error: undefined symbol: llvm::identify_magic(llvm::StringRef)
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::isThinArchive(llvm::StringRef) (.localalias))

ld.lld: error: undefined symbol: llvm::lto::InputFile::getName() const
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::removeTempFiles())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())
>>> referenced 2 more times

ld.lld: error: undefined symbol: llvm::lto::LTO::~LTO()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())

ld.lld: error: undefined symbol: llvm::lto::InputFile::getSingleBitcodeModule()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile>>) (.localalias))
collect2: error: ld returned 1 exit status
[2076/4583] Creating library symlink lib/libLLVMCFGuard.so
ninja: build stopped: subcommand failed.
Cache directory:              /home/worker/.cache/ccache
Config file:                  /home/worker/.config/ccache/ccache.conf
System config file:           /etc/ccache.conf
Stats updated:                Wed Dec 31 09:02:27 2025
Cacheable calls:               1954 / 1955 (99.95%)
  Hits:                        1953 / 1954 (99.95%)
    Direct:                    1953 / 1953 (100.0%)
    Preprocessed:                 0 / 1953 ( 0.00%)

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder flang-aarch64-sharedlibs running on linaro-flang-aarch64-sharedlibs while building cross-project-tests,lld,llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/80/builds/19131

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
51.176 [2185/243/5642] Building CXX object tools/mlir/lib/Dialect/Async/Transforms/CMakeFiles/obj.MLIRAsyncTransforms.dir/AsyncRuntimeRefCountingOpt.cpp.o
51.177 [2185/242/5643] Building CXX object tools/mlir/lib/Dialect/Async/Transforms/CMakeFiles/obj.MLIRAsyncTransforms.dir/AsyncToAsyncRuntime.cpp.o
51.207 [2168/258/5644] Building CXX object tools/mlir/lib/Dialect/Async/Transforms/CMakeFiles/obj.MLIRAsyncTransforms.dir/PassDetail.cpp.o
51.211 [2167/258/5645] Building CXX object tools/mlir/lib/Dialect/Bufferization/IR/CMakeFiles/obj.MLIRBufferizationDialect.dir/AllocationOpInterface.cpp.o
51.214 [2166/258/5646] Building CXX object tools/mlir/lib/Dialect/Bufferization/IR/CMakeFiles/obj.MLIRBufferizationDialect.dir/BufferizableOpInterface.cpp.o
51.217 [2165/258/5647] Building CXX object tools/mlir/lib/Dialect/Bufferization/IR/CMakeFiles/obj.MLIRBufferizationDialect.dir/BufferizationDialect.cpp.o
51.220 [2164/258/5648] Building CXX object tools/mlir/lib/Dialect/Bufferization/IR/CMakeFiles/obj.MLIRBufferizationDialect.dir/BufferViewFlowOpInterface.cpp.o
51.225 [2163/258/5649] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/FunctionImport.cpp.o
51.228 [2162/258/5650] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOBackend.cpp.o
51.230 [2161/258/5651] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/local/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/lib && :
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::isThinArchive(llvm::StringRef)':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO13isThinArchiveENS_9StringRefE+0x488): undefined reference to `llvm::identify_magic(llvm::StringRef)'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::removeTempFiles()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO15removeTempFilesEv+0x48): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile> >)':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0x8c): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO8addInputESt10unique_ptrINS0_9InputFileESt14default_deleteIS3_EE+0xc4): undefined reference to `llvm::lto::InputFile::getSingleBitcodeModule()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::saveInputArchiveMember(llvm::lto::InputFile*)':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTO22saveInputArchiveMemberEPNS0_9InputFileE+0x28): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `llvm::lto::DTLTO::~DTLTO()':
DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD2Ev]+0x60): undefined reference to `llvm::lto::InputFile::getName() const'
/usr/bin/ld: DTLTO.cpp:(.text._ZN4llvm3lto5DTLTOD2Ev[_ZN4llvm3lto5DTLTOD2Ev]+0x1b4): undefined reference to `llvm::lto::LTO::~LTO()'
/usr/bin/ld: lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o: in function `std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
DTLTO.cpp:(.text._ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN4llvm3lto9InputFileELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x18): undefined reference to `llvm::lto::InputFile::~InputFile()'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
51.232 [2161/257/5652] Building CXX object tools/mlir/lib/Dialect/Async/Transforms/CMakeFiles/obj.MLIRAsyncTransforms.dir/AsyncParallelFor.cpp.o
51.233 [2161/256/5653] Building CXX object tools/mlir/lib/Dialect/Bufferization/IR/CMakeFiles/obj.MLIRBufferizationDialect.dir/BufferDeallocationOpInterface.cpp.o
51.234 [2161/255/5654] Building CXX object tools/mlir/lib/Dialect/Bufferization/IR/CMakeFiles/obj.MLIRBufferizationDialect.dir/BufferizationOps.cpp.o
51.235 [2161/254/5655] Building CXX object tools/mlir/lib/Dialect/Bufferization/IR/CMakeFiles/obj.MLIRBufferizationDialect.dir/UnstructuredControlFlow.cpp.o
51.235 [2161/253/5656] Building CXX object tools/mlir/lib/Dialect/Bufferization/IR/CMakeFiles/obj.MLIRBufferizationDialect.dir/BufferizationTypeInterfaces.cpp.o
51.236 [2161/252/5657] Building CXX object tools/mlir/lib/Dialect/Bufferization/Pipelines/CMakeFiles/obj.MLIRBufferizationPipelines.dir/BufferizationPipelines.cpp.o
51.237 [2161/251/5658] Building CXX object tools/mlir/lib/Dialect/Bufferization/TransformOps/CMakeFiles/obj.MLIRBufferizationTransformOps.dir/BufferizationTransformOps.cpp.o
51.238 [2161/250/5659] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/Bufferize.cpp.o
51.240 [2161/249/5660] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferDeallocationSimplification.cpp.o
51.241 [2161/248/5661] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferOptimizations.cpp.o
51.242 [2161/247/5662] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferResultsToOutParams.cpp.o
51.242 [2161/246/5663] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferUtils.cpp.o
51.243 [2161/245/5664] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o
51.244 [2161/244/5665] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/DropEquivalentBufferResults.cpp.o
51.245 [2161/243/5666] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/EmptyTensorElimination.cpp.o
51.246 [2161/242/5667] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/EmptyTensorToAllocTensor.cpp.o
51.247 [2161/241/5668] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/FuncBufferizableOpInterfaceImpl.cpp.o
51.247 [2161/240/5669] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/LowerDeallocations.cpp.o
51.248 [2161/239/5670] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/OneShotAnalysis.cpp.o
51.249 [2161/238/5671] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/OneShotModuleBufferize.cpp.o
51.250 [2161/237/5672] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/OwnershipBasedBufferDeallocation.cpp.o
51.251 [2161/236/5673] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/TensorCopyInsertion.cpp.o

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder clang-m68k-linux-cross running on suse-gary-m68k-cross while building cross-project-tests,lld,llvm at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/20869

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[123/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/support/ThreadingTests.cpp.o
[124/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ReplayPeambleTests.cpp.o
[125/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/StdLibTests.cpp.o
[126/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/support/MarkupTests.cpp.o
[127/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SourceCodeTests.cpp.o
[128/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/PreambleTests.cpp.o
[129/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/support/TraceTests.cpp.o
[130/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/RenameTests.cpp.o
[131/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ParsedASTTests.cpp.o
[132/1251] Building CXX object tools/clang/tools/extra/include-cleaner/unittests/CMakeFiles/ClangIncludeCleanerTests.dir/FindHeadersTest.cpp.o
FAILED: tools/clang/tools/extra/include-cleaner/unittests/CMakeFiles/ClangIncludeCleanerTests.dir/FindHeadersTest.cpp.o 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/include-cleaner/unittests -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/include-cleaner/unittests -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/include-cleaner/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/include-cleaner/unittests/../lib -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-dangling-reference -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG -std=c++17 -UNDEBUG -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -Wno-suggest-override -MD -MT tools/clang/tools/extra/include-cleaner/unittests/CMakeFiles/ClangIncludeCleanerTests.dir/FindHeadersTest.cpp.o -MF tools/clang/tools/extra/include-cleaner/unittests/CMakeFiles/ClangIncludeCleanerTests.dir/FindHeadersTest.cpp.o.d -o tools/clang/tools/extra/include-cleaner/unittests/CMakeFiles/ClangIncludeCleanerTests.dir/FindHeadersTest.cpp.o -c /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/include-cleaner/unittests/FindHeadersTest.cpp
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
[133/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/AnnotateHighlightingsTests.cpp.o
[134/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/RemoveUsingNamespaceTests.cpp.o
[135/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/TypeHierarchyTests.cpp.o
[136/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/OverridePureVirtualsTests.cpp.o
[137/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/TestWorkspace.cpp.o
[138/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DefineInlineTests.cpp.o
[139/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/PrintASTTests.cpp.o
[140/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/MemberwiseConstructorTests.cpp.o
[141/1251] Building CXX object tools/clang/tools/extra/unittests/clang-tidy/CMakeFiles/ClangTidyTests.dir/OverlappingReplacementsTest.cpp.o
[142/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DumpASTTests.cpp.o
[143/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SymbolCollectorTests.cpp.o
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp: In member function ‘virtual void clang::clangd::{anonymous}::SymbolCollectorTest_SpelledReferences_Test::TestBody()’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp:1148:8: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
 1148 |     if (!SpelledRanges.empty())
      |        ^
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp:1151:8: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
 1151 |     if (!ImplicitRanges.empty())
      |        ^
[144/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DumpSymbolTests.cpp.o
[145/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DiagnosticsTests.cpp.o
[146/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ExtractFunctionTests.cpp.o
[147/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ExtractVariableTests.cpp.o
[148/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/PopulateSwitchTests.cpp.o
[149/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ObjCLocalizeStringLiteralTests.cpp.o
[150/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DumpRecordLayoutTests.cpp.o
[151/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ExpandDeducedTypeTests.cpp.o
[152/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DefineOutlineTests.cpp.o
[153/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ObjCMemberwiseInitializerTests.cpp.o
[154/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ExpandMacroTests.cpp.o
[155/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/SpecialMembersTests.cpp.o
[156/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/SwapBinaryOperandsTests.cpp.o
[157/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/AddUsingTests.cpp.o
[158/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/RawStringLiteralTests.cpp.o
[159/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ShowSelectionTreeTests.cpp.o
[160/1251] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ScopifyEnumTests.cpp.o

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder clang-ppc64le-rhel running on ppc64le-clang-rhel-test while building cross-project-tests,lld,llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/11820

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
68.177 [1287/48/5427] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86TargetTransformInfo.cpp.o
68.185 [1287/47/5428] Creating library symlink lib/libLLVMX86Desc.so
68.259 [1285/48/5429] Linking CXX shared library lib/libLLVMX86AsmParser.so.22.0git
68.261 [1284/48/5430] Linking CXX shared library lib/libLLVMX86TargetMCA.so.22.0git
68.272 [1283/48/5431] Creating library symlink lib/libLLVMX86TargetMCA.so
68.272 [1283/47/5432] Creating library symlink lib/libLLVMX86AsmParser.so
68.427 [1283/46/5433] Building CXX object tools/llvm-sim/CMakeFiles/llvm-sim.dir/llvm-sim.cpp.o
69.361 [1283/45/5434] Building CXX object lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o
69.385 [1282/45/5435] Building CXX object tools/llvm-dis/CMakeFiles/llvm-dis.dir/llvm-dis.cpp.o
69.434 [1282/44/5436] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: [code=1] lib/libLLVMDTLTO.so.22.0git 
: && /home/buildbots/llvm-external-buildbots/clang.20.1.8/bin/clang++ --gcc-toolchain=/gcc-toolchain/usr -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -Wl,--color-diagnostics  -Wl,--gc-sections  -Xlinker --dependency-file=lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/link.d -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib && :
ld.lld: error: undefined symbol: llvm::identify_magic(llvm::StringRef)
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::isThinArchive(llvm::StringRef))

ld.lld: error: undefined symbol: llvm::lto::InputFile::getName() const
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::removeTempFiles())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile>>))
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::saveInputArchiveMember(llvm::lto::InputFile*))
>>> referenced 1 more times

ld.lld: error: undefined symbol: llvm::lto::InputFile::getSingleBitcodeModule()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile>>))

ld.lld: error: undefined symbol: llvm::lto::LTO::~LTO()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())

ld.lld: error: undefined symbol: llvm::lto::InputFile::~InputFile()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose())
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
69.712 [1282/43/5437] Building CXX object tools/llvm-link/CMakeFiles/llvm-link.dir/llvm-link.cpp.o
70.838 [1282/42/5438] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/FunctionImport.cpp.o
72.640 [1282/41/5439] Building CXX object tools/llvm-extract/CMakeFiles/llvm-extract.dir/llvm-extract.cpp.o
73.647 [1282/40/5440] Building CXX object lib/FuzzMutate/CMakeFiles/LLVMFuzzMutate.dir/IRMutator.cpp.o
73.941 [1282/39/5441] Building AArch64GenSubtargetInfo.inc...
74.222 [1282/38/5442] Building RISCVGenInstrInfo.inc...
74.773 [1282/37/5443] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOModule.cpp.o
74.873 [1282/36/5444] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOCodeGenerator.cpp.o
75.511 [1282/35/5445] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/MachineOutliner.cpp.o
75.966 [1282/34/5446] Building CXX object tools/clang/tools/clang-fuzzer/handle-llvm/CMakeFiles/obj.clangHandleLLVM.dir/handle_llvm.cpp.o
76.089 [1282/33/5447] Building AArch64GenInstrInfo.inc...
77.821 [1282/32/5448] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOBackend.cpp.o

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder flang-aarch64-latest-gcc running on linaro-flang-aarch64-latest-gcc while building cross-project-tests,lld,llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/130/builds/16979

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)

@jplehr

jplehr commented Dec 31, 2025

Copy link
Copy Markdown
Contributor

Hi, is someone working on a fix or can we revert in the meantime?

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder bolt-x86_64-ubuntu-shared running on bolt-worker while building cross-project-tests,lld,llvm at step 6 "test-build-bolt-check-bolt".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/151/builds/7936

Here is the relevant piece of the build log for the reference
Step 6 (test-build-bolt-check-bolt) failure: test (failure)
...
11.143 [1490/18/196] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO.dir/SymbolTable.cpp.o
11.172 [1489/18/197] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO.dir/Symbols.cpp.o
11.206 [1488/18/198] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO.dir/SyntheticSections.cpp.o
11.233 [1487/18/199] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO.dir/Target.cpp.o
11.263 [1486/18/200] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO.dir/UnwindInfoSection.cpp.o
11.293 [1485/18/201] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO.dir/Writer.cpp.o
11.325 [1484/18/202] Building CXX object tools/lld/tools/lld/CMakeFiles/lld.dir/lld.cpp.o
11.347 [1483/18/203] Building CXX object tools/lld/tools/lld/CMakeFiles/lld.dir/lld-driver.cpp.o
11.780 [1482/18/204] Building CXX object lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o
11.870 [1481/18/205] Linking CXX shared library lib/libLLVMDTLTO.so.22.0git
FAILED: lib/libLLVMDTLTO.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics   -Wl,--gc-sections -shared -Wl,-soname,libLLVMDTLTO.so.22.0git -o lib/libLLVMDTLTO.so.22.0git lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/worker/bolt-worker2/bolt-x86_64-ubuntu-shared/build/lib:"  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/worker/bolt-worker2/bolt-x86_64-ubuntu-shared/build/lib && :
ld.lld: error: undefined symbol: llvm::lto::InputFile::~InputFile()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(std::_Sp_counted_ptr<llvm::lto::InputFile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose())

ld.lld: error: undefined symbol: llvm::lto::InputFile::getName() const
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::removeTempFiles())
>>> referenced 2 more times

ld.lld: error: undefined symbol: llvm::lto::LTO::~LTO()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::~DTLTO())

ld.lld: error: undefined symbol: llvm::identify_magic(llvm::StringRef)
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::isThinArchive(llvm::StringRef) (.localalias))

ld.lld: error: undefined symbol: llvm::lto::InputFile::getSingleBitcodeModule()
>>> referenced by DTLTO.cpp
>>>               lib/DTLTO/CMakeFiles/LLVMDTLTO.dir/DTLTO.cpp.o:(llvm::lto::DTLTO::addInput(std::unique_ptr<llvm::lto::InputFile, std::default_delete<llvm::lto::InputFile>>) (.localalias))
collect2: error: ld returned 1 exit status
12.877 [1481/17/206] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOModule.cpp.o
13.524 [1481/16/207] Building CXX object tools/lld/COFF/CMakeFiles/lldCOFF.dir/LTO.cpp.o
13.719 [1481/15/208] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOCodeGenerator.cpp.o
14.385 [1481/14/209] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO.dir/DriverUtils.cpp.o
14.999 [1481/13/210] Building CXX object tools/lld/ELF/CMakeFiles/lldELF.dir/LTO.cpp.o
15.251 [1481/12/211] Building CXX object tools/lld/COFF/CMakeFiles/lldCOFF.dir/SymbolTable.cpp.o
15.890 [1481/11/212] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOBackend.cpp.o
16.177 [1481/10/213] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO.dir/LTO.cpp.o
16.610 [1481/9/214] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/ThinLTOCodeGenerator.cpp.o
17.827 [1481/8/215] Building CXX object tools/lld/COFF/CMakeFiles/lldCOFF.dir/InputFiles.cpp.o

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder reverse-iteration running on hexagon-build-03 while building cross-project-tests,lld,llvm at step 6 "check_all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/110/builds/7061

Here is the relevant piece of the build log for the reference
Step 6 (check_all) failure: test (failure)
******************** TEST 'Clang :: Interpreter/cxx20-modules.cppm' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 3
rm -rf /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp
# executed command: rm -rf /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp
# RUN: at line 4
mkdir -p /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp
# executed command: mkdir -p /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp
# RUN: at line 5
split-file /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/clang/test/Interpreter/cxx20-modules.cppm /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp
# executed command: split-file /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/clang/test/Interpreter/cxx20-modules.cppm /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp
# RUN: at line 7
/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang -std=c++20 /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.cppm --precompile      -o /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.pcm --target=x86_64-linux-gnu
# executed command: /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang -std=c++20 /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.cppm --precompile -o /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.pcm --target=x86_64-linux-gnu
# RUN: at line 9
/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang -fPIC /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.pcm -c -o /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.o --target=x86_64-linux-gnu
# executed command: /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang -fPIC /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.pcm -c -o /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.o --target=x86_64-linux-gnu
# RUN: at line 10
/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang -nostdlib -fPIC -shared /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.o -o /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/libmod.so --target=x86_64-linux-gnu
# executed command: /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang -nostdlib -fPIC -shared /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.o -o /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/libmod.so --target=x86_64-linux-gnu
# RUN: at line 12
cat /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/import.cpp | env LD_LIBRARY_PATH=/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp:$LD_LIBRARY_PATH      /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang-repl -Xcc=-std=c++20 -Xcc=-fmodule-file=M=/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.pcm      -Xcc=--target=x86_64-linux-gnu | /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/FileCheck /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/import.cpp
# executed command: cat /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/import.cpp
# .---command stdout------------
# | 
# | %lib libmod.so
# | 
# | import M;
# | 
# | extern "C" int printf(const char *, ...);
# | printf("%s\n", Hello());
# | 
# | // CHECK: Hello Interpreter for Modules!
# `-----------------------------
# executed command: env 'LD_LIBRARY_PATH=/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp:$LD_LIBRARY_PATH' /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang-repl -Xcc=-std=c++20 -Xcc=-fmodule-file=M=/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.pcm -Xcc=--target=x86_64-linux-gnu
# .---command stderr------------
# | /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang-repl: error while loading shared libraries: libc++.so.1: cannot open shared object file: No such file or directory
# `-----------------------------
# error: command failed with exit status: 127
# executed command: /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/FileCheck /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/import.cpp
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/FileCheck /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/import.cpp
# `-----------------------------
# error: command failed with exit status: 2

--
...

@llvm-ci

llvm-ci commented Dec 31, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder clang-armv7-global-isel running on linaro-clang-armv7-global-isel while building cross-project-tests,lld,llvm at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/39/builds/9377

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'LLVM :: CodeGen/X86/basic-block-sections-clusters-bb-hash.ll' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 11
/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/llc /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/llvm/test/CodeGen/X86/basic-block-sections-clusters-bb-hash.ll -O0 -mtriple=x86_64-pc-linux -function-sections -filetype=obj -basic-block-address-map -emit-bb-hash -o /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/test/CodeGen/X86/Output/basic-block-sections-clusters-bb-hash.ll.tmp.o
# executed command: /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/llc /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/llvm/test/CodeGen/X86/basic-block-sections-clusters-bb-hash.ll -O0 -mtriple=x86_64-pc-linux -function-sections -filetype=obj -basic-block-address-map -emit-bb-hash -o /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/test/CodeGen/X86/Output/basic-block-sections-clusters-bb-hash.ll.tmp.o
# RUN: at line 16
echo 'v1' > /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/test/CodeGen/X86/Output/basic-block-sections-clusters-bb-hash.ll.tmp1
# executed command: echo v1
# RUN: at line 17
echo 'f foo' >> /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/test/CodeGen/X86/Output/basic-block-sections-clusters-bb-hash.ll.tmp1
# executed command: echo 'f foo'
# RUN: at line 18
echo 'g 0:100,1:100,2:0 1:100,3:100 2:0,3:0 3:100' >> /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/test/CodeGen/X86/Output/basic-block-sections-clusters-bb-hash.ll.tmp1
# executed command: echo 'g 0:100,1:100,2:0 1:100,3:100 2:0,3:0 3:100'
# RUN: at line 22
/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/llvm-readobj /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/test/CodeGen/X86/Output/basic-block-sections-clusters-bb-hash.ll.tmp.o --bb-addr-map |  awk 'BEGIN {printf "h"}      /ID: [0-9]+/ {id=$2}      /Hash: 0x[0-9A-Fa-f]+/ {gsub(/^0x/, "", $2); hash=$2; printf " %s:%s", id, hash}      END {print ""}'  >> /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/test/CodeGen/X86/Output/basic-block-sections-clusters-bb-hash.ll.tmp1
# executed command: /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/llvm-readobj /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/test/CodeGen/X86/Output/basic-block-sections-clusters-bb-hash.ll.tmp.o --bb-addr-map
# executed command: awk 'BEGIN {printf "h"}      /ID: [0-9]+/ {id=$2}      /Hash: 0x[0-9A-Fa-f]+/ {gsub(/^0x/, "", $2); hash=$2; printf " %s:%s", id, hash}      END {print ""}'
# RUN: at line 29
/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/llc < /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/llvm/test/CodeGen/X86/basic-block-sections-clusters-bb-hash.ll -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/test/CodeGen/X86/Output/basic-block-sections-clusters-bb-hash.ll.tmp1 -basic-block-section-match-infer |  /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/llvm/test/CodeGen/X86/basic-block-sections-clusters-bb-hash.ll -check-prefixes=CHECK,LINUX-SECTIONS1
# executed command: /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/llc -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/test/CodeGen/X86/Output/basic-block-sections-clusters-bb-hash.ll.tmp1 -basic-block-section-match-infer
# executed command: /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/llvm/test/CodeGen/X86/basic-block-sections-clusters-bb-hash.ll -check-prefixes=CHECK,LINUX-SECTIONS1
# .---command stderr------------
# | /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/llvm/test/CodeGen/X86/basic-block-sections-clusters-bb-hash.ll:80:26: error: LINUX-SECTIONS1-LABEL: expected string not found in input
# | ; LINUX-SECTIONS1-LABEL: # %bb.1:
# |                          ^
# | <stdin>:6:5: note: scanning from here
# | foo: # @foo
# |     ^
# | <stdin>:7:1: note: possible intended match here
# | # %bb.0:
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/llvm/test/CodeGen/X86/basic-block-sections-clusters-bb-hash.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1:  .file "<stdin>" 
# |             2:  .section .text.foo,"ax",@progbits 
# |             3:  .globl foo # -- Begin function foo 
# |             4:  .p2align 4 
# |             5:  .type foo,@function 
# |             6: foo: # @foo 
# | label:80'0         X~~~~~~~ error: no match found
...

mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Jan 6, 2026
This patch implements support for handling archive members in DTLTO.
 
Unlike ThinLTO, where archive members are passed as in-memory buffers,
DTLTO requires archive members to be materialized as individual files on
the filesystem.
This is necessary because DTLTO invokes clang externally, which expects
file-based inputs.
To support this, this implementation identifies archive members among
the input files,
saves them to the filesystem, and updates their module_id to match their
file paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lld:COFF lld:ELF lld LTO Link time optimization (regular/full LTO or ThinLTO) platform:windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants