[cfe-dev] Building clang 5 (for coroutines)
Kirit Sælensminde via cfe-dev
cfe-dev at lists.llvm.org
Wed Jun 14 23:51:38 PDT 2017
On 15/06/17 13:37, Eric Fiselier wrote:
> Have you seen this documentation:
> http://libcxx.llvm.org/docs/BuildingLibcxx.html#id3 ?
I hadn't, but I don't see that it's telling me anything I'm not doing:
mkdir svn
cd svn
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx
svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk libcxxabi
mkdir ../build
cd ../build
cmake ../svn/llvm -DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="llvm;clang;libcxx;libcxxabi"
make cxxabi # works
make cxx # Fails
I just ran those exact steps on another machine than the one I normally
use, and get the same errors, which end with this:
vector.cpp:(.text._ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv[_ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv]+0xc):
undefined reference to `__cxa_allocate_exception'
vector.cpp:(.text._ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv[_ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv]+0x42):
undefined reference to `__cxa_throw'
vector.cpp:(.text._ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv[_ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv]+0x4d):
undefined reference to `__cxa_free_exception'
collect2: error: ld returned 1 exit status
make[3]: *** [lib/libc++.so.1.0] Error 1
make[2]: *** [projects/libcxx/lib/CMakeFiles/cxx_shared.dir/all] Error 2
make[1]: *** [projects/libcxx/lib/CMakeFiles/cxx.dir/rule] Error 2
make: *** [cxx] Error 2
I see that there is an extra bit under 5 about how to specify where
libcxxabi is, so next I'm going to try to see if I build it and install
it then I can work out what the right incantation is to get it to use that.
Kirit
More information about the cfe-dev
mailing list