[cfe-dev] ARM Linux libc++ / libunwind — Exceptions not being caught

Andrew Brownsword via cfe-dev cfe-dev at lists.llvm.org
Thu Aug 30 14:03:24 PDT 2018


I followed these steps with a couple of caveats:
	* used the (mostly) working clang toolchain I have in place (7.0.0rc2)
	* removed the -mcpu options (don’t know what valid list is)
	* had to prefix sub-project names with llvm/projects/*
	* created build directory in llvm/ (don’t normally like to do that)
	* ninja unwind (no lib prefix)
	* also tried using install-* target; built test program with paths to build dir as well as to the installed locations

Still doesn’t catch the stoul exception.


> My steps were:
> 1.) Build trunk clang to use for building libc++ etc.
> 2.) Using cmake
> 
> cmake -GNinja\
>      /path/to/monorepo/llvm \
>      -DLLVM_ENABLE_PROJECTS="libcxxabi;libcxx;libunwind" \
>      -DCMAKE_BUILD_TYPE=Release \
>      -DLLVM_ENABLE_ASSERTIONS=true\
>      -DCMAKE_C_FLAGS='-mcpu=cortex-a57'\
>      -DCMAKE_CXX_FLAGS='-mcpu=cortex-a57'\
>      -DLLVM_TARGETS_TO_BUILD='ARM'\
>      -DLIBCXXABI_USE_LLVM_UNWINDER=On
> 3.) build
> ninja libunwind
> ninja cxxabi
> ninja cxx
> 
> I was then able to run the example with:
> clang++ --stdlib=libc++ -I ./include/c++/v1 t.cpp -o t.axf -L ./lib -v
> --std=c++17
> LD_LIBRARY_PATH=lib ./t.axf./t.axf
> caught!




More information about the cfe-dev mailing list