[cfe-dev] [libcxxabi] Contributing ARM EHABI support for libcxxabi
Nico Weber
thakis at chromium.org
Wed Dec 4 12:11:57 PST 2013
On Tue, Dec 3, 2013 at 3:45 PM, Nick Kledzik <kledzik at apple.com> wrote:
>
> On Dec 3, 2013, at 2:32 PM, Nico Weber <thakis at chromium.org> wrote:
>
> > Hi,
> >
> > We’re evaluating using libc++ and libc++abi for Chromium/Android. While
> libc++abi has an unwind implementation since r192136, we noticed that
> there’s no support for unwinding using ARM EHABI-style unwind information,
> so in the last two weeks some of us (Albert Wong, Antoine Labour, Dana
> Jansens, and I) prototyped support for it, and we’re able to catch at least
> simple exceptions (you can look at our code here [1]). We believe at least
> some of our code is ready for upstreaming.
> >
> > A few questions:
> > 1.) Is there interest for this upstream?
> > 2.) Who should review this? Howard? Nick? Anton?
> I can.
>
> > 3.) r192136 didn’t add any test – how should testing of unwinding code
> work? Is running the exception tests in the libc++ suite enough?
> The Darwin libunwind project (
> http://opensource.apple.com/source/libunwind/libunwind-35.3/) on which
> this was based had some a small test suite, but it did not fit into the
> existing libcxxabi test suite which assumes target==host and every test is
> one .cpp file.
>
Ok. I tried running at least the libc++abi test suite to make sure we don't
completely break exception handling on darwin, but it looks like the
buildit script doesn't build libunwind, and if I try to get it to compile
(attached), the compiler complains about mach-o/dyld_priv.h – is it
currently possible to run libc++abi tests for the Unwind bits of libc++abi
on darwin?
>
> > 4.) The unwind code doesn’t adhere to llvm style all that much – does it
> make sense to clang-format while it still has next to no svn history before
> landing other changes?
> The Unwind part conforms to llvm style much more than the rest of
> libcxxabi does ;-) I ran clang-format on the Unwind sources at one point
> during the port from darwin. Feel free to use clang-format on new code.
> My personal grip with clang-format is that it throws away all vertical
> alignment.
>
>
> -Nick
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131204/35eb150d/attachment.html>
-------------- next part --------------
Index: lib/buildit
===================================================================
--- lib/buildit (revision 196341)
+++ lib/buildit (working copy)
@@ -97,3 +97,24 @@
then
rm *.o
fi
+
+# libunwind is a separate library on Darwin.
+case $TRIPLE in
+ *-apple-*)
+ for FILE in ../src/Unwind/*.c*; do
+ $CXX -c -g -O3 $RC_CFLAGS $EXTRA_FLAGS -I../include $OPTIONS $FILE
+ done
+ LDSHARED_FLAGS="-o libunwind.dylib \
+ -dynamiclib -nodefaultlibs \
+ -current_version ${RC_ProjectSourceVersion} \
+ -compatibility_version 1 \
+ -install_name /usr/lib/system/libunwind.dylib \
+ " # FIXME: link to libsystem_malloc.dylib and friends?
+ $CC *.o $RC_CFLAGS $LDSHARED_FLAGS $EXTRA_FLAGS
+
+ if [ -z $RC_XBS ]
+ then
+ rm *.o
+ fi
+ ;;
+esac
More information about the cfe-dev
mailing list