[PATCH] D69817: Fix OrcError build with modules enabled.

Volodymyr Sapsai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 18:15:26 PST 2019


vsapsai added a comment.

The error with the notes is

  In module 'std' imported from llvm-project/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h:40:
  host-compiler/bin/../include/c++/v1/memory:3003:32: error: definition of 'JITSymbolNotFound' must be imported from module 'LLVM_ExecutionEngine.Orc.CompileOnDemandLayer' before it is required
      return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...));
                                 ^
  llvm-project/llvm/include/llvm/Support/Error.h:331:21: note: in instantiation of function template specialization 'std::__1::make_unique<llvm::orc::JITSymbolNotFound, const std::__1::basic_string<char> &>' requested here
    return Error(std::make_unique<ErrT>(std::forward<ArgTs>(Args)...));
                      ^
  llvm-project/llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h:130:18: note: in instantiation of function template specialization 'llvm::make_error<llvm::orc::JITSymbolNotFound, const std::__1::basic_string<char> &>' requested here
            return make_error<JITSymbolNotFound>(CtorDtorName);
                   ^
  llvm-project/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp:132:19: note: in instantiation of member function 'llvm::orc::LegacyCtorDtorRunner<llvm::orc::LazyEmittingLayer<llvm::orc::LegacyIRCompileLayer<llvm::orc::LegacyRTDyldObjectLinkingLayer, llvm::orc::SimpleCompiler> > >::runViaLayer' requested here
                   .runViaLayer(LazyEmitLayer));
                    ^
  llvm-project/llvm/include/llvm/ExecutionEngine/Orc/OrcError.h:55:7: note: previous definition is here
  class JITSymbolNotFound : public ErrorInfo<JITSymbolNotFound> {
        ^

To me it looks like symbols from OrcError.h aren't attributed to a single module, so they end up in multiple places and clang fails to reconcile all these multiple copies.

As for reproducing, I was using `python zorg/zorg/jenkins/monorepo_build.py clang build --thinlto '--projects=clang;compiler-rt;libcxx' --cmake-flag=-DLIBCXX_ENABLE_SHARED=OFF --cmake-flag=-DLIBCXX_ENABLE_STATIC=OFF --cmake-flag=-DLIBCXX_INCLUDE_TESTS=OFF`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69817/new/

https://reviews.llvm.org/D69817





More information about the llvm-commits mailing list