[PATCH] [libcxxabi] Add support for building and testing the unwinder.

Jon Roelofs jonathan at codesourcery.com
Thu Jul 10 06:48:42 PDT 2014


> (non-ARM Linux won't build by design).

Why?

================
Comment at: src/Unwind/CMakeLists.txt:8
@@ +7,3 @@
+  UnwindLevel1-gcc-ext.c
+)
+
----------------
Sort them?

================
Comment at: src/Unwind/CMakeLists.txt:15
@@ +14,3 @@
+
+set_source_files_properties(${LIBUNWIND_ASM_SOURCES} PROPERTIES LANGUAGE C)
+
----------------
I'm very 'green' when it comes to cmake, but this looks odd. Should the language be set to some ASM thing instead of C?

================
Comment at: src/Unwind/CMakeLists.txt:29
@@ +28,3 @@
+  libunwind_ext.h
+)
+
----------------
Sort them?

What about:
include/libunwind.h
include/unwind.h
include/mach-o/compact_unwind_encoding.h

================
Comment at: src/Unwind/CMakeLists.txt:31
@@ +30,3 @@
+
+append_if(LIBUNWIND_SOURCES APPLE Unwind_AppleExtras.cpp)
+
----------------
would this append_if be better if it lived just below the set for LIBUNWIND_SORUCES?

================
Comment at: src/Unwind/CMakeLists.txt:65
@@ +64,3 @@
+append_if(link_flags LIBCXXABI_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs)
+
+if ( APPLE )
----------------
lib/buildit has a big list of EXTRA_FLAGS. Are those taken care of here?

>    EXTRA_FLAGS="-fstrict-aliasing -Wstrict-aliasing=2 \
>      -Wsign-conversion -Wshadow -Wconversion -Wunused-variable \
>      -Wmissing-field-initializers -Wchar-subscripts -Wmismatched-tags \
>      -Wmissing-braces -Wshorten-64-to-32 -Wsign-compare \
>      -Wstrict-aliasing=2 -Wstrict-overflow=4 -Wunused-parameter \
>      -Wnewline-eof"

================
Comment at: src/Unwind/CMakeLists.txt:72
@@ +71,3 @@
+      "-current_version ${LIBCXXABI_VERSION}"
+      "-install_name /usr/lib/libllvmunwind.1.dylib"
+      "/usr/lib/libSystem.B.dylib")
----------------
can this be something like "-install_name /usr/lib/lib${OUTPUT_NAME}.1.dylib" to avoid having to set that in multiple places?

================
Comment at: test/lit.cfg:209
@@ -202,1 +208,3 @@
+            else:
+                link_flags += ['-lgcc_eh', '-lgcc_s']
         else:
----------------
This changes the order of link_flags when not using llvm_unwinder. Is that okay?

http://reviews.llvm.org/D4448






More information about the cfe-commits mailing list