The following options were used:
-DBOOTSTRAP_LLVM_ENABLE_LLD
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_LINKER=lld
-DCMAKE_LINK_EXECUTABLE="/usr/bin/ld.lld"
-DCMAKE_AR="/usr/bin/llvm-ar"
-DCMAKE_AS="/usr/bin/llvm-as"
-DCLANG_DEFAULT_LINKER=lld
-DCLANG_DEFAULT_RTLIB=compiler-rt
-DCLANG_ENABLE_BOOTSTRAP=ON
-DLIBCXX_USE_COMPILER_RT=ON
-DLIBCXXABI_USE_COMPILER_RT=ON
-DLLVM_ENABLE_LLD=ON
-DLLVM_ENABLE_LIBCXX=ON
However, the build fails with (many of those error messages):
[1274/2712] Linking CXX shared library lib/libc++abi.so.1.0
FAILED: lib/libc++abi.so.1.
/usr/bin/ld.lld: error: undefined symbol: _Unwind_Resume
>>> referenced by ld-temp.o
>>> lto.tmp:(__cxa_demangle)
Can anyone please tell me what I am doing wrong and how I can fix the
build?
Regards
Andreas
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Maybe this warning is also interesting?
[9/10] Linking CXX shared
library /tmp/makepkg/llvm/src/llvm-6.0.0.src/build/lib/libunwind.so.1.0
clang-6.0: warning: argument unused during compilation:
'-rtlib=compiler-rt' [-Wunused-command-line-argument]
This argument was added by -DLIBUNWIND_USE_COMPILER_RT=ON which you
explained, it's strange that it is unused.
The final error again is libcxxabi:
[2715/2724] Linking CXX shared library lib/libc++abi.so.1.0
FAILED: lib/libc++abi.so.1.0
I experienced the similar issue
http://lists.llvm.org/pipermail/llvm-dev/2018-May/123079.html
When building LLVM toolchain with clang-9 + binutils/ld:
CMakeFiles/SecondLib.dir/PipSqueak.cpp.o: In function `SetStrings':
PipSqueak.cpp:(.text.SetStrings+0xc8): undefined reference to
`_Unwind_Resume'
----- 8< -------- 8< -------- 8< -------- 8< -------- 8< -------- 8< ---
Andreas said he got the *same* errors at the end of the build process
even added those options suggested by Petr.
And there was already a bug report several years ago
https://bugs.llvm.org/show_bug.cgi?id=28681
But why no response about Yuanfang's work? https://reviews.llvm.org/D53553
My cmake option mentioned here
http://lists.llvm.org/pipermail/llvm-dev/2019-January/129380.html
Regards,
Leslie Zhai