Skip to content

Conversation

Bertik23
Copy link
Contributor

This is a second PR on this patch (first #155572), that fixes the linking problem for flang-aarch64-dylib test.

The SupportLSP library was made a component library.


This PR moves the generic Language Server Protocol (LSP) server support code that was copied from clangd into MLIR, into the LLVM tree so it can be reused by multiple subprojects.

Centralizing the generic LSP support in LLVM lowers the barrier to building new LSP servers across the LLVM ecosystem and avoids each subproject maintaining its own copy.

The code originated in clangd and was copied into MLIR for its LSP server. MLIR had this code seperate to be reused by all of their LSP server. This PR relocates the MLIR copy into LLVM as a shared component into LLVM/Support. If this is not a suitable place, please suggest a better one.

A follow up to this move could be deduplication with the original clangd implementation and converge on a single shared LSP support library used by clangd, MLIR, and future servers.
What changes

mlir/include/mlir/Tools/lsp-server-support/{Logging, Protocol, Transport}.h moved to llvm/include/llvm/Support/LSP
mlir/lib/Tools/lsp-server-support/{Logging, Protocol, Transport}.cpp moved to llvm/lib/Support/LSP

and their namespace was changed from mlir to llvm

I ran clang-tidy --fix and clang-format on the whole moved files (last two commits), as they are basically new files and should hold up to the code style used by LLVM.

MLIR LSP servers where updated to include these files from their new location and account for the namespace change.

This PR is made as part of the LLVM IR LSP project (RFC)

@Bertik23 Bertik23 marked this pull request as ready for review September 11, 2025 09:02
@Bertik23
Copy link
Contributor Author

@nikic can I ask for a review?

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

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

Have you confirmed this works with the dylib build?

)
target_link_libraries(LLVMSupportLSPTests
PRIVATE
LLVMSupportLSP)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should also link as component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

${MLIR_MAIN_INCLUDE_DIR}/mlir/Tools/tblgen-lsp-server

LINK_COMPONENTS
SupportLSP
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd add this to LLVM_LINK_COMPONENTS above to avoid mixing two styles.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, sure, missed that

@Bertik23
Copy link
Contributor Author

Yes, I checked that compiling with the same CMake settings as the dylib build linked all fine.

@Bertik23
Copy link
Contributor Author

Thanks for the approve, can you also merge this please? I don't have the permissions to do that.

@nikic nikic enabled auto-merge (squash) September 11, 2025 16:59
@nikic nikic merged commit a3a2599 into llvm:main Sep 11, 2025
9 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 11, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 5 (compile-openmp) failure: build (failure)
...
2.868 [2338/64/2327] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/COFFImportFile.cpp.o
2.868 [2337/64/2328] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/COFFModuleDefinition.cpp.o
2.868 [2336/64/2329] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/COFFObjectFile.cpp.o
2.869 [2335/64/2330] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/Decompressor.cpp.o
2.871 [2334/64/2331] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/DXContainer.cpp.o
2.871 [2333/64/2332] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/ELF.cpp.o
2.872 [2332/64/2333] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/Error.cpp.o
2.872 [2331/64/2334] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/GOFFObjectFile.cpp.o
2.872 [2330/64/2335] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/FaultMapParser.cpp.o
2.873 [2329/64/2336] Linking CXX shared library lib/libLLVMSupportLSP.so.22.0git
FAILED: lib/libLLVMSupportLSP.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMSupportLSP.so.22.0git -o lib/libLLVMSupportLSP.so.22.0git lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Transport.cpp.o lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Logging.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:" && :
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::StringSet<llvm::MallocAllocator>::~StringSet()':
Protocol.cpp:(.text._ZN4llvm9StringSetINS_15MallocAllocatorEED2Ev[_ZN4llvm9StringSetINS_15MallocAllocatorEED5Ev]+0x43): undefined reference to `llvm::deallocate_buffer(void*, unsigned long, unsigned long)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `getSupportedSchemes() [clone .part.0]':
Protocol.cpp:(.text._ZL19getSupportedSchemesv.part.0+0x9d): undefined reference to `llvm::StringMapImpl::hash(llvm::StringRef)'
/usr/bin/ld: Protocol.cpp:(.text._ZL19getSupportedSchemesv.part.0+0xad): undefined reference to `llvm::StringMapImpl::LookupBucketFor(llvm::StringRef, unsigned int)'
/usr/bin/ld: Protocol.cpp:(.text._ZL19getSupportedSchemesv.part.0+0xdd): undefined reference to `llvm::allocate_buffer(unsigned long, unsigned long)'
/usr/bin/ld: Protocol.cpp:(.text._ZL19getSupportedSchemesv.part.0+0x124): undefined reference to `llvm::StringMapImpl::RehashTable(unsigned int)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::Error llvm::handleErrorImpl<llvm::consumeError(llvm::Error)::{lambda(llvm::ErrorInfoBase const&)#1}>(std::unique_ptr<llvm::ErrorInfoBase, std::default_delete<llvm::ErrorInfoBase> >, llvm::consumeError(llvm::Error)::{lambda(llvm::ErrorInfoBase const&)#1}&&) [clone .isra.0]':
Protocol.cpp:(.text._ZN4llvm15handleErrorImplIZNS_12consumeErrorENS_5ErrorEEUlRKNS_13ErrorInfoBaseEE_JEEES1_St10unique_ptrIS2_St14default_deleteIS2_EEOT_DpOT0_.isra.0+0x18): undefined reference to `llvm::ErrorInfoBase::ID'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::raw_ostream::operator<<(char const*)':
Protocol.cpp:(.text._ZN4llvm11raw_ostreamlsEPKc[_ZN4llvm11raw_ostreamlsEPKc]+0x5f): undefined reference to `llvm::raw_ostream::write(char const*, unsigned long)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::Error::~Error()':
Protocol.cpp:(.text._ZN4llvm5ErrorD2Ev[_ZN4llvm5ErrorD5Ev]+0x1d): undefined reference to `llvm::Error::fatalUncheckedError() const'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
Protocol.cpp:(.text._ZN4llvm4json5ValueC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN4llvm4json5ValueC5ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x22): undefined reference to `llvm::json::isUTF8(llvm::StringRef, unsigned long*)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::json::ObjectKey::ObjectKey(char const*)':
Protocol.cpp:(.text._ZN4llvm4json9ObjectKeyC2EPKc[_ZN4llvm4json9ObjectKeyC5EPKc]+0x37): undefined reference to `llvm::json::isUTF8(llvm::StringRef, unsigned long*)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::json::fromJSON(llvm::json::Value const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, llvm::json::Path)':
Protocol.cpp:(.text._ZN4llvm4json8fromJSONERKNS0_5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_4PathE[_ZN4llvm4json8fromJSONERKNS0_5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_4PathE]+0xc2): undefined reference to `llvm::json::Path::report(llvm::StringLiteral)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::URIForFile::scheme() const':
Protocol.cpp:(.text._ZNK4llvm3lsp10URIForFile6schemeEv+0x3f): undefined reference to `llvm::StringRef::find(llvm::StringRef, unsigned long) const'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::URIForFile::registerSupportedScheme(llvm::StringRef)':
Protocol.cpp:(.text._ZN4llvm3lsp10URIForFile23registerSupportedSchemeENS_9StringRefE+0x35): undefined reference to `llvm::StringMapImpl::hash(llvm::StringRef)'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp10URIForFile23registerSupportedSchemeENS_9StringRefE+0x45): undefined reference to `llvm::StringMapImpl::LookupBucketFor(llvm::StringRef, unsigned int)'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp10URIForFile23registerSupportedSchemeENS_9StringRefE+0x91): undefined reference to `llvm::allocate_buffer(unsigned long, unsigned long)'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp10URIForFile23registerSupportedSchemeENS_9StringRefE+0xe0): undefined reference to `llvm::StringMapImpl::RehashTable(unsigned int)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::toJSON(llvm::lsp::URIForFile const&)':
Protocol.cpp:(.text._ZN4llvm3lsp6toJSONERKNS0_10URIForFileE+0x28): undefined reference to `llvm::json::isUTF8(llvm::StringRef, unsigned long*)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::operator<<(llvm::raw_ostream&, llvm::lsp::URIForFile const&)':
Protocol.cpp:(.text._ZN4llvm3lsplsERNS_11raw_ostreamERKNS0_10URIForFileE+0x72): undefined reference to `llvm::raw_ostream::write(char const*, unsigned long)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::fromJSON(llvm::json::Value const&, llvm::lsp::ClientCapabilities&, llvm::json::Path) [clone .localalias]':
Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x29): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x45): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x5e): undefined reference to `llvm::json::Object::getBoolean(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x7e): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x97): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0xb4): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 11, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-sles-build-only running on rocm-worker-hw-04-sles while building llvm,mlir at step 5 "compile-openmp".

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

Here is the relevant piece of the build log for the reference
Step 5 (compile-openmp) failure: build (failure)
...
13.687 [2521/32/4850] Building arm_immcheck_types.inc...
13.689 [2520/32/4851] Building DiagnosticInstallAPIKinds.inc...
13.689 [2519/32/4852] Building arm_sme_builtins.inc...
13.700 [2518/32/4853] Linking CXX static library lib/libMLIRLinalgTransformOps.a
13.701 [2517/32/4854] Building AttrParsedAttrList.inc...
13.702 [2516/32/4855] Building arm_mve_builtin_sema.inc...
13.709 [2515/32/4856] Linking CXX static library lib/libMLIRSPIRVDialect.a
13.710 [2514/32/4857] Building arm_sme_builtin_cg.inc...
13.715 [2513/32/4858] Linking CXX static library lib/libMLIRSparseTensorTransformOps.a
13.716 [2512/32/4859] Linking CXX executable bin/tblgen-lsp-server
FAILED: bin/tblgen-lsp-server 
: && /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-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Wno-unused-but-set-parameter -Wno-deprecated-copy -O3 -DNDEBUG -Wl,-rpath-link,/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./lib  -Wl,--gc-sections tools/mlir/tools/tblgen-lsp-server/CMakeFiles/tblgen-lsp-server.dir/tblgen-lsp-server.cpp.o -o bin/tblgen-lsp-server  -Wl,-rpath,"\$ORIGIN/../lib:"  -lpthread  lib/libTableGenLspServerLib.a  lib/libMLIRLspServerSupportLib.a  lib/libMLIRSupport.a  lib/libLLVMTableGen.a  lib/libLLVMSupport.a  lib/libLLVMDemangle.a  -lrt  -ldl  -lpthread  -lm  /usr/lib64/libz.so  /usr/lib64/libzstd.so  lib/libLLVMSupportLSP.a && :
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: lib/libLLVMSupportLSP.a(Logging.cpp.o): in function `llvm::support::detail::provider_format_adapter<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >&>::format(llvm::raw_ostream&, llvm::StringRef)':
Logging.cpp:(.text._ZN4llvm7support6detail23provider_format_adapterIRNSt6chrono10time_pointINS3_3_V212system_clockENS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEE6formatERNS_11raw_ostreamENS_9StringRefE[_ZN4llvm7support6detail23provider_format_adapterIRNSt6chrono10time_pointINS3_3_V212system_clockENS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEE6formatERNS_11raw_ostreamENS_9StringRefE]+0x5): undefined reference to `llvm::format_provider<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, void>::format(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, llvm::raw_ostream&, llvm::StringRef)'
collect2: error: ld returned 1 exit status
13.723 [2512/31/4860] Linking CXX static library lib/libMLIRSPIRVToLLVMIRTranslation.a
13.724 [2512/30/4861] Building DiagnosticIndexName.inc...
13.725 [2512/29/4862] Building arm_neon.inc...
13.725 [2512/28/4863] Linking CXX static library lib/libMLIRSPIRVModuleCombiner.a
13.734 [2512/27/4864] Building riscv_vector_builtins.inc...
13.742 [2512/26/4865] Building arm_mve_builtin_cg.inc...
13.749 [2512/25/4866] Building arm_sve_sema_rangechecks.inc...
13.752 [2512/24/4867] Linking CXX static library lib/libMLIRSPIRVConversion.a
13.768 [2512/23/4868] Building arm_sve_builtin_cg.inc...
13.780 [2512/22/4869] Building arm_sve_builtins.inc...
13.783 [2512/21/4870] Building riscv_vector_builtin_cg.inc...
13.874 [2512/20/4871] Linking CXX executable bin/tblgen-to-irdl
13.907 [2512/19/4872] Linking CXX executable bin/mlir-minimal-opt
13.919 [2512/18/4873] Building CXX object tools/mlir/test/lib/Transforms/CMakeFiles/MLIRTestTransforms.dir/TestDialectConversion.cpp.o
13.938 [2512/17/4874] Building CXX object tools/mlir/lib/Tools/mlir-pdll-lsp-server/CMakeFiles/MLIRPdllLspServerLib.dir/MlirPdllLspServerMain.cpp.o
14.034 [2512/16/4875] Linking CXX executable bin/mlir-minimal-opt-canonicalize
14.107 [2512/15/4876] Linking CXX static library lib/libMLIRTestDialect.a
14.899 [2512/14/4877] Building CXX object tools/mlir/lib/Tools/mlir-pdll-lsp-server/CMakeFiles/MLIRPdllLspServerLib.dir/LSPServer.cpp.o
15.244 [2512/13/4878] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
16.293 [2512/12/4879] Building AMDGPUGenCallingConv.inc...
16.390 [2512/11/4880] Building AMDGPUGenSubtargetInfo.inc...
17.164 [2512/10/4881] Building AMDGPUGenAsmWriter.inc...
17.320 [2512/9/4882] Building AMDGPUGenSearchableTables.inc...
17.688 [2512/8/4883] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
In file included from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/LTO/LTO.h:24:0,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/lib/LTO/LTO.cpp:13:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/IR/ModuleSummaryIndex.h: In member function ‘llvm::TypeIdSummary& llvm::ModuleSummaryIndex::getOrInsertTypeIdSummary(llvm::StringRef)’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/IR/ModuleSummaryIndex.h:1879:33: warning: unused variable ‘GUID’ [-Wunused-variable]
     for (auto &[GUID, TypeIdPair] : make_range(TidIter))
                                 ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/IR/ModuleSummaryIndex.h: In member function ‘const llvm::TypeIdSummary* llvm::ModuleSummaryIndex::getTypeIdSummary(llvm::StringRef) const’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/IR/ModuleSummaryIndex.h:1893:39: warning: unused variable ‘GUID’ [-Wunused-variable]
     for (const auto &[GUID, TypeIdPair] : make_range(TidIter))
                                       ^

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 11, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/hip-tpl.py --jobs=32' (failure)
...
[1415/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/OptBisect.cpp.o
[1416/8063] Building X86GenRegisterInfo.inc...
[1417/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/PassInstrumentation.cpp.o
[1418/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/PassRegistry.cpp.o
[1419/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/PassManager.cpp.o
[1420/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/PrintPasses.cpp.o
[1421/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/PassTimingInfo.cpp.o
[1422/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/ProfDataUtils.cpp.o
[1423/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/SafepointIRVerifier.cpp.o
[1424/8063] Linking CXX shared library lib/libLLVMSupportLSP.so.22.0git
FAILED: lib/libLLVMSupportLSP.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/hip-third-party-libs-test/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMSupportLSP.so.22.0git -o lib/libLLVMSupportLSP.so.22.0git lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Transport.cpp.o lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Logging.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:" && :
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::StringSet<llvm::MallocAllocator>::~StringSet()':
Protocol.cpp:(.text._ZN4llvm9StringSetINS_15MallocAllocatorEED2Ev[_ZN4llvm9StringSetINS_15MallocAllocatorEED5Ev]+0x43): undefined reference to `llvm::deallocate_buffer(void*, unsigned long, unsigned long)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `getSupportedSchemes() [clone .part.0]':
Protocol.cpp:(.text._ZL19getSupportedSchemesv.part.0+0x9d): undefined reference to `llvm::StringMapImpl::hash(llvm::StringRef)'
/usr/bin/ld: Protocol.cpp:(.text._ZL19getSupportedSchemesv.part.0+0xad): undefined reference to `llvm::StringMapImpl::LookupBucketFor(llvm::StringRef, unsigned int)'
/usr/bin/ld: Protocol.cpp:(.text._ZL19getSupportedSchemesv.part.0+0xdd): undefined reference to `llvm::allocate_buffer(unsigned long, unsigned long)'
/usr/bin/ld: Protocol.cpp:(.text._ZL19getSupportedSchemesv.part.0+0x124): undefined reference to `llvm::StringMapImpl::RehashTable(unsigned int)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::Error llvm::handleErrorImpl<llvm::consumeError(llvm::Error)::{lambda(llvm::ErrorInfoBase const&)#1}>(std::unique_ptr<llvm::ErrorInfoBase, std::default_delete<llvm::ErrorInfoBase> >, llvm::consumeError(llvm::Error)::{lambda(llvm::ErrorInfoBase const&)#1}&&) [clone .isra.0]':
Protocol.cpp:(.text._ZN4llvm15handleErrorImplIZNS_12consumeErrorENS_5ErrorEEUlRKNS_13ErrorInfoBaseEE_JEEES1_St10unique_ptrIS2_St14default_deleteIS2_EEOT_DpOT0_.isra.0+0x18): undefined reference to `llvm::ErrorInfoBase::ID'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::raw_ostream::operator<<(char const*)':
Protocol.cpp:(.text._ZN4llvm11raw_ostreamlsEPKc[_ZN4llvm11raw_ostreamlsEPKc]+0x5f): undefined reference to `llvm::raw_ostream::write(char const*, unsigned long)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::Error::~Error()':
Protocol.cpp:(.text._ZN4llvm5ErrorD2Ev[_ZN4llvm5ErrorD5Ev]+0x1d): undefined reference to `llvm::Error::fatalUncheckedError() const'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
Protocol.cpp:(.text._ZN4llvm4json5ValueC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN4llvm4json5ValueC5ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x22): undefined reference to `llvm::json::isUTF8(llvm::StringRef, unsigned long*)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::json::ObjectKey::ObjectKey(char const*)':
Protocol.cpp:(.text._ZN4llvm4json9ObjectKeyC2EPKc[_ZN4llvm4json9ObjectKeyC5EPKc]+0x37): undefined reference to `llvm::json::isUTF8(llvm::StringRef, unsigned long*)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::json::fromJSON(llvm::json::Value const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, llvm::json::Path)':
Protocol.cpp:(.text._ZN4llvm4json8fromJSONERKNS0_5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_4PathE[_ZN4llvm4json8fromJSONERKNS0_5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_4PathE]+0xc2): undefined reference to `llvm::json::Path::report(llvm::StringLiteral)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::URIForFile::scheme() const':
Protocol.cpp:(.text._ZNK4llvm3lsp10URIForFile6schemeEv+0x3f): undefined reference to `llvm::StringRef::find(llvm::StringRef, unsigned long) const'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::URIForFile::registerSupportedScheme(llvm::StringRef)':
Protocol.cpp:(.text._ZN4llvm3lsp10URIForFile23registerSupportedSchemeENS_9StringRefE+0x35): undefined reference to `llvm::StringMapImpl::hash(llvm::StringRef)'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp10URIForFile23registerSupportedSchemeENS_9StringRefE+0x45): undefined reference to `llvm::StringMapImpl::LookupBucketFor(llvm::StringRef, unsigned int)'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp10URIForFile23registerSupportedSchemeENS_9StringRefE+0x91): undefined reference to `llvm::allocate_buffer(unsigned long, unsigned long)'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp10URIForFile23registerSupportedSchemeENS_9StringRefE+0xe0): undefined reference to `llvm::StringMapImpl::RehashTable(unsigned int)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::toJSON(llvm::lsp::URIForFile const&)':
Protocol.cpp:(.text._ZN4llvm3lsp6toJSONERKNS0_10URIForFileE+0x28): undefined reference to `llvm::json::isUTF8(llvm::StringRef, unsigned long*)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::operator<<(llvm::raw_ostream&, llvm::lsp::URIForFile const&)':
Protocol.cpp:(.text._ZN4llvm3lsplsERNS_11raw_ostreamERKNS0_10URIForFileE+0x72): undefined reference to `llvm::raw_ostream::write(char const*, unsigned long)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::fromJSON(llvm::json::Value const&, llvm::lsp::ClientCapabilities&, llvm::json::Path) [clone .localalias]':
Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x29): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x45): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x5e): undefined reference to `llvm::json::Object::getBoolean(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x7e): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x97): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0xb4): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
Step 7 (build cmake config) failure: build cmake config (failure)
...
[1415/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/OptBisect.cpp.o
[1416/8063] Building X86GenRegisterInfo.inc...
[1417/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/PassInstrumentation.cpp.o
[1418/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/PassRegistry.cpp.o
[1419/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/PassManager.cpp.o
[1420/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/PrintPasses.cpp.o
[1421/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/PassTimingInfo.cpp.o
[1422/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/ProfDataUtils.cpp.o
[1423/8063] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/SafepointIRVerifier.cpp.o
[1424/8063] Linking CXX shared library lib/libLLVMSupportLSP.so.22.0git
FAILED: lib/libLLVMSupportLSP.so.22.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/hip-third-party-libs-test/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libLLVMSupportLSP.so.22.0git -o lib/libLLVMSupportLSP.so.22.0git lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Transport.cpp.o lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Logging.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:" && :
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::StringSet<llvm::MallocAllocator>::~StringSet()':
Protocol.cpp:(.text._ZN4llvm9StringSetINS_15MallocAllocatorEED2Ev[_ZN4llvm9StringSetINS_15MallocAllocatorEED5Ev]+0x43): undefined reference to `llvm::deallocate_buffer(void*, unsigned long, unsigned long)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `getSupportedSchemes() [clone .part.0]':
Protocol.cpp:(.text._ZL19getSupportedSchemesv.part.0+0x9d): undefined reference to `llvm::StringMapImpl::hash(llvm::StringRef)'
/usr/bin/ld: Protocol.cpp:(.text._ZL19getSupportedSchemesv.part.0+0xad): undefined reference to `llvm::StringMapImpl::LookupBucketFor(llvm::StringRef, unsigned int)'
/usr/bin/ld: Protocol.cpp:(.text._ZL19getSupportedSchemesv.part.0+0xdd): undefined reference to `llvm::allocate_buffer(unsigned long, unsigned long)'
/usr/bin/ld: Protocol.cpp:(.text._ZL19getSupportedSchemesv.part.0+0x124): undefined reference to `llvm::StringMapImpl::RehashTable(unsigned int)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::Error llvm::handleErrorImpl<llvm::consumeError(llvm::Error)::{lambda(llvm::ErrorInfoBase const&)#1}>(std::unique_ptr<llvm::ErrorInfoBase, std::default_delete<llvm::ErrorInfoBase> >, llvm::consumeError(llvm::Error)::{lambda(llvm::ErrorInfoBase const&)#1}&&) [clone .isra.0]':
Protocol.cpp:(.text._ZN4llvm15handleErrorImplIZNS_12consumeErrorENS_5ErrorEEUlRKNS_13ErrorInfoBaseEE_JEEES1_St10unique_ptrIS2_St14default_deleteIS2_EEOT_DpOT0_.isra.0+0x18): undefined reference to `llvm::ErrorInfoBase::ID'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::raw_ostream::operator<<(char const*)':
Protocol.cpp:(.text._ZN4llvm11raw_ostreamlsEPKc[_ZN4llvm11raw_ostreamlsEPKc]+0x5f): undefined reference to `llvm::raw_ostream::write(char const*, unsigned long)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::Error::~Error()':
Protocol.cpp:(.text._ZN4llvm5ErrorD2Ev[_ZN4llvm5ErrorD5Ev]+0x1d): undefined reference to `llvm::Error::fatalUncheckedError() const'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
Protocol.cpp:(.text._ZN4llvm4json5ValueC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN4llvm4json5ValueC5ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x22): undefined reference to `llvm::json::isUTF8(llvm::StringRef, unsigned long*)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::json::ObjectKey::ObjectKey(char const*)':
Protocol.cpp:(.text._ZN4llvm4json9ObjectKeyC2EPKc[_ZN4llvm4json9ObjectKeyC5EPKc]+0x37): undefined reference to `llvm::json::isUTF8(llvm::StringRef, unsigned long*)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::json::fromJSON(llvm::json::Value const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, llvm::json::Path)':
Protocol.cpp:(.text._ZN4llvm4json8fromJSONERKNS0_5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_4PathE[_ZN4llvm4json8fromJSONERKNS0_5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_4PathE]+0xc2): undefined reference to `llvm::json::Path::report(llvm::StringLiteral)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::URIForFile::scheme() const':
Protocol.cpp:(.text._ZNK4llvm3lsp10URIForFile6schemeEv+0x3f): undefined reference to `llvm::StringRef::find(llvm::StringRef, unsigned long) const'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::URIForFile::registerSupportedScheme(llvm::StringRef)':
Protocol.cpp:(.text._ZN4llvm3lsp10URIForFile23registerSupportedSchemeENS_9StringRefE+0x35): undefined reference to `llvm::StringMapImpl::hash(llvm::StringRef)'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp10URIForFile23registerSupportedSchemeENS_9StringRefE+0x45): undefined reference to `llvm::StringMapImpl::LookupBucketFor(llvm::StringRef, unsigned int)'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp10URIForFile23registerSupportedSchemeENS_9StringRefE+0x91): undefined reference to `llvm::allocate_buffer(unsigned long, unsigned long)'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp10URIForFile23registerSupportedSchemeENS_9StringRefE+0xe0): undefined reference to `llvm::StringMapImpl::RehashTable(unsigned int)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::toJSON(llvm::lsp::URIForFile const&)':
Protocol.cpp:(.text._ZN4llvm3lsp6toJSONERKNS0_10URIForFileE+0x28): undefined reference to `llvm::json::isUTF8(llvm::StringRef, unsigned long*)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::operator<<(llvm::raw_ostream&, llvm::lsp::URIForFile const&)':
Protocol.cpp:(.text._ZN4llvm3lsplsERNS_11raw_ostreamERKNS0_10URIForFileE+0x72): undefined reference to `llvm::raw_ostream::write(char const*, unsigned long)'
/usr/bin/ld: lib/Support/LSP/CMakeFiles/LLVMSupportLSP.dir/Protocol.cpp.o: in function `llvm::lsp::fromJSON(llvm::json::Value const&, llvm::lsp::ClientCapabilities&, llvm::json::Path) [clone .localalias]':
Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x29): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x45): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x5e): undefined reference to `llvm::json::Object::getBoolean(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x7e): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0x97): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'
/usr/bin/ld: Protocol.cpp:(.text._ZN4llvm3lsp8fromJSONERKNS_4json5ValueERNS0_18ClientCapabilitiesENS1_4PathE+0xb4): undefined reference to `llvm::json::Object::getObject(llvm::StringRef) const'

alanzhao1 pushed a commit to alanzhao1/llvm-project that referenced this pull request Sep 11, 2025
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 11, 2025
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 11, 2025

LLVM Buildbot has detected a new failure on builder flang-aarch64-out-of-tree running on linaro-flang-aarch64-out-of-tree while building llvm,mlir at step 6 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 6 (build-unified-tree) failure: build (failure)
...
996.440 [1445/3/5210] Linking CXX static library lib/libMLIRTestTransforms.a
996.483 [1445/2/5211] Building CXX object tools/mlir/tools/mlir-opt/CMakeFiles/MLIRMlirOptMain.dir/mlir-opt.cpp.o
996.494 [1444/2/5212] Building CXX object tools/mlir/tools/mlir-opt/CMakeFiles/mlir-opt.dir/mlir-opt.cpp.o
996.726 [1441/4/5213] Linking CXX static library lib/libMLIRMlirOptMain.a
997.249 [1441/3/5214] Linking CXX executable bin/mlir-bytecode-parser-fuzzer
998.017 [1438/5/5215] Linking CXX executable bin/mlir-text-parser-fuzzer
998.231 [1433/9/5216] Building CXX object tools/mlir/tools/tblgen-lsp-server/CMakeFiles/tblgen-lsp-server.dir/tblgen-lsp-server.cpp.o
998.234 [1433/8/5217] Building CXX object tools/mlir/tools/mlir-translate/CMakeFiles/mlir-translate.dir/mlir-translate.cpp.o
998.253 [1433/7/5218] Building CXX object tools/mlir/tools/tblgen-to-irdl/CMakeFiles/tblgen-to-irdl.dir/tblgen-to-irdl.cpp.o
998.306 [1433/6/5219] Linking CXX executable bin/mlir-pdll-lsp-server
FAILED: bin/mlir-pdll-lsp-server 
: && /usr/local/bin/c++ -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 -Wundef -Werror=mismatched-tags -O3 -DNDEBUG -Wl,-rpath-link,/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/build_llvm/./lib  -Wl,--gc-sections tools/mlir/tools/mlir-pdll-lsp-server/CMakeFiles/mlir-pdll-lsp-server.dir/mlir-pdll-lsp-server.cpp.o -o bin/mlir-pdll-lsp-server  -Wl,-rpath,"\$ORIGIN/../lib:"  lib/libMLIRPdllLspServerLib.a  lib/libMLIRPDLLCodeGen.a  lib/libMLIRParser.a  lib/libMLIRBytecodeReader.a  lib/libMLIRAsmParser.a  lib/libMLIRPDLDialect.a  lib/libMLIRInferTypeOpInterface.a  lib/libMLIRSideEffectInterfaces.a  lib/libMLIRIR.a  lib/libMLIRPDLLParser.a  lib/libMLIRPDLLAST.a  lib/libMLIRPDLLODS.a  lib/libMLIRTableGen.a  lib/libLLVMTableGen.a  lib/libMLIRLspServerSupportLib.a  lib/libMLIRSupport.a  lib/libLLVMSupport.a  -lrt  -ldl  -lm  /usr/lib/aarch64-linux-gnu/libz.so  lib/libLLVMDemangle.a  lib/libLLVMSupportLSP.a && :
/usr/bin/ld: lib/libLLVMSupportLSP.a(Logging.cpp.o): in function `llvm::support::detail::provider_format_adapter<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >&>::format(llvm::raw_ostream&, llvm::StringRef)':
Logging.cpp:(.text._ZN4llvm7support6detail23provider_format_adapterIRNSt6chrono10time_pointINS3_3_V212system_clockENS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEE6formatERNS_11raw_ostreamENS_9StringRefE[_ZN4llvm7support6detail23provider_format_adapterIRNSt6chrono10time_pointINS3_3_V212system_clockENS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEE6formatERNS_11raw_ostreamENS_9StringRefE]+0x4): undefined reference to `llvm::format_provider<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, void>::format(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, llvm::raw_ostream&, llvm::StringRef)'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
1019.072 [1433/5/5220] Linking CXX executable bin/mlir-rewrite
1019.285 [1433/4/5221] Linking CXX executable bin/mlir-query
1021.386 [1433/3/5222] Linking CXX executable bin/mlir-lsp-server
1023.207 [1433/2/5223] Linking CXX executable bin/mlir-reduce
1024.989 [1433/1/5224] Linking CXX executable bin/mlir-opt
ninja: build stopped: subcommand failed.

@mgorny

This comment was marked as resolved.

@mgorny

This comment was marked as resolved.

@mgorny
Copy link
Member

mgorny commented Sep 13, 2025

Unfortunately, according to git bisect, this change is also responsible for the following test regression:

FAIL: MLIR :: mlir-pdll-lsp-server/view-output.test (2448 of 3394)
******************** TEST 'MLIR :: mlir-pdll-lsp-server/view-output.test' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
mlir-pdll-lsp-server -lit-test < /var/tmp/portage/llvm-core/mlir-22.0.0.9999/work/mlir/test/mlir-pdll-lsp-server/view-output.test | /usr/lib/llvm/22/bin/FileCheck -strict-whitespace /var/tmp/portage/llvm-core/mlir-22.0.0.9999/work/mlir/test/mlir-pdll-lsp-server/view-output.test
# executed command: mlir-pdll-lsp-server -lit-test
# .---command stderr------------
# | I[10:15:47.338] --> initialize(0)
# | I[10:15:47.339] --> reply:initialize(0)
# | D[10:15:47.339] >>> {
# |   "id": 0,
# |   "jsonrpc": "2.0",
# |   "result": {
# |     "capabilities": {
# |       "completionProvider": {
# |         "allCommitCharacters": [
# |           "\t",
# |           "(",
# |           ")",
# |           "[",
# |           "]",
# |           "{",
# |           "}",
# |           "<",
# |           ">",
# |           ":",
# |           ";",
# |           ",",
# |           "+",
# |           "-",
# |           "/",
# |           "*",
# |           "%",
# |           "^",
# |           "&",
# |           "#",
# |           "?",
# |           ".",
# |           "=",
# |           "\"",
# |           "'",
# |           "|"
# |         ],
# |         "resolveProvider": false,
# |         "triggerCharacters": [
# |           ".",
# |           ">",
# |           "(",
# |           "{",
# |           ",",
# |           "<",
# |           ":",
# |           "[",
# |           " ",
# |           "\"",
# |           "/"
# |         ]
# |       },
# |       "definitionProvider": true,
# |       "documentLinkProvider": {
# |         "resolveProvider": false
# |       },
# |       "documentSymbolProvider": true,
# |       "hoverProvider": true,
# |       "inlayHintProvider": true,
# |       "referencesProvider": true,
# |       "signatureHelpProvider": {
# |         "triggerCharacters": [
# |           "(",
# |           ","
# |         ]
# |       },
# |       "textDocumentSync": {
# |         "change": 2,
# |         "openClose": true,
# |         "save": true
# |       }
# |     },
# |     "serverInfo": {
# |       "name": "mlir-pdll-lsp-server",
# |       "version": "0.0.1"
# |     }
# |   }
# | }
# | 
# | 
# | I[10:15:47.339] --> textDocument/didOpen
# | I[10:15:47.339] --> textDocument/publishDiagnostics
# | D[10:15:47.339] >>> {
# |   "jsonrpc": "2.0",
# |   "method": "textDocument/publishDiagnostics",
# |   "params": {
# |     "diagnostics": [],
# |     "uri": "test:///foo.pdll",
# |     "version": 1
# |   }
# | }
# | 
# | 
# | I[10:15:47.339] --> pdll/viewOutput(1)
# | I[10:15:47.339] --> reply:pdll/viewOutput(1): -32602: failed to decode pdll/viewOutput request: missing value at (root).uri
# | D[10:15:47.339] >>> {
# |   "error": {
# |     "code": -32602,
# |     "message": "failed to decode pdll/viewOutput request: missing value at (root).uri"
# |   },
# |   "id": 1,
# |   "jsonrpc": "2.0"
# | }
# | 
# | 
# | I[10:15:47.339] --> pdll/viewOutput(2)
# | I[10:15:47.339] --> reply:pdll/viewOutput(2): -32602: failed to decode pdll/viewOutput request: missing value at (root).uri
# | D[10:15:47.339] >>> {
# |   "error": {
# |     "code": -32602,
# |     "message": "failed to decode pdll/viewOutput request: missing value at (root).uri"
# |   },
# |   "id": 2,
# |   "jsonrpc": "2.0"
# | }
# | 
# | 
# | I[10:15:47.339] --> pdll/viewOutput(3)
# | I[10:15:47.339] --> reply:pdll/viewOutput(3): -32602: failed to decode pdll/viewOutput request: missing value at (root).uri
# | D[10:15:47.339] >>> {
# |   "error": {
# |     "code": -32602,
# |     "message": "failed to decode pdll/viewOutput request: missing value at (root).uri"
# |   },
# |   "id": 3,
# |   "jsonrpc": "2.0"
# | }
# | 
# | 
# | I[10:15:47.339] --> shutdown(3)
# | I[10:15:47.339] --> reply:shutdown(3)
# | D[10:15:47.339] >>> {
# |   "id": 3,
# |   "jsonrpc": "2.0",
# |   "result": null
# | }
# | 
# | 
# | I[10:15:47.339] --> exit
# `-----------------------------
# executed command: /usr/lib/llvm/22/bin/FileCheck -strict-whitespace /var/tmp/portage/llvm-core/mlir-22.0.0.9999/work/mlir/test/mlir-pdll-lsp-server/view-output.test
# .---command stderr------------
# | /var/tmp/portage/llvm-core/mlir-22.0.0.9999/work/mlir/test/mlir-pdll-lsp-server/view-output.test:16:17: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT:  "jsonrpc": "2.0",
# |                 ^
# | <stdin>:123:3: note: 'next' match was here
# |   "jsonrpc": "2.0",
# |   ^
# | <stdin>:96:10: note: previous match ended here
# |   "id": 1,
# |          ^
# | <stdin>:97:1: note: non-matching line after previous match is here
# |   "jsonrpc": "2.0"
# | ^
# | 
# | Input file: <stdin>
# | Check file: /var/tmp/portage/llvm-core/mlir-22.0.0.9999/work/mlir/test/mlir-pdll-lsp-server/view-output.test
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |          .
# |          .
# |          .
# |        118: } 
# |        119: Content-Length: 52 
# |        120:  
# |        121: { 
# |        122:   "id": 3, 
# |        123:   "jsonrpc": "2.0", 
# | next:16       !~~~~~~~~~~~~~~~~  error: match on wrong line
# |        124:   "result": null 
# |        125: } 
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

********************

Full logs (with CMake invocations, etc.):

// mapping and erase it.
ResponseHandlerTy ResponseHandler;
{
std::lock_guard<std::mutex> responseHandlersLock(ResponseHandlerTy);
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Bertik23 @nikic I'm seeing MSVC warnings from this line:

E:\llvm\llvm-project\llvm\lib\Support\LSP\Transport.cpp(123): warning C4930: 'std::lock_guard<std::mutex> responseHandlersLock(llvm::lsp::MessageHandler::ResponseHandlerTy)': prototyped function not called (was a variable definition intended?)

Should it be this instead?

std::lock_guard<std::mutex> responseHandlersLock(ResponseHandler);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prior to me running clang-tidy on that file it was

std::lock_guard<std::mutex> responseHandlersLock(ResponseHandlersMutex);

so I'd change it back to that
PR ready #158666

@mgorny
Copy link
Member

mgorny commented Sep 15, 2025

@Bertik23, could you help with that test regression too?

@Bertik23
Copy link
Contributor Author

@mgorny yes, I'm looking into it, but I was not yet able to reproduce the issue

@mgorny
Copy link
Member

mgorny commented Sep 16, 2025

I can try to help (since I can reproduce it reliably), but I'd need some hints what to look at. The tests look quite opaque to me.

@JanJecmen
Copy link
Contributor

@mgorny Would it be possible to get the actual output of the test by running /path/to/mlir-pdll-lsp-server -lit-test < ./mlir/test/mlir-pdll-lsp-server/view-output.test and posting it here? Then we can compare with the lit test source to see how the expected output differs.

This is a strange failure because the PR should be NFC, just moving code to a different place. Either something really got broken, or it could be some small detail, perhaps the JSON object being serialized in a different order? I checked and it uses DenseMap as storage, and AFAICT there is no guarantee about preserving insertion order.

@mgorny
Copy link
Member

mgorny commented Sep 16, 2025

@mgorny Would it be possible to get the actual output of the test by running /path/to/mlir-pdll-lsp-server -lit-test < ./mlir/test/mlir-pdll-lsp-server/view-output.test and posting it here? Then we can compare with the lit test source to see how the expected output differs.

Isn't that the first big block in the test output? I'm pretty sure when I ran it manually, I got the same thing. I can recheck in a few minutes.

@mgorny
Copy link
Member

mgorny commented Sep 16, 2025

Yep. Here's the output from a different (amd64) machine:

# ./bin/mlir-pdll-lsp-server -lit-test < ../mlir/test/mlir-pdll-lsp-server/view-output.test
I[13:43:42.789] --> initialize(0)
I[13:43:42.790] --> reply:initialize(0)
Content-Length: 1344

{
  "id": 0,
  "jsonrpc": "2.0",
  "result": {
    "capabilities": {
      "completionProvider": {
        "allCommitCharacters": [
          "\t",
          "(",
          ")",
          "[",
          "]",
          "{",
          "}",
          "<",
          ">",
          ":",
          ";",
          ",",
          "+",
          "-",
          "/",
          "*",
          "%",
          "^",
          "&",
          "#",
          "?",
          ".",
          "=",
          "\"",
          "'",
          "|"
        ],
        "resolveProvider": false,
        "triggerCharacters": [
          ".",
          ">",
          "(",
          "{",
          ",",
          "<",
          ":",
          "[",
          " ",
          "\"",
          "/"
        ]
      },
      "definitionProvider": true,
      "documentLinkProvider": {
        "resolveProvider": false
      },
      "documentSymbolProvider": true,
      "hoverProvider": true,
      "inlayHintProvider": true,
      "referencesProvider": true,
      "signatureHelpProvider": {
        "triggerCharacters": [
          "(",
          ","
        ]
      },
      "textDocumentSync": {
        "change": 2,
        "openClose": true,
        "save": true
      }
    },
    "serverInfo": {
      "name": "mlir-pdll-lsp-server",
      "version": "0.0.1"
    }
  }
}
D[13:43:42.790] >>> {
  "id": 0,
  "jsonrpc": "2.0",
  "result": {
    "capabilities": {
      "completionProvider": {
        "allCommitCharacters": [
          "\t",
          "(",
          ")",
          "[",
          "]",
          "{",
          "}",
          "<",
          ">",
          ":",
          ";",
          ",",
          "+",
          "-",
          "/",
          "*",
          "%",
          "^",
          "&",
          "#",
          "?",
          ".",
          "=",
          "\"",
          "'",
          "|"
        ],
        "resolveProvider": false,
        "triggerCharacters": [
          ".",
          ">",
          "(",
          "{",
          ",",
          "<",
          ":",
          "[",
          " ",
          "\"",
          "/"
        ]
      },
      "definitionProvider": true,
      "documentLinkProvider": {
        "resolveProvider": false
      },
      "documentSymbolProvider": true,
      "hoverProvider": true,
      "inlayHintProvider": true,
      "referencesProvider": true,
      "signatureHelpProvider": {
        "triggerCharacters": [
          "(",
          ","
        ]
      },
      "textDocumentSync": {
        "change": 2,
        "openClose": true,
        "save": true
      }
    },
    "serverInfo": {
      "name": "mlir-pdll-lsp-server",
      "version": "0.0.1"
    }
  }
}


I[13:43:42.790] --> textDocument/didOpen
I[13:43:42.790] --> textDocument/publishDiagnostics
Content-Length: 160

{
  "jsonrpc": "2.0",
  "method": "textDocument/publishDiagnostics",
  "params": {
    "diagnostics": [],
    "uri": "test:///foo.pdll",
    "version": 1
  }
}
D[13:43:42.790] >>> {
  "jsonrpc": "2.0",
  "method": "textDocument/publishDiagnostics",
  "params": {
    "diagnostics": [],
    "uri": "test:///foo.pdll",
    "version": 1
  }
}


I[13:43:42.790] --> pdll/viewOutput(1)
I[13:43:42.790] --> reply:pdll/viewOutput(1): -32602: failed to decode pdll/viewOutput request: missing value at (root).uri
Content-Length: 159

{
  "error": {
    "code": -32602,
    "message": "failed to decode pdll/viewOutput request: missing value at (root).uri"
  },
  "id": 1,
  "jsonrpc": "2.0"
}
D[13:43:42.790] >>> {
  "error": {
    "code": -32602,
    "message": "failed to decode pdll/viewOutput request: missing value at (root).uri"
  },
  "id": 1,
  "jsonrpc": "2.0"
}


I[13:43:42.790] --> pdll/viewOutput(2)
I[13:43:42.790] --> reply:pdll/viewOutput(2): -32602: failed to decode pdll/viewOutput request: missing value at (root).uri
Content-Length: 159

{
  "error": {
    "code": -32602,
    "message": "failed to decode pdll/viewOutput request: missing value at (root).uri"
  },
  "id": 2,
  "jsonrpc": "2.0"
}
D[13:43:42.790] >>> {
  "error": {
    "code": -32602,
    "message": "failed to decode pdll/viewOutput request: missing value at (root).uri"
  },
  "id": 2,
  "jsonrpc": "2.0"
}


I[13:43:42.790] --> pdll/viewOutput(3)
I[13:43:42.790] --> reply:pdll/viewOutput(3): -32602: failed to decode pdll/viewOutput request: missing value at (root).uri
Content-Length: 159

{
  "error": {
    "code": -32602,
    "message": "failed to decode pdll/viewOutput request: missing value at (root).uri"
  },
  "id": 3,
  "jsonrpc": "2.0"
}
D[13:43:42.790] >>> {
  "error": {
    "code": -32602,
    "message": "failed to decode pdll/viewOutput request: missing value at (root).uri"
  },
  "id": 3,
  "jsonrpc": "2.0"
}


I[13:43:42.790] --> shutdown(3)
I[13:43:42.790] --> reply:shutdown(3)
Content-Length: 52

{
  "id": 3,
  "jsonrpc": "2.0",
  "result": null
}
D[13:43:42.790] >>> {
  "id": 3,
  "jsonrpc": "2.0",
  "result": null
}


I[13:43:42.790] --> exit

@JanJecmen
Copy link
Contributor

Not quite sure. I was looking lower at the last chunk which lists the FileCheck stderr, and that one says Input was: ... but the first 100 lines of it are omitted. It lists also a Content-Length line which is not present in the top chunk.

@JanJecmen
Copy link
Contributor

Ah thanks for the output. I guess only stdout is piped to filecheck, that's why the content length is not in the second chunk.

@JanJecmen
Copy link
Contributor

Somehow, we started returning errors when previously there were normal results.

Expected:

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "output": "-Module{{.*}}PatternDecl{{.*}}Name<TestPat>{{.*}}\n"
  }
}

Actual:

{
  "error": {
    "code": -32602,
    "message": "failed to decode pdll/viewOutput request: missing value at (root).uri"
  },
  "id": 1,
  "jsonrpc": "2.0"
}

@mgorny
Copy link
Member

mgorny commented Sep 16, 2025

What I really don't get is where is the input it's supposed to process (i.e. the thing missing (root).uri).

@JanJecmen
Copy link
Contributor

This is the json that is sent to the lsp server:

{"jsonrpc":"2.0","id":1,"method":"pdll/viewOutput","params":{
  "uri":"test:///foo.pdll",
  "kind":"ast"
}}

and it should find the uri in the params object but somehow doesn't. Wondering if root is the top-level object or the params.

But in any case, I don't understand how this patch could cause this. I must be missing something...

@mgorny
Copy link
Member

mgorny commented Sep 16, 2025

Oh! I was looking for an actual foo.pdll, and to be honest my first thought is that the file got moved and the tests can't find it anymore.

Yeah, it's weird. I've checked twice, but I'll check one more time, just in case.

@JanJecmen
Copy link
Contributor

JanJecmen commented Sep 16, 2025

It seems to me there is no actual file foo.pdll, there is instead a message that tells the server that a file foo.pdll was opened and what the contents are:

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{
  "uri":"test:///foo.pdll",
  "languageId":"pdll",
  "version":1,
  "text":"Pattern TestPat => erase op<test.op>;"
}}}

@mgorny
Copy link
Member

mgorny commented Sep 16, 2025

Shit, I'm sorry — I think I've messed up the bisect after all.

@mgorny
Copy link
Member

mgorny commented Sep 16, 2025

Okay, in my defense, I didn't screw up the bisect. This is some kind nasty bug. It is triggered by this commit on arm64, but on amd64 it happens prior to that. I'll try to bisect further there, but I suspect I won't find anything meaningful either.

@mgorny
Copy link
Member

mgorny commented Sep 17, 2025

I think I see a potential cause:

[2193/2323] : && /usr/lib/ccache/bin/aarch64-unknown-linux-gnu-g++ -O2 -pipe -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-dangling-reference -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 -Wundef -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs    -Wl,-rpath-link,/var/tmp/portage/llvm-core/mlir-22.0.0.9999/work/mlir_build-.arm64/./lib64  -Wl,--gc-sections  -Wl,--dependency-file=tools/mlir-pdll-lsp-server/CMakeFiles/mlir-pdll-lsp-server.dir/link.d tools/mlir-pdll-lsp-server/CMakeFiles/mlir-pdll-lsp-server.dir/mlir-pdll-lsp-server.cpp.o -o bin/mlir-pdll-lsp-server  -Wl,-rpath,"\$ORIGIN/../lib64:/usr/lib/llvm/22/lib64:"  lib64/libMLIRPdllLspServerLib.a  lib64/libMLIRPDLLCodeGen.a  lib64/libMLIRParser.a  lib64/libMLIRBytecodeReader.a  lib64/libMLIRAsmParser.a  lib64/libMLIRPDLDialect.a  lib64/libMLIRInferTypeOpInterface.a  lib64/libMLIRSideEffectInterfaces.a  lib64/libMLIRIR.a  lib64/libMLIRPDLLParser.a  lib64/libMLIRPDLLAST.a  lib64/libMLIRPDLLODS.a  lib64/libMLIRTableGen.a  /usr/lib/llvm/22/lib64/libLLVMTableGen.a  /usr/lib/llvm/22/lib64/libLLVMSupport.a  -lrt  -ldl  -lm  /usr/lib64/libz3.so  /usr/lib64/libz.so  /usr/lib64/libzstd.so  /usr/lib/llvm/22/lib64/libLLVMDemangle.a  lib64/libMLIRLspServerSupportLib.a  lib64/libMLIRSupport.a  /usr/lib/llvm/22/lib64/libLLVM.so.22.0git5c717105 && :

mlir-pdll-lsp-server ends up linking to libLLVM*.a and libLLVM.so simultaneously, which is bound to create random corruption.

aganea added a commit that referenced this pull request Sep 22, 2025
When building with latest MSVC on Windows, this fixes some compile-time
warnings from last week's integration in
#157885:
```
[321/5941] Building CXX object lib\Support\LSP\CMakeFiles\LLVMSupportLSP.dir\Transport.cpp.obj
C:\git\llvm-project\llvm\lib\Support\LSP\Transport.cpp(123): warning C4930: 'std::lock_guard<std::mutex> responseHandlersLock(llvm::lsp::MessageHandler::ResponseHandlerTy)': prototyped function not called (was a variable definition intended?)
[384/5941] Building CXX object unittests\Support\LSP\CMakeFiles\LLVMSupportLSPTests.dir\Transport.cpp.obj
C:\git\llvm-project\llvm\unittests\Support\LSP\Transport.cpp(190): warning C4804: '+=': unsafe use of type 'bool' in operation
```
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 22, 2025
When building with latest MSVC on Windows, this fixes some compile-time
warnings from last week's integration in
llvm/llvm-project#157885:
```
[321/5941] Building CXX object lib\Support\LSP\CMakeFiles\LLVMSupportLSP.dir\Transport.cpp.obj
C:\git\llvm-project\llvm\lib\Support\LSP\Transport.cpp(123): warning C4930: 'std::lock_guard<std::mutex> responseHandlersLock(llvm::lsp::MessageHandler::ResponseHandlerTy)': prototyped function not called (was a variable definition intended?)
[384/5941] Building CXX object unittests\Support\LSP\CMakeFiles\LLVMSupportLSPTests.dir\Transport.cpp.obj
C:\git\llvm-project\llvm\unittests\Support\LSP\Transport.cpp(190): warning C4804: '+=': unsafe use of type 'bool' in operation
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants