Open Zentrik opened 6 months ago
Try setting
"-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON",
"-DCMAKE_C_VISIBILITY_PRESET=hidden",
"-DCMAKE_CXX_VISIBILITY_PRESET=hidden",
Hmm, that seems to have caused llvm to stop building on all platforms. On windows it fails before getting to tblgen-to-irdl
with various errors, the first few are
ninja: job failed: : && /opt/bin/x86_64-w64-mingw32-libgfortran5-cxx11/x86_64-w64-mingw32-clang++ --target=x86_64-w64-mingw32 --sysroot=/opt/x86_64-w64-mingw32/x86_64-w64-mingw32/sys-root/ -remap -D__USING_SJLJ_EXCEPTIONS__ -D__CRT__NO_INLINE -pthread -DMLIR_CAPI_ENABLE_WINDOWS_DLL_DECLSPEC -fvisibility-inlines-hidden -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -O3 -DNDEBUG -Wl,--stack,16777216 -Wl,--gc-sections tools/sanstats/CMakeFiles/sanstats.dir/sanstats.cpp.obj -o bin/sanstats.exe -Wl,--out-implib,lib/libsanstats.dll.a -Wl,--major-image-version,0,--minor-image-version,0 lib/libLLVM-18jl.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && :
clang-16: warning: argument unused during compilation: '-remap' [-Wunused-command-line-argument]
ld.lld: error: undefined symbol: llvm::cl::getGeneralCategory()
>>> referenced by tools/sanstats/CMakeFiles/sanstats.dir/sanstats.cpp.obj:(llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>::opt<llvm::cl::FormattingFlags, llvm::cl::NumOccurrencesFlag, llvm::cl::desc>(llvm::cl::FormattingFlags const&, llvm::cl::NumOccurrencesFlag const&, llvm::cl::desc const&))
>>> referenced by tools/sanstats/CMakeFiles/sanstats.dir/sanstats.cpp.obj:(llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [9], llvm::cl::initializer<bool>, llvm::cl::desc, llvm::cl::cat>(char const (&) [9], llvm::cl::initializer<bool> const&, llvm::cl::desc const&, llvm::cl::cat const&))
ld.lld: error: undefined symbol: llvm::cl::Option::addArgument()
>>> referenced by tools/sanstats/CMakeFiles/sanstats.dir/sanstats.cpp.obj:(llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>::opt<llvm::cl::FormattingFlags, llvm::cl::NumOccurrencesFlag, llvm::cl::desc>(llvm::cl::FormattingFlags const&, llvm::cl::NumOccurrencesFlag const&, llvm::cl::desc const&))
>>> referenced by tools/sanstats/CMakeFiles/sanstats.dir/sanstats.cpp.obj:(llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [9], llvm::cl::initializer<bool>, llvm::cl::desc, llvm::cl::cat>(char const (&) [9], llvm::cl::initializer<bool> const&, llvm::cl::desc const&, llvm::cl::cat const&))
ld.lld: error: undefined symbol: llvm::SmallVectorBase<unsigned int>::grow_pod(void*, unsigned long long, unsigned long long)
>> referenced by tools/sanstats/CMakeFiles/sanstats.dir/sanstats.cpp.obj:(llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>::opt<llvm::cl::FormattingFlags, llvm::cl::NumOccurrencesFlag, llvm::cl::desc>(llvm::cl::FormattingFlags const&, llvm::cl::NumOccurrencesFlag const&, llvm::cl::desc const&))
>>> referenced by tools/sanstats/CMakeFiles/sanstats.dir/sanstats.cpp.obj:(llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [9], llvm::cl::initializer<bool>, llvm::cl::desc, llvm::cl::cat>(char const (&) [9], llvm::cl::initializer<bool> const&, llvm::cl::desc const&, llvm::cl::cat const&))
All logs at https://buildkite.com/julialang/yggdrasil/builds/10220#_.
Looks similar to #58015. I'm pretty sure this is due to
LLVM_LINK_LLVM_DYLIB=ON
and/orLLVM_BUILD_LLVM_DYLIB=ON
but I've hade some trouble getting stuff working locally to test if removing those fixes it. This is using mignw.Here's the error, full log is at https://buildkite.com/julialang/yggdrasil/builds/9311#018e9ae4-d493-4cd6-b026-ea88ed882b02.