[llvm-dev] Failed to configure LLVM for use with Musl
Dmitry Golovin via llvm-dev
llvm-dev at lists.llvm.org
Fri Dec 2 04:57:00 PST 2016
I want to build LLVM-based toolchain with Musl, I have LLVM sources with clang and lld (under `tools` directory) and libunwind, compiler-rt, libcxx and libcxxabi (under `projects` directory). All are the latest versions cloned from GitHub mirror, branch `master`.
I'm trying to configure with the following options:
CLANG_DEFAULT_CXX_STDLIB = libc++
CLANG_DEFAULT_RTLIB = compiler-rt
LIBCXX_CXX_ABI = libcxxabi
LLVM_DEFAULT_TARGET_TRIPLE = x86_64-pc-linux-musl
LIBCXXABI_TARGET_TRIPLE = x86_64-pc-linux-musl
LIBUNWIND_TARGET_TRIPLE = x86_64-pc-linux-musl
DEFAULT_SYSROOT = /path/to/musl
GCC_INSTALL_PREFIX = /path/to/gcc-stub
LLVM_TARGETS_TO_BUILD = X86
LIBCXXABI_USE_COMPILER_RT = ON
LIBCXXABI_USE_LLVM_UNWINDER = ON
LIBCXX_HAS_MUSL_LIBC = ON
LIBCXX_USE_COMPILER_RT = ON
LLVM_ENABLE_LIBCXX = ON
LLVM_ENABLE_LLD = ON
When I try to configure, I get the following error messages:
CMake Warning at cmake/modules/HandleLLVMStdlib.cmake:24 (message):
Can't specify libc++ with '-stdlib='
Call Stack (most recent call first):
cmake/config-ix.cmake:15 (include)
CMakeLists.txt:566 (include)
CMake Error at projects/libunwind/src/CMakeLists.txt:70 (message):
Compiler doesn't support generation of unwind tables if exception support
is disabled. Building libunwind DSO with runtime dependency on C++ ABI
library is not supported.
I'm probably doing something wrong, but I can't figure out what exactly. If I omit some of the flags, I get different errors, but I never get successful configuration.
I'm on Ubuntu 16.04 (if it is important) and have not yet tried on other machines, but I'm pretty sure it is possible to reproduce it.
Regards,
Dmitry Golovin
More information about the llvm-dev
mailing list