[gn] Support for building libunwind
This change introduces support for building libuwind. The library
build should be complete, but not all CMake options have been
replicated in GN. We also don't support tests yet.
We only support two stage build at the moment.
Differential Revision: https://reviews.llvm.org/D60370
git-svn-id: https://llvm.org/svn/llvm-project/libunwind/trunk@359804 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f4a8241..191f167 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -3,20 +3,23 @@
set(LIBUNWIND_CXX_SOURCES
libunwind.cpp
Unwind-EHABI.cpp
- Unwind-seh.cpp)
+ Unwind-seh.cpp
+ )
unwind_append_if(LIBUNWIND_CXX_SOURCES APPLE Unwind_AppleExtras.cpp)
set(LIBUNWIND_C_SOURCES
UnwindLevel1.c
UnwindLevel1-gcc-ext.c
- Unwind-sjlj.c)
+ Unwind-sjlj.c
+ )
set_source_files_properties(${LIBUNWIND_C_SOURCES}
PROPERTIES
COMPILE_FLAGS "-std=c99")
set(LIBUNWIND_ASM_SOURCES
UnwindRegistersRestore.S
- UnwindRegistersSave.S)
+ UnwindRegistersSave.S
+ )
set_source_files_properties(${LIBUNWIND_ASM_SOURCES}
PROPERTIES
LANGUAGE C)
@@ -33,11 +36,13 @@
Registers.hpp
RWMutex.hpp
UnwindCursor.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/../include/libunwind.h
- ${CMAKE_CURRENT_SOURCE_DIR}/../include/unwind.h)
+ ../include/libunwind.h
+ ../include/unwind.h
+ )
unwind_append_if(LIBUNWIND_HEADERS APPLE
- "${CMAKE_CURRENT_SOURCE_DIR}/../include/mach-o/compact_unwind_encoding.h")
+ ../include/mach-o/compact_unwind_encoding.h
+ )
if (MSVC_IDE)
# Force them all into the headers dir on MSVC, otherwise they end up at