Skip to content

Conversation

bd1976bris
Copy link
Collaborator

@bd1976bris bd1976bris commented Jul 17, 2025

This patch adds support for bitcode members of thin archives to DTLTO (https://llvm.org/docs/DTLTO.html) in ELF LLD.

For DTLTO, bitcode identifiers must be valid paths to bitcode files on disk. Clang does not support archive inputs for ThinLTO backend compilations. This patch adjusts the identifier for bitcode members of thin archives in DTLTO links so that it is the path to the member file on disk, allowing such members to be supported in DTLTO.

This patch is sufficient to allow for self-hosting an LLVM build with DTLTO when thin archives are used.

Note: Bitcode members of non-thin archives remain unsupported. This will be addressed in a future change.

Testing:

  • LLD lit test coverage has been added to check that the identifier is adjusted appropriately.
  • A cross-project lit test has been added to show that a DTLTO link can succeed when linking bitcode members of thin archives.

For the design discussion of the DTLTO feature, see: #126654.

==================

Reviewer notes:

This patch adds support for bitcode members of thin archives to
DTLTO (https://llvm.org/docs/DTLTO.html) in ELF LLD.

For DTLTO, bitcode identifiers must be valid paths to bitcode files
on disk. Clang does not support archive inputs for ThinLTO backend
compilations. This patch adjusts the identifier for bitcode members
of thin archives in DTLTO links so that it is the path to the member
file on disk, allowing such members to be supported in DTLTO.

This patch is sufficient to allow for self-hosting an LLVM build
with DTLTO when thin archives are used.

Note: Bitcode members of non-thin archives remain unsupported. This
will be addressed in a future change.

Testing:

- LLD lit test coverage has been added to check that the identifier
  is adjusted appropriately.
- A cross-project lit test has been added to show that a DTLTO link
  can succeed when linking bitcode members of thin archives.

For the design discussion of the DTLTO feature, see: llvm#126654.
@llvmbot
Copy link
Member

llvmbot commented Jul 17, 2025

@llvm/pr-subscribers-lld-elf

@llvm/pr-subscribers-lld

Author: bd1976bris (bd1976bris)

Changes

This patch adds support for bitcode members of thin archives to DTLTO (https://llvm.org/docs/DTLTO.html) in ELF LLD.

For DTLTO, bitcode identifiers must be valid paths to bitcode files on disk. Clang does not support archive inputs for ThinLTO backend compilations. This patch adjusts the identifier for bitcode members of thin archives in DTLTO links so that it is the path to the member file on disk, allowing such members to be supported in DTLTO.

This patch is sufficient to allow for self-hosting an LLVM build with DTLTO when thin archives are used.

Note: Bitcode members of non-thin archives remain unsupported. This will be addressed in a future change.

Testing:

  • LLD lit test coverage has been added to check that the identifier is adjusted appropriately.
  • A cross-project lit test has been added to show that a DTLTO link can succeed when linking bitcode members of thin archives.

For the design discussion of the DTLTO feature, see: #126654.

==================

Reviewer notes:

  • The code in this patch is unchanged from what was reviewed in the design review (#126654).

Full diff: https://github.com/llvm/llvm-project/pull/149425.diff

5 Files Affected:

  • (modified) cross-project-tests/CMakeLists.txt (+3-2)
  • (added) cross-project-tests/dtlto/ld-archive-thin.test (+97)
  • (modified) cross-project-tests/lit.cfg.py (+3-1)
  • (modified) lld/ELF/InputFiles.cpp (+38-4)
  • (added) lld/test/ELF/dtlto/archive-thin.test (+66)
diff --git a/cross-project-tests/CMakeLists.txt b/cross-project-tests/CMakeLists.txt
index b4b1f47626073..192db87043177 100644
--- a/cross-project-tests/CMakeLists.txt
+++ b/cross-project-tests/CMakeLists.txt
@@ -19,11 +19,12 @@ set(CROSS_PROJECT_TEST_DEPS
   FileCheck
   check-gdb-llvm-support
   count
-  llvm-dwarfdump
+  llvm-ar
   llvm-config
+  llvm-dwarfdump
   llvm-objdump
-  split-file
   not
+  split-file
   )
 
 if ("clang" IN_LIST LLVM_ENABLE_PROJECTS)
diff --git a/cross-project-tests/dtlto/ld-archive-thin.test b/cross-project-tests/dtlto/ld-archive-thin.test
new file mode 100644
index 0000000000000..979da5423962e
--- /dev/null
+++ b/cross-project-tests/dtlto/ld-archive-thin.test
@@ -0,0 +1,97 @@
+REQUIRES: ld.lld,llvm-ar
+
+## Test that a DTLTO link succeeds and outputs the expected set of files
+## correctly when thin archives are present.
+
+RUN: rm -rf %t && split-file %s %t && cd %t
+
+## Compile bitcode. -O2 is required for cross-module importing.
+RUN: %clang -O2 --target=x86_64-linux-gnu -flto=thin -c \
+RUN:   foo.c bar.c dog.c cat.c start.c
+
+## Generate thin archives.
+RUN: llvm-ar rcs foo.a foo.o --thin
+## Create this bitcode thin archive in a subdirectory to test the expansion of
+## the path to a bitcode file that is referenced using "..", e.g., in this case
+## "../bar.o".
+RUN: mkdir lib
+RUN: llvm-ar rcs lib/bar.a bar.o --thin
+## Create this bitcode thin archive with an absolute path entry containing "..".
+RUN: llvm-ar rcs dog.a %t/lib/../dog.o --thin
+## The bitcode member of cat.a will not be used in the link.
+RUN: llvm-ar rcs cat.a cat.o --thin
+RUN: llvm-ar rcs start.a start.o --thin
+
+## Link from a different directory to ensure that thin archive member paths are
+## resolved correctly relative to the archive locations.
+RUN: mkdir %t/out && cd %t/out
+
+RUN: %clang --target=x86_64-linux-gnu -flto=thin -fuse-ld=lld %t/foo.a %t/lib/bar.a ../start.a %t/cat.a \
+RUN:   -Wl,--whole-archive ../dog.a \
+RUN:   -fthinlto-distributor=%python \
+RUN:   -Xthinlto-distributor=%llvm_src_root/utils/dtlto/local.py \
+RUN:   -Wl,--save-temps -nostdlib -Werror
+
+## Check that the required output files have been created.
+RUN: ls | sort | FileCheck %s
+
+## No files are expected before.
+CHECK-NOT: {{.}}
+
+## JSON jobs description.
+CHECK: {{^}}a.[[PID:[a-zA-Z0-9_]+]].dist-file.json{{$}}
+
+## Native output object files and individual summary index files.
+CHECK: {{^}}bar.3.[[PID]].native.o{{$}}
+CHECK: {{^}}bar.3.[[PID]].native.o.thinlto.bc{{$}}
+CHECK: {{^}}dog.1.[[PID]].native.o{{$}}
+CHECK: {{^}}dog.1.[[PID]].native.o.thinlto.bc{{$}}
+CHECK: {{^}}foo.2.[[PID]].native.o{{$}}
+CHECK: {{^}}foo.2.[[PID]].native.o.thinlto.bc{{$}}
+CHECK: {{^}}start.4.[[PID]].native.o{{$}}
+CHECK: {{^}}start.4.[[PID]].native.o.thinlto.bc{{$}}
+
+## No files are expected after.
+CHECK-NOT: {{.}}
+
+
+## It is important that cross-module inlining occurs for this test to show that Clang can
+## successfully load the bitcode file dependencies recorded in the summary indices.
+## Explicitly check that the expected importing has occurred.
+
+RUN: llvm-dis start.4.*.native.o.thinlto.bc -o - | \
+RUN:   FileCheck %s --check-prefixes=FOO,BAR,START
+
+RUN: llvm-dis dog.1.*.native.o.thinlto.bc -o - | \
+RUN:   FileCheck %s --check-prefixes=FOO,BAR,DOG,START
+
+RUN: llvm-dis foo.2.*.native.o.thinlto.bc -o - | \
+RUN:   FileCheck %s --check-prefixes=FOO,BAR,START
+
+RUN: llvm-dis bar.3.*.native.o.thinlto.bc -o - | \
+RUN:   FileCheck %s --check-prefixes=FOO,BAR,START
+
+FOO-DAG:   foo.o
+BAR-DAG:   bar.o
+DOG-DAG:   dog.o
+START-DAG: start.o
+
+
+#--- foo.c
+extern int bar(int), _start(int);
+__attribute__((retain)) int foo(int x) { return x + bar(x) + _start(x); }
+
+#--- bar.c
+extern int foo(int), _start(int);
+__attribute__((retain)) int bar(int x) { return x + foo(x) + _start(x); }
+
+#--- dog.c
+extern int foo(int), bar(int), _start(int);
+__attribute__((retain)) int dog(int x) { return x + foo(x) + bar(x) + _start(x); }
+
+#--- cat.c
+__attribute__((retain)) void cat(int x) {}
+
+#--- start.c
+extern int foo(int), bar(int);
+__attribute__((retain)) int _start(int x) { return x + foo(x) + bar(x); }
diff --git a/cross-project-tests/lit.cfg.py b/cross-project-tests/lit.cfg.py
index b35c643ac898c..ac27753472646 100644
--- a/cross-project-tests/lit.cfg.py
+++ b/cross-project-tests/lit.cfg.py
@@ -19,7 +19,7 @@
 config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
 
 # suffixes: A list of file extensions to treat as test files.
-config.suffixes = [".c", ".cl", ".cpp", ".m"]
+config.suffixes = [".c", ".cl", ".cpp", ".m", ".test"]
 
 # excludes: A list of directories to exclude from the testsuite. The 'Inputs'
 # subdirectories contain auxiliary inputs for various tests in their parent
@@ -107,6 +107,8 @@ def get_required_attr(config, attr_name):
 if lldb_path is not None:
     config.available_features.add("lldb")
 
+if llvm_config.use_llvm_tool("llvm-ar"):
+    config.available_features.add("llvm-ar")
 
 def configure_dexter_substitutions():
     """Configure substitutions for host platform and return list of dependencies"""
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 71e72e7184b9f..dedb79bbd5043 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -20,6 +20,7 @@
 #include "llvm/ADT/CachedHashString.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/LTO/LTO.h"
+#include "llvm/Object/Archive.h"
 #include "llvm/Object/IRObjectFile.h"
 #include "llvm/Support/ARMAttributeParser.h"
 #include "llvm/Support/ARMBuildAttributes.h"
@@ -1753,6 +1754,36 @@ static uint8_t getOsAbi(const Triple &t) {
   }
 }
 
+// For DTLTO, bitcode member names must be valid paths to files on disk.
+// For thin archives, resolve `memberPath` relative to the archive's location.
+// Returns true if adjusted; false otherwise. Non-thin archives are unsupported.
+static bool dtltoAdjustMemberPathIfThinArchive(Ctx &ctx, StringRef archivePath,
+                                               std::string &memberPath) {
+  assert(!archivePath.empty() && !ctx.arg.dtltoDistributor.empty());
+
+  // Read the archive header to determine if it's a thin archive.
+  auto bufferOrErr =
+      MemoryBuffer::getFileSlice(archivePath, sizeof(ThinArchiveMagic) - 1, 0);
+  if (std::error_code ec = bufferOrErr.getError()) {
+    ErrAlways(ctx) << "cannot open " << archivePath << ": " << ec.message();
+    return false;
+  }
+
+  if (!bufferOrErr->get()->getBuffer().starts_with(ThinArchiveMagic))
+    return false;
+
+  SmallString<64> resolvedPath;
+  if (path::is_relative(memberPath)) {
+    resolvedPath = path::parent_path(archivePath);
+    path::append(resolvedPath, memberPath);
+  } else
+    resolvedPath = memberPath;
+
+  path::remove_dots(resolvedPath, /*remove_dot_dot=*/true);
+  memberPath = resolvedPath.str();
+  return true;
+}
+
 BitcodeFile::BitcodeFile(Ctx &ctx, MemoryBufferRef mb, StringRef archiveName,
                          uint64_t offsetInArchive, bool lazy)
     : InputFile(ctx, BitcodeKind, mb) {
@@ -1770,10 +1801,13 @@ BitcodeFile::BitcodeFile(Ctx &ctx, MemoryBufferRef mb, StringRef archiveName,
   // symbols later in the link stage). So we append file offset to make
   // filename unique.
   StringSaver &ss = ctx.saver;
-  StringRef name = archiveName.empty()
-                       ? ss.save(path)
-                       : ss.save(archiveName + "(" + path::filename(path) +
-                                 " at " + utostr(offsetInArchive) + ")");
+  StringRef name =
+      (archiveName.empty() ||
+       (!ctx.arg.dtltoDistributor.empty() &&
+        dtltoAdjustMemberPathIfThinArchive(ctx, archiveName, path)))
+          ? ss.save(path)
+          : ss.save(archiveName + "(" + path::filename(path) + " at " +
+                    utostr(offsetInArchive) + ")");
   MemoryBufferRef mbref(mb.getBuffer(), name);
 
   obj = CHECK2(lto::InputFile::create(mbref), this);
diff --git a/lld/test/ELF/dtlto/archive-thin.test b/lld/test/ELF/dtlto/archive-thin.test
new file mode 100644
index 0000000000000..e25d62429b443
--- /dev/null
+++ b/lld/test/ELF/dtlto/archive-thin.test
@@ -0,0 +1,66 @@
+REQUIRES: x86
+
+## Test that a DTLTO link assigns Module IDs to thin archive members as expected.
+
+RUN: rm -rf %t && split-file %s %t && cd %t
+
+RUN: sed 's/@t1/@t2/g' t1.ll > t2.ll
+RUN: sed 's/@t1/@t3/g' t1.ll > t3.ll
+
+RUN: opt -thinlto-bc t1.ll -o t1.bc
+RUN: opt -thinlto-bc t2.ll -o t2.bc
+RUN: opt -thinlto-bc t3.ll -o t3.bc
+
+RUN: llvm-ar rcs t1.a t1.bc --thin
+## Create this bitcode thin archive in a subdirectory to test the expansion of
+## the path to a bitcode file that is referenced using "..", e.g., in this case
+## "../t2.bc".
+RUN: mkdir lib
+RUN: llvm-ar rcs lib/t2.a t2.bc --thin
+## Create this bitcode thin archive with an absolute path entry containing "..".
+RUN: llvm-ar rcs t3.a %t/lib/../t3.bc --thin
+
+## Link from a different directory to ensure that thin archive member paths are
+## resolved correctly relative to the archive locations.
+RUN: mkdir %t/out && cd %t/out
+
+## Build a response file to share common linking arguments.
+## Note: validate.py does not perform any compilation. Instead, it validates the
+## received JSON, pretty-prints the JSON and the supplied arguments, and then
+## exits with an error. This allows FileCheck directives to verify the
+## distributor inputs.
+RUN: echo "%t/t1.a %t/lib/t2.a ../t3.a \
+RUN:   --thinlto-distributor=\"%python\" \
+RUN:   --thinlto-distributor-arg=\"%llvm_src_root/utils/dtlto/validate.py\" " > rsp
+
+## Link thin archives using -u/--undefined.
+RUN: not ld.lld @rsp -u t1 -u t2 -u t3 2>&1 | FileCheck %s
+
+## Link thin archives using --whole-archive.
+RUN: not ld.lld --whole-archive @rsp 2>&1 | FileCheck %s
+
+## Check the module IDs in the JSON jobs description.
+CHECK: "jobs": [
+CHECK: "inputs": [
+CHECK-NEXT: "{{([a-zA-Z]:)|/}}
+CHECK-SAME: {{/|\\\\}}archive-thin.test.tmp{{/|\\\\}}t1.bc"
+
+CHECK: "inputs": [
+CHECK-NEXT: "{{([a-zA-Z]\:)|/}}
+CHECK-SAME: {{/|\\\\}}archive-thin.test.tmp{{/|\\\\}}t2.bc"
+
+CHECK: "inputs": [
+CHECK-NEXT: "{{([a-zA-Z]:)|/}}
+CHECK-SAME: {{/|\\\\}}archive-thin.test.tmp{{/|\\\\}}t3.bc"
+
+## Ensure backend compilation fails as expected (due to validate.py dummy behavior).
+CHECK: error: DTLTO backend compilation: cannot open native object file:
+
+#--- t1.ll
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+define void @t1() {
+  ret void
+}
+

@bd1976bris
Copy link
Collaborator Author

if (!bufferOrErr->get()->getBuffer().starts_with(ThinArchiveMagic))
return false;

SmallString<64> resolvedPath;
Copy link
Member

Choose a reason for hiding this comment

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

Other lld code uses SmallString<128> or SmallString<256>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. I used SmallString<128>.

? ss.save(path)
: ss.save(archiveName + "(" + path::filename(path) +
" at " + utostr(offsetInArchive) + ")");
StringRef name =
Copy link
Member

Choose a reason for hiding this comment

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

The conditions are now complex. We should declare it then assign to it.

Copy link
Collaborator Author

@bd1976bris bd1976bris Jul 23, 2025

Choose a reason for hiding this comment

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

I have split the logic up. What do you think of it now?

define void @t1() {
ret void
}

Copy link
Member

Choose a reason for hiding this comment

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

delete trailing blank lines

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. Thanks.

## received JSON, pretty-prints the JSON and the supplied arguments, and then
## exits with an error. This allows FileCheck directives to verify the
## distributor inputs.
RUN: echo "%t/t1.a %t/lib/t2.a ../t3.a \
Copy link
Member

Choose a reason for hiding this comment

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

Use single quotes so that the inner " do not need to be escaped

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice! Thanks.

@bd1976bris
Copy link
Collaborator Author

bd1976bris commented Jul 23, 2025

@MaskRay I believe that I have addressed your comments now. Please take another look.

@bd1976bris
Copy link
Collaborator Author

@tru + @MaskRay if this lands soon can I cherry-pick to the release branch?

@tru
Copy link
Collaborator

tru commented Jul 29, 2025

Feels fairly safe - but it depends on when it lands. I wouldn't want to merge it right before final or post final.

@bd1976bris
Copy link
Collaborator Author

Feels fairly safe - but it depends on when it lands. I wouldn't want to merge it right before final or post final.

Thanks for confirming.

Copy link
Member

@MaskRay MaskRay left a comment

Choose a reason for hiding this comment

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

Sorry for the delay. As I mentioned at the Dev Meeting last October, my time for upstream review is limited in my spare time... In addition, click the 'Request Review' circle in the reviewer list :)

// For thin archives, resolve `memberPath` relative to the archive's location.
// Returns true if adjusted; false otherwise. Non-thin archives are unsupported.
static bool dtltoAdjustMemberPathIfThinArchive(Ctx &ctx, StringRef archivePath,
std::string &memberPath) {
Copy link
Member

Choose a reason for hiding this comment

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

The parameter type can use SmallString<128> to remove a SmallString->string conversion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks. This requires a slightly wider set of changes as Path in BitcodeFile constructor is a std::string. I will therefore tackle this in a follow up change.

// Returns true if adjusted; false otherwise. Non-thin archives are unsupported.
static bool dtltoAdjustMemberPathIfThinArchive(Ctx &ctx, StringRef archivePath,
std::string &memberPath) {
assert(!archivePath.empty());
Copy link
Member

Choose a reason for hiding this comment

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

delete blank line after assert


RUN: %clang --target=x86_64-linux-gnu -flto=thin -fuse-ld=lld %t/foo.a %t/lib/bar.a ../start.a %t/cat.a \
RUN: -Wl,--whole-archive ../dog.a \
RUN: -fthinlto-distributor=%python \
Copy link
Member

Choose a reason for hiding this comment

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

does %python need quoting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No. LIT quotes as appropriate. We only need to worry about quoting manually when using response files.

@@ -0,0 +1,97 @@
REQUIRES: ld.lld,llvm-ar
Copy link
Member

Choose a reason for hiding this comment

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

Do we need REQUIRES: llvm-ar when CROSS_PROJECT_TEST_DEPS specifies llvm-ar? llvm-ar is a very small executable.

lld requires a LLVM_ENABLE_PROJECTS, and i think it makes sense to keep its REQUIRES entry.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks. This can probably be removed. I will do so in a follow up commit.

@bd1976bris bd1976bris merged commit 673476d into llvm:main Aug 1, 2025
9 checks passed
@bd1976bris bd1976bris added this to the LLVM 21.x Release milestone Aug 1, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in LLVM Release Status Aug 1, 2025
@bd1976bris
Copy link
Collaborator Author

/cherry-pick 673476d

@llvmbot
Copy link
Member

llvmbot commented Aug 1, 2025

/pull-request #151674

@llvmbot llvmbot moved this from Needs Triage to Done in LLVM Release Status Aug 1, 2025
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 1, 2025

LLVM Buildbot has detected a new failure on builder fuchsia-x86_64-linux running on fuchsia-debian-64-us-central1-b-1 while building cross-project-tests,lld at step 4 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/fuchsia-linux.py ...' (failure)
...
[679/1396] Building CXX object unittests/ADT/CMakeFiles/ADTTests.dir/ImmutableListTest.cpp.o
[680/1396] Building CXX object unittests/ADT/CMakeFiles/ADTTests.dir/PackedVectorTest.cpp.o
[681/1396] Linking CXX executable bin/yaml2obj
[681/1396] Running lld test suite
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/wasm-ld
-- Testing: 3130 tests, 60 workers --
Testing:  0..
FAIL: lld :: COFF/import_weak_alias.test (273 of 3130)
******************** TEST 'lld :: COFF/import_weak_alias.test' FAILED ********************
Exit Code: 139

Command Output (stderr):
--
split-file /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/lld/test/COFF/import_weak_alias.test /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dir # RUN: at line 3
+ split-file /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/lld/test/COFF/import_weak_alias.test /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dir
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/llvm-mc --filetype=obj -triple=x86_64-windows-msvc /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dir/foo.s -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.foo.obj # RUN: at line 4
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/llvm-mc --filetype=obj -triple=x86_64-windows-msvc /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dir/foo.s -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.foo.obj
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/llvm-mc --filetype=obj -triple=x86_64-windows-msvc /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dir/qux.s -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.qux.obj # RUN: at line 5
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/llvm-mc --filetype=obj -triple=x86_64-windows-msvc /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dir/qux.s -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.qux.obj
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/lld-link /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.qux.obj /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.foo.obj -out:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dll -dll # RUN: at line 6
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/lld-link /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.qux.obj /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.foo.obj -out:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dll -dll
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.script: line 4: 1953999 Segmentation fault      (core dumped) /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/lld-link /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.qux.obj /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.foo.obj -out:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dll -dll

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (1):
  lld :: COFF/import_weak_alias.test


Testing Time: 25.21s

Total Discovered Tests: 3130
  Unsupported:  568 (18.15%)
  Passed     : 2561 (81.82%)
  Failed     :    1 (0.03%)
[826/1396] Building CXX object unittests/CodeGen/GlobalISel/CMakeFiles/GlobalISelTests.dir/CallLowering.cpp.o
FAILED: tools/lld/test/CMakeFiles/check-lld /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/CMakeFiles/check-lld 
cd /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test && /usr/bin/python3.10 /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/./bin/llvm-lit -sv /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test
[828/1396] Building CXX object unittests/CodeGen/CMakeFiles/CodeGenTests.dir/TypeTraitsTest.cpp.o
[829/1396] Building CXX object unittests/CodeGen/CMakeFiles/CodeGenTests.dir/GCMetadata.cpp.o
[830/1396] Building CXX object unittests/CodeGen/CMakeFiles/CodeGenTests.dir/CCStateTest.cpp.o
[831/1396] Building CXX object unittests/ADT/CMakeFiles/ADTTests.dir/STLExtrasTest.cpp.o
[832/1396] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/FunctionPropertiesAnalysisTest.cpp.o
Step 7 (check) failure: check (failure)
...
[679/1396] Building CXX object unittests/ADT/CMakeFiles/ADTTests.dir/ImmutableListTest.cpp.o
[680/1396] Building CXX object unittests/ADT/CMakeFiles/ADTTests.dir/PackedVectorTest.cpp.o
[681/1396] Linking CXX executable bin/yaml2obj
[681/1396] Running lld test suite
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/wasm-ld
-- Testing: 3130 tests, 60 workers --
Testing:  0..
FAIL: lld :: COFF/import_weak_alias.test (273 of 3130)
******************** TEST 'lld :: COFF/import_weak_alias.test' FAILED ********************
Exit Code: 139

Command Output (stderr):
--
split-file /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/lld/test/COFF/import_weak_alias.test /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dir # RUN: at line 3
+ split-file /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/lld/test/COFF/import_weak_alias.test /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dir
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/llvm-mc --filetype=obj -triple=x86_64-windows-msvc /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dir/foo.s -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.foo.obj # RUN: at line 4
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/llvm-mc --filetype=obj -triple=x86_64-windows-msvc /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dir/foo.s -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.foo.obj
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/llvm-mc --filetype=obj -triple=x86_64-windows-msvc /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dir/qux.s -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.qux.obj # RUN: at line 5
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/llvm-mc --filetype=obj -triple=x86_64-windows-msvc /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dir/qux.s -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.qux.obj
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/lld-link /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.qux.obj /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.foo.obj -out:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dll -dll # RUN: at line 6
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/lld-link /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.qux.obj /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.foo.obj -out:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dll -dll
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.script: line 4: 1953999 Segmentation fault      (core dumped) /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/bin/lld-link /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.qux.obj /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.foo.obj -out:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/COFF/Output/import_weak_alias.test.tmp.dll -dll

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (1):
  lld :: COFF/import_weak_alias.test


Testing Time: 25.21s

Total Discovered Tests: 3130
  Unsupported:  568 (18.15%)
  Passed     : 2561 (81.82%)
  Failed     :    1 (0.03%)
[826/1396] Building CXX object unittests/CodeGen/GlobalISel/CMakeFiles/GlobalISelTests.dir/CallLowering.cpp.o
FAILED: tools/lld/test/CMakeFiles/check-lld /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test/CMakeFiles/check-lld 
cd /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test && /usr/bin/python3.10 /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/./bin/llvm-lit -sv /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-bn_4qpn4/tools/lld/test
[828/1396] Building CXX object unittests/CodeGen/CMakeFiles/CodeGenTests.dir/TypeTraitsTest.cpp.o
[829/1396] Building CXX object unittests/CodeGen/CMakeFiles/CodeGenTests.dir/GCMetadata.cpp.o
[830/1396] Building CXX object unittests/CodeGen/CMakeFiles/CodeGenTests.dir/CCStateTest.cpp.o
[831/1396] Building CXX object unittests/ADT/CMakeFiles/ADTTests.dir/STLExtrasTest.cpp.o
[832/1396] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/FunctionPropertiesAnalysisTest.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 1, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-win running on sie-win-worker while building cross-project-tests,lld at step 7 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lld :: ELF/dtlto/archive-thin.test' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 5
rm -rf Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\ELF\dtlto\Output\archive-thin.test.tmp && split-file Z:\b\llvm-clang-x86_64-sie-win\llvm-project\lld\test\ELF\dtlto\archive-thin.test Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\ELF\dtlto\Output\archive-thin.test.tmp && cd Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\ELF\dtlto\Output\archive-thin.test.tmp
# executed command: rm -rf 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\ELF\dtlto\Output\archive-thin.test.tmp'
# note: command had no output on stdout or stderr
# executed command: split-file 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\lld\test\ELF\dtlto\archive-thin.test' 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\ELF\dtlto\Output\archive-thin.test.tmp'
# note: command had no output on stdout or stderr
# executed command: cd 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\ELF\dtlto\Output\archive-thin.test.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 7
sed 's/@t1/@t2/g' t1.ll > t2.ll
# executed command: sed s/@t1/@t2/g t1.ll
# note: command had no output on stdout or stderr
# RUN: at line 8
sed 's/@t1/@t3/g' t1.ll > t3.ll
# executed command: sed s/@t1/@t3/g t1.ll
# note: command had no output on stdout or stderr
# RUN: at line 10
z:\b\llvm-clang-x86_64-sie-win\build\bin\opt.exe -thinlto-bc t1.ll -o t1.bc
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\opt.exe' -thinlto-bc t1.ll -o t1.bc
# note: command had no output on stdout or stderr
# RUN: at line 11
z:\b\llvm-clang-x86_64-sie-win\build\bin\opt.exe -thinlto-bc t2.ll -o t2.bc
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\opt.exe' -thinlto-bc t2.ll -o t2.bc
# note: command had no output on stdout or stderr
# RUN: at line 12
z:\b\llvm-clang-x86_64-sie-win\build\bin\opt.exe -thinlto-bc t3.ll -o t3.bc
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\opt.exe' -thinlto-bc t3.ll -o t3.bc
# note: command had no output on stdout or stderr
# RUN: at line 14
llvm-ar rcs t1.a t1.bc --thin
# executed command: llvm-ar rcs t1.a t1.bc --thin
# note: command had no output on stdout or stderr
# RUN: at line 18
mkdir lib
# executed command: mkdir lib
# note: command had no output on stdout or stderr
# RUN: at line 19
llvm-ar rcs lib/t2.a t2.bc --thin
# executed command: llvm-ar rcs lib/t2.a t2.bc --thin
# note: command had no output on stdout or stderr
# RUN: at line 21
llvm-ar rcs t3.a Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\ELF\dtlto\Output\archive-thin.test.tmp/lib/../t3.bc --thin
# executed command: llvm-ar rcs t3.a 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\ELF\dtlto\Output\archive-thin.test.tmp/lib/../t3.bc' --thin
# note: command had no output on stdout or stderr
# RUN: at line 25
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 1, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-fast running on sanitizer-buildbot4 while building cross-project-tests,lld at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:73: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 91735 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.
FAIL: LLVM :: ExecutionEngine/JITLink/x86-64/COFF_directive_alternatename_fail.s (71945 of 91735)
******************** TEST 'LLVM :: ExecutionEngine/JITLink/x86-64/COFF_directive_alternatename_fail.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -filetype=obj -triple=x86_64-windows-msvc /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/COFF_directive_alternatename_fail.s -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/COFF_directive_alternatename_fail.s.tmp # RUN: at line 1
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -filetype=obj -triple=x86_64-windows-msvc /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/COFF_directive_alternatename_fail.s -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/COFF_directive_alternatename_fail.s.tmp
not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/COFF_directive_alternatename_fail.s.tmp 2>&1 | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/COFF_directive_alternatename_fail.s # RUN: at line 2
+ not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/COFF_directive_alternatename_fail.s.tmp
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/COFF_directive_alternatename_fail.s

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Slowest Tests:
--------------------------------------------------------------------------
662.30s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
411.64s: Clang :: Driver/fsanitize.c
396.29s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
344.63s: Clang :: CodeGen/AArch64/sve-intrinsics/acle_sve_reinterpret.c
334.40s: LLVM :: CodeGen/AMDGPU/memintrinsic-unroll.ll
320.05s: Clang :: Preprocessor/riscv-target-features.c
293.01s: Clang :: OpenMP/target_update_codegen.cpp
289.14s: Clang :: Driver/arm-cortex-cpus-2.c
285.63s: Clang :: Driver/arm-cortex-cpus-1.c
270.43s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
260.59s: Clang :: Preprocessor/aarch64-target-features.c
243.43s: Clang :: Preprocessor/predefined-arch-macros.c
242.90s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
242.19s: Clang :: Preprocessor/arm-target-features.c
231.73s: LLVM :: CodeGen/RISCV/attributes.ll
204.69s: Clang :: Analysis/a_flaky_crash.cpp
194.32s: Clang :: CodeGen/X86/rot-intrinsics.c
191.56s: Clang :: Driver/linux-ld.c
179.90s: Clang :: CodeGen/X86/sse2-builtins.c
179.83s: Clang :: Driver/cl-options.c

Step 10 (stage2/asan_ubsan check) failure: stage2/asan_ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:73: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 91735 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.
FAIL: LLVM :: ExecutionEngine/JITLink/x86-64/COFF_directive_alternatename_fail.s (71945 of 91735)
******************** TEST 'LLVM :: ExecutionEngine/JITLink/x86-64/COFF_directive_alternatename_fail.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -filetype=obj -triple=x86_64-windows-msvc /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/COFF_directive_alternatename_fail.s -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/COFF_directive_alternatename_fail.s.tmp # RUN: at line 1
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -filetype=obj -triple=x86_64-windows-msvc /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/COFF_directive_alternatename_fail.s -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/COFF_directive_alternatename_fail.s.tmp
not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/COFF_directive_alternatename_fail.s.tmp 2>&1 | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/COFF_directive_alternatename_fail.s # RUN: at line 2
+ not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/COFF_directive_alternatename_fail.s.tmp
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/COFF_directive_alternatename_fail.s

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Slowest Tests:
--------------------------------------------------------------------------
662.30s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
411.64s: Clang :: Driver/fsanitize.c
396.29s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
344.63s: Clang :: CodeGen/AArch64/sve-intrinsics/acle_sve_reinterpret.c
334.40s: LLVM :: CodeGen/AMDGPU/memintrinsic-unroll.ll
320.05s: Clang :: Preprocessor/riscv-target-features.c
293.01s: Clang :: OpenMP/target_update_codegen.cpp
289.14s: Clang :: Driver/arm-cortex-cpus-2.c
285.63s: Clang :: Driver/arm-cortex-cpus-1.c
270.43s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
260.59s: Clang :: Preprocessor/aarch64-target-features.c
243.43s: Clang :: Preprocessor/predefined-arch-macros.c
242.90s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
242.19s: Clang :: Preprocessor/arm-target-features.c
231.73s: LLVM :: CodeGen/RISCV/attributes.ll
204.69s: Clang :: Analysis/a_flaky_crash.cpp
194.32s: Clang :: CodeGen/X86/rot-intrinsics.c
191.56s: Clang :: Driver/linux-ld.c
179.90s: Clang :: CodeGen/X86/sse2-builtins.c
179.83s: Clang :: Driver/cl-options.c


bd1976bris added a commit to bd1976bris/llvm-project that referenced this pull request Aug 1, 2025
As suggested in review (see: llvm#149425), I believed that using single
quotes was a nicer quoting scheme that correctly handled paths with
spaces. Alas, build bot failures have demonstrated that this is not
the case.

Revert to the original quoting scheme (see: llvm#146749).
bd1976bris added a commit that referenced this pull request Aug 1, 2025
As suggested in review (see: #149425), I believed that using single
quotes was a nicer quoting scheme that correctly handled paths with
spaces. Alas, build bot failures have demonstrated that this is not the
case.

Revert to the original quoting scheme (see: #146749).
tru pushed a commit to llvmbot/llvm-project that referenced this pull request Aug 5, 2025
This patch adds support for bitcode members of thin archives to DTLTO
(https://llvm.org/docs/DTLTO.html) in ELF LLD.

For DTLTO, bitcode identifiers must be valid paths to bitcode files on
disk. Clang does not support archive inputs for ThinLTO backend
compilations. This patch adjusts the identifier for bitcode members of
thin archives in DTLTO links so that it is the path to the member file
on disk, allowing such members to be supported in DTLTO.

This patch is sufficient to allow for self-hosting an LLVM build with
DTLTO when thin archives are used.

Note: Bitcode members of non-thin archives remain unsupported. This will
be addressed in a future change.

Testing:
- LLD lit test coverage has been added to check that the identifier is
adjusted appropriately.
- A cross-project lit test has been added to show that a DTLTO link can
succeed when linking bitcode members of thin archives.

For the design discussion of the DTLTO feature, see: llvm#126654.

(cherry picked from commit 673476d)
tru pushed a commit that referenced this pull request Aug 5, 2025
As suggested in review (see: #149425), I believed that using single
quotes was a nicer quoting scheme that correctly handled paths with
spaces. Alas, build bot failures have demonstrated that this is not the
case.

Revert to the original quoting scheme (see: #146749).

(cherry picked from commit 73ce0ac)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

5 participants