llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[CodeGen] Expose the extensibility of PassConfig to plugins

Open Tcc100 opened this issue 6 months ago • 8 comments

This PR exposes the backend pass config to plugins via a callback. Plugin authors can register a callback that is being triggered before the target backend adds their passes to the pipeline. In the callback they then get access to the TargetMachine, the PassManager, and the TargetPassConfig. This allows plugins to call TargetPassConfig::insertPass, which is honored in the subsequent addPass of the main backend. We implemented this using the legacy pass manager as the backend is still using the old pass manager.

The following example shows how plugin authors can use the callback. Since its a callback that is not doing anything without anybody registering it, there shouldn't be any potential harm to the compiler unless a plugin is present.

__attribute__((constructor)) static void initCodeGenPlugin() {
    initializeCodeGenTestPass(*PassRegistry::getPassRegistry());

    TargetMachine::registerTargetPassConfigCallback([](auto &TM, auto &PM, auto *TPC) {
        TPC->insertPass(&GCLoweringID, &CodeGenTest::ID);
    });
}

Tcc100 avatar May 08 '25 10:05 Tcc100

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

github-actions[bot] avatar May 08 '25 10:05 github-actions[bot]

@nikic @aeubanks please have a look

Tcc100 avatar May 08 '25 10:05 Tcc100

@llvm/pr-subscribers-clang

Author: None (Tcc100)

Changes

This PR exposes the backend pass config to plugins via a callback. Plugin authors can register a callback that is being triggered before the target backend adds their passes to the pipeline. In the callback they then get access to the TargetMachine, the PassManager, and the TargetPassConfig. This allows plugins to call TargetPassConfig::insertPass, which is honored in the subsequent addPass of the main backend. We implemented this using the legacy pass manager as the backend is still using the old pass manager.

The following example shows how plugin authors can use the callback. Since its a callback that is not doing anything without anybody registering it, there shouldn't be any potential harm to the compiler unless a plugin is present.

__attribute__((constructor)) static void initCodeGenPlugin() {
    initializeCodeGenTestPass(*PassRegistry::getPassRegistry());

    TargetMachine::registerTargetPassConfigCallback([](auto &TM, auto &PM, auto *TPC) {
        TPC->insertPass(&GCLoweringID, &CodeGenTest::ID);
    });
}

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

5 Files Affected:

  • (added) clang/test/CodeGen/passconfighook.cpp (+56)
  • (modified) llvm/docs/WritingAnLLVMPass.rst (+17)
  • (modified) llvm/include/llvm/Target/TargetMachine.h (+14)
  • (modified) llvm/lib/CodeGen/CodeGenTargetMachineImpl.cpp (+3)
  • (modified) llvm/lib/Target/TargetMachine.cpp (+3)
diff --git a/clang/test/CodeGen/passconfighook.cpp b/clang/test/CodeGen/passconfighook.cpp
new file mode 100644
index 0000000000000..094df123f3de1
--- /dev/null
+++ b/clang/test/CodeGen/passconfighook.cpp
@@ -0,0 +1,56 @@
+// RUN: %clangxx -shared -fPIC -I??/install/include -L%llvmshlibdir %s -o %t.so
+// RUN: %clangxx -O3 -DMAIN -Xclang -load -Xclang %t.so %s -o %t-main | FileCheck %s
+
+#ifndef MAIN
+
+#include <llvm/Target/TargetMachine.h>
+#include <llvm/CodeGen/TargetPassConfig.h>
+#include <llvm/CodeGen/MachineFunctionPass.h>
+#include <llvm/CodeGen/Passes.h>
+
+#define DEBUG_TYPE "codegen-test"
+#define CODEGEN_TEST_NAME "CodeGen Test Pass"
+
+using namespace llvm;
+
+namespace llvm {
+    void initializeCodeGenTestPass(PassRegistry &);
+} // namespace llvm
+
+class CodeGenTest : public MachineFunctionPass {
+public:
+    static char ID;
+
+    CodeGenTest(): MachineFunctionPass(ID) {
+    }
+
+    bool runOnMachineFunction(MachineFunction &MF) override {
+        outs() << "[CodeGen] CodeGenTest::runOnMachineFunction" << "\n";
+        return true;
+    }
+
+    StringRef getPassName() const override {
+        return CODEGEN_TEST_NAME;
+    }
+};
+
+char CodeGenTest::ID = 0;
+INITIALIZE_PASS(CodeGenTest, DEBUG_TYPE, CODEGEN_TEST_NAME, false, false)
+
+__attribute__((constructor)) static void initCodeGenPlugin() {
+    initializeCodeGenTestPass(*PassRegistry::getPassRegistry());
+
+    TargetMachine::registerTargetPassConfigCallback([](auto &TM, auto &PM, auto *TPC) {
+        outs() << "registerTargetPassConfigCallback\n";
+        TPC->insertPass(&GCLoweringID, &CodeGenTest::ID);
+    });
+}
+
+#else
+
+// CHECK: CodeGenTest::runOnMachineFunction
+int main(int argc, char **argv) {
+    return 0;
+}
+
+#endif
diff --git a/llvm/docs/WritingAnLLVMPass.rst b/llvm/docs/WritingAnLLVMPass.rst
index 484227bac38b5..770f5f6acd115 100644
--- a/llvm/docs/WritingAnLLVMPass.rst
+++ b/llvm/docs/WritingAnLLVMPass.rst
@@ -442,6 +442,23 @@ in certain circumstances (such as calling the ``Pass::dump()`` from a
 debugger), so it should only be used to enhance debug output, it should not be
 depended on.
 
+Scheduling a MachineFunctionPass
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Backends create a ``TargetPassConfig`` and use ``addPass`` to schedule
+``MachineFunctionPass``\ es. External plugins can register a callback to modify
+and insert additional passes:
+
+.. code-block:: c++
+
+  TargetMachine::registerTargetPassConfigCallback(
+    [](TargetMachine &TM, PassManager &PM, TargetPassConfig *TPC) {
+      TPC->insertPass(/* ... */);
+      TPC->substitutePass(/* ... */);
+    }
+  );
+
+
 .. _writing-an-llvm-pass-interaction:
 
 Specifying interactions between passes
diff --git a/llvm/include/llvm/Target/TargetMachine.h b/llvm/include/llvm/Target/TargetMachine.h
index 906926729ed74..bcc1ce29b8282 100644
--- a/llvm/include/llvm/Target/TargetMachine.h
+++ b/llvm/include/llvm/Target/TargetMachine.h
@@ -20,10 +20,12 @@
 #include "llvm/Support/CodeGen.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Error.h"
+#include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/PGOOptions.h"
 #include "llvm/Target/CGPassBuilderOption.h"
 #include "llvm/Target/TargetOptions.h"
 #include "llvm/TargetParser/Triple.h"
+#include <functional>
 #include <optional>
 #include <string>
 #include <utility>
@@ -72,6 +74,10 @@ namespace yaml {
 struct MachineFunctionInfo;
 } // namespace yaml
 
+class TargetMachine;
+using PassConfigCallback =
+    std::function<void(TargetMachine &, PassManagerBase &, TargetPassConfig *)>;
+
 //===----------------------------------------------------------------------===//
 ///
 /// Primary interface to the complete machine description for the target
@@ -119,6 +125,9 @@ class TargetMachine {
   std::optional<PGOOptions> PGOOption;
 
 public:
+  static ManagedStatic<SmallVector<PassConfigCallback, 1>>
+      TargetPassConfigCallbacks;
+
   mutable TargetOptions Options;
 
   TargetMachine(const TargetMachine &) = delete;
@@ -518,6 +527,11 @@ class TargetMachine {
 
   // MachineRegisterInfo callback function
   virtual void registerMachineRegisterInfoCallback(MachineFunction &MF) const {}
+
+  // TargetPassConfig callback function
+  static void registerTargetPassConfigCallback(const PassConfigCallback &C) {
+    TargetPassConfigCallbacks->push_back(C);
+  }
 };
 
 } // end namespace llvm
diff --git a/llvm/lib/CodeGen/CodeGenTargetMachineImpl.cpp b/llvm/lib/CodeGen/CodeGenTargetMachineImpl.cpp
index 4a3503a2da7db..336f1db776036 100644
--- a/llvm/lib/CodeGen/CodeGenTargetMachineImpl.cpp
+++ b/llvm/lib/CodeGen/CodeGenTargetMachineImpl.cpp
@@ -119,6 +119,9 @@ addPassesToGenerateCode(CodeGenTargetMachineImpl &TM, PassManagerBase &PM,
   PM.add(PassConfig);
   PM.add(&MMIWP);
 
+  for (auto& C : *TargetMachine::TargetPassConfigCallbacks)
+    C(TM, PM, PassConfig);
+
   if (PassConfig->addISelPasses())
     return nullptr;
   PassConfig->addMachinePasses();
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index 69b6e26e602f6..c43e2ba00f733 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -332,3 +332,6 @@ std::pair<int, int> TargetMachine::parseBinutilsVersion(StringRef Version) {
     Version.consumeInteger(10, Ret.second);
   return Ret;
 }
+
+// TargetPassConfig callbacks
+ManagedStatic<SmallVector<PassConfigCallback, 1>> TargetMachine::TargetPassConfigCallbacks{};

llvmbot avatar May 20 '25 13:05 llvmbot

I added a test case and some docs, which tuned out to be more challenging than expected, since I couldn't find any test case for the plugin system. The lit test in this PR requires the current llvm headers, which are not provided by the lit system, thus, it currently only works if you provide the absolute path in your system. I'd appreciate any pointers on how to implement this correctly.

Tcc100 avatar May 20 '25 14:05 Tcc100

I don't think you can reasonably test this with a lit test, you have to add this as a proper build target in llvm/examples similar to Bye

arsenm avatar May 21 '25 20:05 arsenm

I don't think you can reasonably test this with a lit test, you have to add this as a proper build target in llvm/examples similar to Bye.

A lit test could then drive the load of that plugin, but the lit test can't contain the pass itself

arsenm avatar May 21 '25 20:05 arsenm

@arsenm Thanks for the hint, I added a unit test to check that the callback interface gets called properly and that the example plugin is properly loaded. I also added documentation for the plugin interface to the "Writing an LLVM Pass" docs. What do you think, are we ready to merge?

Tcc100 avatar Jun 10 '25 10:06 Tcc100

@arsenm Thanks for your follow-up. It's mostly style details, but what about the general direction of the patch?

weliveindetail avatar Jun 25 '25 13:06 weliveindetail

@Tcc100 Thanks for working on this! Once this and this got addressed, your patch should be ready to land.

Anyone other thoughts?

weliveindetail avatar Jun 30 '25 18:06 weliveindetail

@weliveindetail I changed the registry as you suggested. Since it is now completely separate from the TargetMachine class, I moved it into its own file.

Tcc100 avatar Jul 03 '25 12:07 Tcc100

I am planning to land this tomorrow morning CEST, because I am out on Friday. @Tcc100 Should I land the patch on behalf of T<T>? Otherwise, please let me know the proper attribution -- here or via email (you find it in my LLVM patches 😉)

weliveindetail avatar Jul 09 '25 09:07 weliveindetail

@weliveindetail Thanks! I updated the license header and my name in the commit. I hopefully also fixed the warning in the docs, however, it is hard to test as it does not occur on my machine.

Tcc100 avatar Jul 09 '25 14:07 Tcc100

@Tcc100 Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail here.

If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

github-actions[bot] avatar Jul 10 '25 10:07 github-actions[bot]

This broke https://lab.llvm.org/buildbot/#/builders/10/builds/9125/steps/8/logs/stdio

The bot does a SHARED_LIBS=ON build. I can reproduce locally with the CMake cache file in offload/cmake/caches/AMDGPUBot.cmake as the build config.

jplehr avatar Jul 10 '25 12:07 jplehr

Failed to link the unittest:

[715/716] Linking CXX executable unittests/CodeGen/CGPluginTest/CGPluginTest
FAILED: unittests/CodeGen/CGPluginTest/CGPluginTest 
: && /usr/bin/c++ -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-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,--export-dynamic   -Wl,--gc-sections unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/Plugin/CodeGenTestPass.cpp.o -o unittests/CodeGen/CGPluginTest/CGPluginTest  -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib  lib/libLLVMX86CodeGen.so.21.0git  lib/libLLVMX86AsmParser.so.21.0git  lib/libLLVMX86Desc.so.21.0git  lib/libLLVMX86Disassembler.so.21.0git  lib/libLLVMX86Info.so.21.0git  lib/libLLVMAMDGPUCodeGen.so.21.0git  lib/libLLVMAMDGPUAsmParser.so.21.0git  lib/libLLVMAMDGPUDisassembler.so.21.0git  lib/libllvm_gtest_main.so.21.0git  lib/libLLVMTestingSupport.so.21.0git  lib/libLLVMCodeGen.so.21.0git  lib/libLLVMTarget.so.21.0git  lib/libLLVMAMDGPUDesc.so.21.0git  lib/libLLVMAMDGPUInfo.so.21.0git  lib/libLLVMAMDGPUUtils.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libllvm_gtest.so.21.0git  lib/libLLVMSupport.so.21.0git  -Wl,-rpath-link,/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib && :
/usr/bin/ld: unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o: undefined reference to symbol '_ZN4llvm9MCContextC1ERKNS_6TripleEPKNS_9MCAsmInfoEPKNS_14MCRegisterInfoEPKNS_15MCSubtargetInfoEPKNS_9SourceMgrEPKNS_15MCTargetOptionsEbNS_9StringRefE'
/usr/bin/ld: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib/libLLVMMC.so.21.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Seems like we are missing MC as a dependency. Let me check if adding it fixes the issue. Otherwise, I'd disable the unittest for BUILD_SHARED_LIBS as it is incompatible with LLVM_LINK_LLVM_DYLIB anyway.

weliveindetail avatar Jul 10 '25 12:07 weliveindetail

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-multistage running on ppc64le-clang-multistage-test while building llvm at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[77/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Noinst-Test
[78/85] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[79/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Noinst-Test
[80/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-calls.o
[81/85] Generating POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-calls-Dynamic-Test
[82/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Test
[83/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[84/85] Generating POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-inline-Dynamic-Test
[85/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Test
[1218/1225] Linking CXX executable unittests/CodeGen/CGPluginTest/CGPluginTest
FAILED: unittests/CodeGen/CGPluginTest/CGPluginTest 
: && /usr/lib64/ccache/c++ -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-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--export-dynamic   -Wl,--gc-sections unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/Plugin/CodeGenTestPass.cpp.o -o unittests/CodeGen/CGPluginTest/CGPluginTest  -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib  lib/libLLVMAArch64CodeGen.so.21.0git  lib/libLLVMAArch64AsmParser.so.21.0git  lib/libLLVMAArch64Disassembler.so.21.0git  lib/libLLVMAMDGPUCodeGen.so.21.0git  lib/libLLVMAMDGPUAsmParser.so.21.0git  lib/libLLVMAMDGPUDisassembler.so.21.0git  lib/libLLVMARMCodeGen.so.21.0git  lib/libLLVMARMAsmParser.so.21.0git  lib/libLLVMARMDisassembler.so.21.0git  lib/libLLVMAVRCodeGen.so.21.0git  lib/libLLVMAVRAsmParser.so.21.0git  lib/libLLVMAVRDesc.so.21.0git  lib/libLLVMAVRDisassembler.so.21.0git  lib/libLLVMAVRInfo.so.21.0git  lib/libLLVMBPFCodeGen.so.21.0git  lib/libLLVMBPFAsmParser.so.21.0git  lib/libLLVMBPFDesc.so.21.0git  lib/libLLVMBPFDisassembler.so.21.0git  lib/libLLVMBPFInfo.so.21.0git  lib/libLLVMHexagonCodeGen.so.21.0git  lib/libLLVMHexagonAsmParser.so.21.0git  lib/libLLVMHexagonDisassembler.so.21.0git  lib/libLLVMLanaiCodeGen.so.21.0git  lib/libLLVMLanaiAsmParser.so.21.0git  lib/libLLVMLanaiDisassembler.so.21.0git  lib/libLLVMLoongArchCodeGen.so.21.0git  lib/libLLVMLoongArchAsmParser.so.21.0git  lib/libLLVMLoongArchDisassembler.so.21.0git  lib/libLLVMMipsCodeGen.so.21.0git  lib/libLLVMMipsAsmParser.so.21.0git  lib/libLLVMMipsDesc.so.21.0git  lib/libLLVMMipsDisassembler.so.21.0git  lib/libLLVMMipsInfo.so.21.0git  lib/libLLVMMSP430CodeGen.so.21.0git  lib/libLLVMMSP430AsmParser.so.21.0git  lib/libLLVMMSP430Desc.so.21.0git  lib/libLLVMMSP430Disassembler.so.21.0git  lib/libLLVMMSP430Info.so.21.0git  lib/libLLVMNVPTXCodeGen.so.21.0git  lib/libLLVMNVPTXDesc.so.21.0git  lib/libLLVMNVPTXInfo.so.21.0git  lib/libLLVMPowerPCCodeGen.so.21.0git  lib/libLLVMPowerPCAsmParser.so.21.0git  lib/libLLVMPowerPCDesc.so.21.0git  lib/libLLVMPowerPCDisassembler.so.21.0git  lib/libLLVMPowerPCInfo.so.21.0git  lib/libLLVMRISCVCodeGen.so.21.0git  lib/libLLVMRISCVAsmParser.so.21.0git  lib/libLLVMRISCVDisassembler.so.21.0git  lib/libLLVMSparcCodeGen.so.21.0git  lib/libLLVMSparcAsmParser.so.21.0git  lib/libLLVMSparcDesc.so.21.0git  lib/libLLVMSparcDisassembler.so.21.0git  lib/libLLVMSparcInfo.so.21.0git  lib/libLLVMSPIRVCodeGen.so.21.0git  lib/libLLVMSPIRVDesc.so.21.0git  lib/libLLVMSPIRVInfo.so.21.0git  lib/libLLVMSystemZCodeGen.so.21.0git  lib/libLLVMSystemZAsmParser.so.21.0git  lib/libLLVMSystemZDisassembler.so.21.0git  lib/libLLVMVECodeGen.so.21.0git  lib/libLLVMVEAsmParser.so.21.0git  lib/libLLVMVEDesc.so.21.0git  lib/libLLVMVEDisassembler.so.21.0git  lib/libLLVMVEInfo.so.21.0git  lib/libLLVMWebAssemblyCodeGen.so.21.0git  lib/libLLVMWebAssemblyAsmParser.so.21.0git  lib/libLLVMWebAssemblyDisassembler.so.21.0git  lib/libLLVMWebAssemblyUtils.so.21.0git  lib/libLLVMX86CodeGen.so.21.0git  lib/libLLVMX86AsmParser.so.21.0git  lib/libLLVMX86Desc.so.21.0git  lib/libLLVMX86Disassembler.so.21.0git  lib/libLLVMX86Info.so.21.0git  lib/libLLVMXCoreCodeGen.so.21.0git  lib/libLLVMXCoreDesc.so.21.0git  lib/libLLVMXCoreDisassembler.so.21.0git  lib/libLLVMXCoreInfo.so.21.0git  -lpthread  lib/libllvm_gtest_main.so.21.0git  -lpthread  lib/libLLVMTestingSupport.so.21.0git  lib/libLLVMAArch64Desc.so.21.0git  lib/libLLVMAArch64Info.so.21.0git  lib/libLLVMAArch64Utils.so.21.0git  lib/libLLVMAMDGPUDesc.so.21.0git  lib/libLLV
RMUtils.so.21.0git  lib/libLLVMHexagonDesc.so.21.0git  lib/libLLVMHexagonInfo.so.21.0git  lib/libLLVMLanaiDesc.so.21.0git  lib/libLLVMLanaiInfo.so.21.0git  lib/libLLVMLoongArchDesc.so.21.0git  lib/libLLVMLoongArchInfo.so.21.0git  lib/libLLVMRISCVDesc.so.21.0git  lib/libLLVMRISCVInfo.so.21.0git  lib/libLLVMSystemZDesc.so.21.0git  lib/libLLVMSystemZInfo.so.21.0git  lib/libLLVMWebAssemblyDesc.so.21.0git  lib/libLLVMWebAssemblyInfo.so.21.0git  lib/libLLVMCodeGen.so.21.0git  lib/libLLVMTarget.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libllvm_gtest.so.21.0git  lib/libLLVMSupport.so.21.0git  -Wl,-rpath-link,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib && :
/usr/bin/ld: unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o: undefined reference to symbol '_ZN4llvm9MCContextC1ERKNS_6TripleEPKNS_9MCAsmInfoEPKNS_14MCRegisterInfoEPKNS_15MCSubtargetInfoEPKNS_9SourceMgrEPKNS_15MCTargetOptionsEbNS_9StringRefE'
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib/libLLVMMC.so.21.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[1220/1225] Linking CXX executable tools/clang/unittests/AllClangUnitTests
ninja: build stopped: subcommand failed.
Step 11 (ninja check 2) failure: stage 2 checked (failure)
...
[77/85] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[78/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Noinst-Test
[79/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Noinst-Test
[80/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-calls.o
[81/85] Generating POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-calls-Dynamic-Test
[82/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Test
[83/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[84/85] Generating POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-inline-Dynamic-Test
[85/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Test
[467/1225] Linking CXX executable unittests/CodeGen/CGPluginTest/CGPluginTest
FAILED: unittests/CodeGen/CGPluginTest/CGPluginTest 
: && /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/clang++ -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 -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--export-dynamic   -Wl,--gc-sections unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/Plugin/CodeGenTestPass.cpp.o -o unittests/CodeGen/CGPluginTest/CGPluginTest  -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib  lib/libLLVMAArch64CodeGen.so.21.0git  lib/libLLVMAArch64AsmParser.so.21.0git  lib/libLLVMAArch64Disassembler.so.21.0git  lib/libLLVMAMDGPUCodeGen.so.21.0git  lib/libLLVMAMDGPUAsmParser.so.21.0git  lib/libLLVMAMDGPUDisassembler.so.21.0git  lib/libLLVMARMCodeGen.so.21.0git  lib/libLLVMARMAsmParser.so.21.0git  lib/libLLVMARMDisassembler.so.21.0git  lib/libLLVMAVRCodeGen.so.21.0git  lib/libLLVMAVRAsmParser.so.21.0git  lib/libLLVMAVRDesc.so.21.0git  lib/libLLVMAVRDisassembler.so.21.0git  lib/libLLVMAVRInfo.so.21.0git  lib/libLLVMBPFCodeGen.so.21.0git  lib/libLLVMBPFAsmParser.so.21.0git  lib/libLLVMBPFDesc.so.21.0git  lib/libLLVMBPFDisassembler.so.21.0git  lib/libLLVMBPFInfo.so.21.0git  lib/libLLVMHexagonCodeGen.so.21.0git  lib/libLLVMHexagonAsmParser.so.21.0git  lib/libLLVMHexagonDisassembler.so.21.0git  lib/libLLVMLanaiCodeGen.so.21.0git  lib/libLLVMLanaiAsmParser.so.21.0git  lib/libLLVMLanaiDisassembler.so.21.0git  lib/libLLVMLoongArchCodeGen.so.21.0git  lib/libLLVMLoongArchAsmParser.so.21.0git  lib/libLLVMLoongArchDisassembler.so.21.0git  lib/libLLVMMipsCodeGen.so.21.0git  lib/libLLVMMipsAsmParser.so.21.0git  lib/libLLVMMipsDesc.so.21.0git  lib/libLLVMMipsDisassembler.so.21.0git  lib/libLLVMMipsInfo.so.21.0git  lib/libLLVMMSP430CodeGen.so.21.0git  lib/libLLVMMSP430AsmParser.so.21.0git  lib/libLLVMMSP430Desc.so.21.0git  lib/libLLVMMSP430Disassembler.so.21.0git  lib/libLLVMMSP430Info.so.21.0git  lib/libLLVMNVPTXCodeGen.so.21.0git  lib/libLLVMNVPTXDesc.so.21.0git  lib/libLLVMNVPTXInfo.so.21.0git  lib/libLLVMPowerPCCodeGen.so.21.0git  lib/libLLVMPowerPCAsmParser.so.21.0git  lib/libLLVMPowerPCDesc.so.21.0git  lib/libLLVMPowerPCDisassembler.so.21.0git  lib/libLLVMPowerPCInfo.so.21.0git  lib/libLLVMRISCVCodeGen.so.21.0git  lib/libLLVMRISCVAsmParser.so.21.0git  lib/libLLVMRISCVDisassembler.so.21.0git  lib/libLLVMSparcCodeGen.so.21.0git  lib/libLLVMSparcAsmParser.so.21.0git  lib/libLLVMSparcDesc.so.21.0git  lib/libLLVMSparcDisassembler.so.21.0git  lib/libLLVMSparcInfo.so.21.0git  lib/libLLVMSPIRVCodeGen.so.21.0git  lib/libLLVMSPIRVDesc.so.21.0git  lib/libLLVMSPIRVInfo.so.21.0git  lib/libLLVMSystemZCodeGen.so.21.0git  lib/libLLVMSystemZAsmParser.so.21.0git  lib/libLLVMSystemZDisassembler.so.21.0git  lib/libLLVMVECodeGen.so.21.0git  lib/libLLVMVEAsmParser.so.21.0git  lib/libLLVMVEDesc.so.21.0git  lib/libLLVMVEDisassembler.so.21.0git  lib/libLLVMVEInfo.so.21.0git  lib/libLLVMWebAssemblyCodeGen.so.21.0git  lib/libLLVMWebAssemblyAsmParser.so.21.0git  lib/libLLVMWebAssemblyDisassembler.so.21.0git  lib/libLLVMWebAssemblyUtils.so.21.0git  lib/libLLVMX86CodeGen.so.21.0git  lib/libLLVMX86AsmParser.so.21.0git  lib/libLLVMX86Desc.so.21.0git  lib/libLLVMX86Disassembler.so.21.0git  lib/libLLVMX86Info.so.21.0git  lib/libLLVMXCoreCodeGen.so.21.0git  lib/libLLVMXCoreDesc.so.21.0git  lib/libLLVMXCoreDisassembler.so.21.0git  lib/libLLVMXCoreInfo.so.21.0git  -lpthread  lib/libllvm_gtest_main.so.21.0
LVMAArch64Utils.so.21.0git  lib/libLLVMAMDGPUDesc.so.21.0git  lib/libLLVMAMDGPUInfo.so.21.0git  lib/libLLVMAMDGPUUtils.so.21.0git  lib/libLLVMARMDesc.so.21.0git  lib/libLLVMARMInfo.so.21.0git  lib/libLLVMARMUtils.so.21.0git  lib/libLLVMHexagonDesc.so.21.0git  lib/libLLVMHexagonInfo.so.21.0git  lib/libLLVMLanaiDesc.so.21.0git  lib/libLLVMLanaiInfo.so.21.0git  lib/libLLVMLoongArchDesc.so.21.0git  lib/libLLVMLoongArchInfo.so.21.0git  lib/libLLVMRISCVDesc.so.21.0git  lib/libLLVMRISCVInfo.so.21.0git  lib/libLLVMSystemZDesc.so.21.0git  lib/libLLVMSystemZInfo.so.21.0git  lib/libLLVMWebAssemblyDesc.so.21.0git  lib/libLLVMWebAssemblyInfo.so.21.0git  lib/libLLVMCodeGen.so.21.0git  lib/libLLVMTarget.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libllvm_gtest.so.21.0git  lib/libLLVMSupport.so.21.0git  -Wl,-rpath-link,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib && :
/usr/bin/ld: unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o: undefined reference to symbol '_ZN4llvm9MCContextC1ERKNS_6TripleEPKNS_9MCAsmInfoEPKNS_14MCRegisterInfoEPKNS_15MCSubtargetInfoEPKNS_9SourceMgrEPKNS_15MCTargetOptionsEbNS_9StringRefE'
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib/libLLVMMC.so.21.0git: error adding symbols: DSO missing from command line
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[798/1225] Building CXX object tools/clang/tools/extra/unittests/clang-include-fixer/CMakeFiles/ClangIncludeFixerTests.dir/IncludeFixerTest.cpp.o
[800/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/NoStateChangeFuncVisitorTest.cpp.o
[801/1225] Building CXX object tools/clang/tools/extra/unittests/clang-tidy/CMakeFiles/ClangTidyTests.dir/IncludeInserterTest.cpp.o
[802/1225] Building CXX object unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/RISCV/SnippetGeneratorTest.cpp.o
[803/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/CrossTU/CrossTranslationUnitTest.cpp.o
[804/1225] Building CXX object unittests/Option/CMakeFiles/OptionTests.dir/OptionParsingTest.cpp.o
[805/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/DeclRefExpr.cpp.o
[806/1225] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/ConstantRangeTest.cpp.o
[807/1225] Building CXX object unittests/Transforms/Vectorize/CMakeFiles/VectorizeTests.dir/VPlanSlpTest.cpp.o
[808/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/ASTSelectionTest.cpp.o
[809/1225] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/PatternMatch.cpp.o
[810/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/ToolingTest.cpp.o
[811/1225] Building CXX object unittests/CodeGen/GlobalISel/CMakeFiles/GlobalISelTests.dir/LegalizerHelperTest.cpp.o
[812/1225] Building CXX object unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFDebugLineTest.cpp.o
[813/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Serialization/NoCommentsTest.cpp.o
[814/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/AST/NamedDeclPrinterTest.cpp.o
[815/1225] Building CXX object unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/TargetTest.cpp.o
[816/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/ParamRegionTest.cpp.o
[817/1225] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/MemProfTest.cpp.o
[818/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/AST/ASTDumperTest.cpp.o
[819/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/FalsePositiveRefutationBRVisitorTest.cpp.o
[820/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/SearchPathTest.cpp.o
[821/1225] Building CXX object unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/SnippetGeneratorTest.cpp.o
[822/1225] Building CXX object tools/clang/tools/extra/unittests/clang-doc/CMakeFiles/ClangDocTests.dir/BitcodeTest.cpp.o
[823/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Rewrite/RewriterTest.cpp.o
[824/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/StencilTest.cpp.o
[825/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/AST/SizelessTypesTest.cpp.o
[826/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/Syntax/TokensTest.cpp.o
[827/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/ASTMatchers/GtestMatchersTest.cpp.o
[828/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/DataflowEnvironmentTest.cpp.o
[829/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/OutputStreamTest.cpp.o
[830/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/CompilerInstanceTest.cpp.o
[831/1225] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/SignAnalysisTest.cpp.o

llvm-ci avatar Jul 10 '25 12:07 llvm-ci

https://lab.llvm.org/buildbot/#/builders/76/builds/11163 shows the same issue as reported by JP

weliveindetail avatar Jul 10 '25 12:07 weliveindetail

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-android running on sanitizer-buildbot-android while building llvm at step 2 "annotate".

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

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)
...
[       OK ] AddressSanitizer.AtoiAndFriendsOOBTest (2271 ms)
[ RUN      ] AddressSanitizer.HasFeatureAddressSanitizerTest
[       OK ] AddressSanitizer.HasFeatureAddressSanitizerTest (0 ms)
[ RUN      ] AddressSanitizer.CallocReturnsZeroMem
[       OK ] AddressSanitizer.CallocReturnsZeroMem (9 ms)
[ DISABLED ] AddressSanitizer.DISABLED_TSDTest
[ RUN      ] AddressSanitizer.IgnoreTest
[       OK ] AddressSanitizer.IgnoreTest (0 ms)
[ RUN      ] AddressSanitizer.SignalTest
[       OK ] AddressSanitizer.SignalTest (193 ms)
[ RUN      ] AddressSanitizer.ReallocTest
[       OK ] AddressSanitizer.ReallocTest (30 ms)
[ RUN      ] AddressSanitizer.WrongFreeTest
[       OK ] AddressSanitizer.WrongFreeTest (147 ms)
[ RUN      ] AddressSanitizer.LongJmpTest
[       OK ] AddressSanitizer.LongJmpTest (0 ms)
[ RUN      ] AddressSanitizer.ThreadStackReuseTest
[       OK ] AddressSanitizer.ThreadStackReuseTest (3 ms)
[ DISABLED ] AddressSanitizer.DISABLED_MemIntrinsicUnalignedAccessTest
[ DISABLED ] AddressSanitizer.DISABLED_LargeFunctionSymbolizeTest
[ DISABLED ] AddressSanitizer.DISABLED_MallocFreeUnwindAndSymbolizeTest
[ RUN      ] AddressSanitizer.UseThenFreeThenUseTest
[       OK ] AddressSanitizer.UseThenFreeThenUseTest (117 ms)
[ RUN      ] AddressSanitizer.FileNameInGlobalReportTest
[       OK ] AddressSanitizer.FileNameInGlobalReportTest (113 ms)
[ DISABLED ] AddressSanitizer.DISABLED_StressStackReuseAndExceptionsTest
[ RUN      ] AddressSanitizer.MlockTest
[       OK ] AddressSanitizer.MlockTest (0 ms)
[ DISABLED ] AddressSanitizer.DISABLED_DemoThreadedTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoStackTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoThreadStackTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowIn
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowLeft
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowRight
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFHigh
[ DISABLED ] AddressSanitizer.DISABLED_DemoOOM
[ DISABLED ] AddressSanitizer.DISABLED_DemoDoubleFreeTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoNullDerefTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoFunctionStaticTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoTooMuchMemoryTest
[ RUN      ] AddressSanitizer.LongDoubleNegativeTest
[       OK ] AddressSanitizer.LongDoubleNegativeTest (0 ms)
[----------] 19 tests from AddressSanitizer (27887 ms total)

[----------] Global test environment tear-down
[==========] 22 tests from 2 test suites ran. (27889 ms total)
[  PASSED  ] 22 tests.

  YOU HAVE 1 DISABLED TEST

Step 24 (run instrumented asan tests [aarch64/aosp_coral-userdebug/AOSP.MASTER]) failure: run instrumented asan tests [aarch64/aosp_coral-userdebug/AOSP.MASTER] (failure)
...
[ RUN      ] AddressSanitizer.HasFeatureAddressSanitizerTest
[       OK ] AddressSanitizer.HasFeatureAddressSanitizerTest (0 ms)
[ RUN      ] AddressSanitizer.CallocReturnsZeroMem
[       OK ] AddressSanitizer.CallocReturnsZeroMem (7 ms)
[ DISABLED ] AddressSanitizer.DISABLED_TSDTest
[ RUN      ] AddressSanitizer.IgnoreTest
[       OK ] AddressSanitizer.IgnoreTest (0 ms)
[ RUN      ] AddressSanitizer.SignalTest
[       OK ] AddressSanitizer.SignalTest (335 ms)
[ RUN      ] AddressSanitizer.ReallocTest
[       OK ] AddressSanitizer.ReallocTest (23 ms)
[ RUN      ] AddressSanitizer.WrongFreeTest
[       OK ] AddressSanitizer.WrongFreeTest (222 ms)
[ RUN      ] AddressSanitizer.LongJmpTest
[       OK ] AddressSanitizer.LongJmpTest (0 ms)
[ RUN      ] AddressSanitizer.ThreadStackReuseTest
[       OK ] AddressSanitizer.ThreadStackReuseTest (1 ms)
[ DISABLED ] AddressSanitizer.DISABLED_MemIntrinsicUnalignedAccessTest
[ DISABLED ] AddressSanitizer.DISABLED_LargeFunctionSymbolizeTest
[ DISABLED ] AddressSanitizer.DISABLED_MallocFreeUnwindAndSymbolizeTest
[ RUN      ] AddressSanitizer.UseThenFreeThenUseTest
[       OK ] AddressSanitizer.UseThenFreeThenUseTest (312 ms)
[ RUN      ] AddressSanitizer.FileNameInGlobalReportTest
[       OK ] AddressSanitizer.FileNameInGlobalReportTest (282 ms)
[ DISABLED ] AddressSanitizer.DISABLED_StressStackReuseAndExceptionsTest
[ RUN      ] AddressSanitizer.MlockTest
[       OK ] AddressSanitizer.MlockTest (0 ms)
[ DISABLED ] AddressSanitizer.DISABLED_DemoThreadedTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoStackTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoThreadStackTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowIn
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowLeft
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowRight
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFHigh
[ DISABLED ] AddressSanitizer.DISABLED_DemoOOM
[ DISABLED ] AddressSanitizer.DISABLED_DemoDoubleFreeTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoNullDerefTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoFunctionStaticTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoTooMuchMemoryTest
[ RUN      ] AddressSanitizer.LongDoubleNegativeTest
[       OK ] AddressSanitizer.LongDoubleNegativeTest (0 ms)
[----------] 19 tests from AddressSanitizer (71300 ms total)

[----------] Global test environment tear-down
[==========] 22 tests from 2 test suites ran. (71314 ms total)
[  PASSED  ] 22 tests.

  YOU HAVE 1 DISABLED TEST

Serial 17031FQCB00176

llvm-ci avatar Jul 10 '25 12:07 llvm-ci

LLVM Buildbot has detected a new failure on builder llvm-nvptx64-nvidia-ubuntu running on as-builder-7 while building llvm at step 6 "test-build-unified-tree-check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-llvm) failure: test (failure)
...
2.125 [2/9/703] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
2.153 [2/8/704] Linking CXX executable unittests/Transforms/Vectorize/SandboxVectorizer/SandboxVectorizerTests
2.169 [2/7/705] Linking CXX executable unittests/IR/IRTests
2.175 [2/6/706] Linking CXX executable unittests/Transforms/Utils/UtilsTests
2.191 [2/5/707] Linking CXX executable unittests/ADT/ADTTests
2.220 [2/4/708] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
2.599 [2/3/709] Linking CXX executable unittests/Support/SupportTests
5.002 [2/2/710] Building CXX object unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/Plugin/CodeGenTestPass.cpp.o
8.425 [2/1/711] Building CXX object unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o
8.531 [1/1/712] Linking CXX executable unittests/CodeGen/CGPluginTest/CGPluginTest
FAILED: unittests/CodeGen/CGPluginTest/CGPluginTest 
: && /usr/bin/c++ -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-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -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 -fuse-ld=gold   -Wl,--export-dynamic   -Wl,--gc-sections unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/Plugin/CodeGenTestPass.cpp.o -o unittests/CodeGen/CGPluginTest/CGPluginTest  -Wl,-rpath,/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/build/lib  lib/libLLVMX86CodeGen.so.21.0git  lib/libLLVMX86AsmParser.so.21.0git  lib/libLLVMX86Desc.so.21.0git  lib/libLLVMX86Disassembler.so.21.0git  lib/libLLVMX86Info.so.21.0git  lib/libLLVMNVPTXCodeGen.so.21.0git  lib/libLLVMNVPTXDesc.so.21.0git  lib/libLLVMNVPTXInfo.so.21.0git  lib/libllvm_gtest_main.so.21.0git  lib/libLLVMTestingSupport.so.21.0git  lib/libLLVMCodeGen.so.21.0git  lib/libLLVMTarget.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libllvm_gtest.so.21.0git  lib/libLLVMSupport.so.21.0git  -Wl,-rpath-link,/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/build/lib && :
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0x1d2): error: undefined reference to 'llvm::MCTargetOptions::MCTargetOptions()'
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0x200): error: undefined reference to 'llvm::TargetRegistry::targets()'
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0x3fb): error: undefined reference to 'llvm::Triple::Triple(llvm::Twine const&, llvm::Twine const&, llvm::Twine const&)'
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0x4b4): error: undefined reference to 'llvm::MCContext::MCContext(llvm::Triple const&, llvm::MCAsmInfo const*, llvm::MCRegisterInfo const*, llvm::MCSubtargetInfo const*, llvm::SourceMgr const*, llvm::MCTargetOptions const*, bool, llvm::StringRef)'
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0x4c5): error: undefined reference to 'llvm::MCContext::~MCContext()'
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0x785): error: undefined reference to 'llvm::MCContext::~MCContext()'
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0xb66): error: undefined reference to 'llvm::MCContext::~MCContext()'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

llvm-ci avatar Jul 10 '25 12:07 llvm-ci

LLVM Buildbot has detected a new failure on builder llvm-nvptx-nvidia-ubuntu running on as-builder-7 while building llvm at step 6 "test-build-unified-tree-check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-llvm) failure: test (failure)
...
2.116 [2/9/703] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
2.145 [2/8/704] Linking CXX executable unittests/ADT/ADTTests
2.145 [2/7/705] Linking CXX executable unittests/Transforms/Vectorize/SandboxVectorizer/SandboxVectorizerTests
2.158 [2/6/706] Linking CXX executable unittests/Transforms/Utils/UtilsTests
2.165 [2/5/707] Linking CXX executable unittests/IR/IRTests
2.202 [2/4/708] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
2.578 [2/3/709] Linking CXX executable unittests/Support/SupportTests
4.912 [2/2/710] Building CXX object unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/Plugin/CodeGenTestPass.cpp.o
6.921 [2/1/711] Building CXX object unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o
7.027 [1/1/712] Linking CXX executable unittests/CodeGen/CGPluginTest/CGPluginTest
FAILED: unittests/CodeGen/CGPluginTest/CGPluginTest 
: && /usr/bin/c++ -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-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -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 -fuse-ld=gold   -Wl,--export-dynamic   -Wl,--gc-sections unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/Plugin/CodeGenTestPass.cpp.o -o unittests/CodeGen/CGPluginTest/CGPluginTest  -Wl,-rpath,/home/buildbot/worker/as-builder-7/llvm-nvptx-nvidia-ubuntu/build/lib  lib/libLLVMX86CodeGen.so.21.0git  lib/libLLVMX86AsmParser.so.21.0git  lib/libLLVMX86Desc.so.21.0git  lib/libLLVMX86Disassembler.so.21.0git  lib/libLLVMX86Info.so.21.0git  lib/libLLVMNVPTXCodeGen.so.21.0git  lib/libLLVMNVPTXDesc.so.21.0git  lib/libLLVMNVPTXInfo.so.21.0git  lib/libllvm_gtest_main.so.21.0git  lib/libLLVMTestingSupport.so.21.0git  lib/libLLVMCodeGen.so.21.0git  lib/libLLVMTarget.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libllvm_gtest.so.21.0git  lib/libLLVMSupport.so.21.0git  -Wl,-rpath-link,/home/buildbot/worker/as-builder-7/llvm-nvptx-nvidia-ubuntu/build/lib && :
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0x1d2): error: undefined reference to 'llvm::MCTargetOptions::MCTargetOptions()'
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0x200): error: undefined reference to 'llvm::TargetRegistry::targets()'
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0x3fb): error: undefined reference to 'llvm::Triple::Triple(llvm::Twine const&, llvm::Twine const&, llvm::Twine const&)'
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0x4b4): error: undefined reference to 'llvm::MCContext::MCContext(llvm::Triple const&, llvm::MCAsmInfo const*, llvm::MCRegisterInfo const*, llvm::MCSubtargetInfo const*, llvm::SourceMgr const*, llvm::MCTargetOptions const*, bool, llvm::StringRef)'
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0x4c5): error: undefined reference to 'llvm::MCContext::~MCContext()'
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0x785): error: undefined reference to 'llvm::MCContext::~MCContext()'
unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:PluginTest.cpp:function CGPluginTests_ExecuteCallback_Test::TestBody() [clone .localalias]:(.text._ZN34CGPluginTests_ExecuteCallback_Test8TestBodyEv+0xb66): error: undefined reference to 'llvm::MCContext::~MCContext()'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

llvm-ci avatar Jul 10 '25 12:07 llvm-ci

LLVM Buildbot has detected a new failure on builder clang-ppc64le-rhel running on ppc64le-clang-rhel-test while building llvm at step 7 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
...
0.426 [0/3/3] Linking CXX shared library /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/21/lib/powerpc64le-unknown-linux-gnu/libclang_rt.ubsan_standalone.so
0.454 [0/2/4] Linking CXX shared library /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/21/lib/powerpc64le-unknown-linux-gnu/libclang_rt.asan.so
1.289 [0/1/5] Generating /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/compile_commands.json
24.158 [5/3/1222] Building CXX object unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/Plugin/CodeGenTestPass.cpp.o
24.272 [4/2/1223] cd /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/runtimes/runtimes-bins && /home/buildbots/llvm-external-buildbots/cmake-3.31.2/bin/cmake --build /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/runtimes/runtimes-bins/ --target runtimes-test-depends --config Release
ninja: no work to do.
24.339 [3/2/1224] No install step for 'runtimes'
24.362 [2/2/1226] Completed 'runtimes'
26.490 [2/1/1227] Building CXX object unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o
26.558 [1/1/1228] Linking CXX executable unittests/CodeGen/CGPluginTest/CGPluginTest
FAILED: unittests/CodeGen/CGPluginTest/CGPluginTest 
: && /home/buildbots/llvm-external-buildbots/clang.19.1.7/bin/clang++ --gcc-toolchain=/gcc-toolchain/usr -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 -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--color-diagnostics   -Wl,--export-dynamic   -Wl,--gc-sections  -Xlinker --dependency-file=unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/link.d unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/Plugin/CodeGenTestPass.cpp.o -o unittests/CodeGen/CGPluginTest/CGPluginTest  -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib  lib/libLLVMAArch64CodeGen.so.21.0git  lib/libLLVMAArch64AsmParser.so.21.0git  lib/libLLVMAArch64Disassembler.so.21.0git  lib/libLLVMAMDGPUCodeGen.so.21.0git  lib/libLLVMAMDGPUAsmParser.so.21.0git  lib/libLLVMAMDGPUDisassembler.so.21.0git  lib/libLLVMARMCodeGen.so.21.0git  lib/libLLVMARMAsmParser.so.21.0git  lib/libLLVMARMDisassembler.so.21.0git  lib/libLLVMAVRCodeGen.so.21.0git  lib/libLLVMAVRAsmParser.so.21.0git  lib/libLLVMAVRDesc.so.21.0git  lib/libLLVMAVRDisassembler.so.21.0git  lib/libLLVMAVRInfo.so.21.0git  lib/libLLVMBPFCodeGen.so.21.0git  lib/libLLVMBPFAsmParser.so.21.0git  lib/libLLVMBPFDesc.so.21.0git  lib/libLLVMBPFDisassembler.so.21.0git  lib/libLLVMBPFInfo.so.21.0git  lib/libLLVMHexagonCodeGen.so.21.0git  lib/libLLVMHexagonAsmParser.so.21.0git  lib/libLLVMHexagonDisassembler.so.21.0git  lib/libLLVMLanaiCodeGen.so.21.0git  lib/libLLVMLanaiAsmParser.so.21.0git  lib/libLLVMLanaiDisassembler.so.21.0git  lib/libLLVMLoongArchCodeGen.so.21.0git  lib/libLLVMLoongArchAsmParser.so.21.0git  lib/libLLVMLoongArchDisassembler.so.21.0git  lib/libLLVMMipsCodeGen.so.21.0git  lib/libLLVMMipsAsmParser.so.21.0git  lib/libLLVMMipsDesc.so.21.0git  lib/libLLVMMipsDisassembler.so.21.0git  lib/libLLVMMipsInfo.so.21.0git  lib/libLLVMMSP430CodeGen.so.21.0git  lib/libLLVMMSP430AsmParser.so.21.0git  lib/libLLVMMSP430Desc.so.21.0git  lib/libLLVMMSP430Disassembler.so.21.0git  lib/libLLVMMSP430Info.so.21.0git  lib/libLLVMNVPTXCodeGen.so.21.0git  lib/libLLVMNVPTXDesc.so.21.0git  lib/libLLVMNVPTXInfo.so.21.0git  lib/libLLVMPowerPCCodeGen.so.21.0git  lib/libLLVMPowerPCAsmParser.so.21.0git  lib/libLLVMPowerPCDesc.so.21.0git  lib/libLLVMPowerPCDisassembler.so.21.0git  lib/libLLVMPowerPCInfo.so.21.0git  lib/libLLVMRISCVCodeGen.so.21.0git  lib/libLLVMRISCVAsmParser.so.21.0git  lib/libLLVMRISCVDisassembler.so.21.0git  lib/libLLVMSparcCodeGen.so.21.0git  lib/libLLVMSparcAsmParser.so.21.0git  lib/libLLVMSparcDesc.so.21.0git  lib/libLLVMSparcDisassembler.so.21.0git  lib/libLLVMSparcInfo.so.21.0git  lib/libLLVMSPIRVCodeGen.so.21.0git  lib/libLLVMSPIRVDesc.so.21.0git  lib/libLLVMSPIRVInfo.so.21.0git  lib/libLLVMSystemZCodeGen.so.21.0git  lib/libLLVMSystemZAsmParser.so.21.0git  lib/libLLVMSystemZDisassembler.so.21.0git  lib/libLLVMVECodeGen.so.21.0git  lib/libLLVMVEAsmParser.so.21.0git  lib/libLLVMVEDesc.so.21.0git  lib/libLLVMVEDisassembler.so.21.0git  lib/libLLVMVEInfo.so.21.0git  lib/libLLVMWebAssemblyCodeGen.so.21.0git  lib/libLLVMWebAssemblyAsmParser.so.21.0git  lib/libLLVMWebAssemblyDisassembler.so.21.0git  lib/libLLVMWebAssemblyUtils.so.21.0git  lib/libLLVMX86CodeGen.so.21.0git  lib/libLLVMX86AsmParser.so.21.0git  lib/libLLVMX86Desc.so.21.0git  lib/libLLVMX86Disassembler.so.21.0git  lib/libLLVMX86Info.so.21.0git  lib/libLLVMXCoreCodeGen.so.21.0git  lib/libLLVMXCoreDesc.so.21.0git  lib/libLLVMXCoreDisasse
libLLVMAArch64Desc.so.21.0git  lib/libLLVMAArch64Info.so.21.0git  lib/libLLVMAArch64Utils.so.21.0git  lib/libLLVMAMDGPUDesc.so.21.0git  lib/libLLVMAMDGPUInfo.so.21.0git  lib/libLLVMAMDGPUUtils.so.21.0git  lib/libLLVMARMDesc.so.21.0git  lib/libLLVMARMInfo.so.21.0git  lib/libLLVMARMUtils.so.21.0git  lib/libLLVMHexagonDesc.so.21.0git  lib/libLLVMHexagonInfo.so.21.0git  lib/libLLVMLanaiDesc.so.21.0git  lib/libLLVMLanaiInfo.so.21.0git  lib/libLLVMLoongArchDesc.so.21.0git  lib/libLLVMLoongArchInfo.so.21.0git  lib/libLLVMRISCVDesc.so.21.0git  lib/libLLVMRISCVInfo.so.21.0git  lib/libLLVMSystemZDesc.so.21.0git  lib/libLLVMSystemZInfo.so.21.0git  lib/libLLVMWebAssemblyDesc.so.21.0git  lib/libLLVMWebAssemblyInfo.so.21.0git  lib/libLLVMCodeGen.so.21.0git  lib/libLLVMTarget.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libllvm_gtest.so.21.0git  lib/libLLVMSupport.so.21.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::MCTargetOptions::MCTargetOptions()
>>> referenced by PluginTest.cpp
>>>               unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:(CGPluginTests_ExecuteCallback_Test::TestBody())

ld.lld: error: undefined symbol: llvm::TargetRegistry::targets()
>>> referenced by PluginTest.cpp
>>>               unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:(CGPluginTests_ExecuteCallback_Test::TestBody())

ld.lld: error: undefined symbol: llvm::Triple::Triple(llvm::Twine const&, llvm::Twine const&, llvm::Twine const&)
>>> referenced by PluginTest.cpp
>>>               unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:(CGPluginTests_ExecuteCallback_Test::TestBody())

ld.lld: error: undefined symbol: llvm::MCContext::MCContext(llvm::Triple const&, llvm::MCAsmInfo const*, llvm::MCRegisterInfo const*, llvm::MCSubtargetInfo const*, llvm::SourceMgr const*, llvm::MCTargetOptions const*, bool, llvm::StringRef)
>>> referenced by PluginTest.cpp
>>>               unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:(CGPluginTests_ExecuteCallback_Test::TestBody())

ld.lld: error: undefined symbol: llvm::MCContext::~MCContext()
>>> referenced by PluginTest.cpp
>>>               unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:(CGPluginTests_ExecuteCallback_Test::TestBody())
>>> referenced by PluginTest.cpp
>>>               unittests/CodeGen/CGPluginTest/CMakeFiles/CGPluginTest.dir/PluginTest.cpp.o:(CGPluginTests_ExecuteCallback_Test::TestBody())
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

llvm-ci avatar Jul 10 '25 13:07 llvm-ci

https://lab.llvm.org/buildbot/#/builders/186 is flakey https://lab.llvm.org/buildbot/#/builders/160/builds/20849 reproduces JP's issue https://lab.llvm.org/buildbot/#/builders/180/builds/20992 reproduces JP's issue with a different error message https://lab.llvm.org/buildbot/#/builders/145/builds/8276 same here

Adding missing dependencies and reland.

weliveindetail avatar Jul 10 '25 13:07 weliveindetail

https://lab.llvm.org/buildbot/#/builders/10/builds/9136 passed. So far, other fails are bots that flake or fail reliably.

weliveindetail avatar Jul 10 '25 13:07 weliveindetail