Commit 552cab2d authored by Kevin Modzelewski's avatar Kevin Modzelewski Committed by Kevin Modzelewski

Try to fix libunwind build issue

My guess is that there's a build dependency issue, where
we try building files that include libunwind.h before we
run the rules that generate it.  Not sure why we weren't running
into that before.  But the normal c++ files in src/ correctly
depend on libunwind, but the ones in src/runtime/inline don't
seem to.

For good measure, don't include libunwind.h in our header files,
and just use forward-declaring.
parent d5f1c95f
......@@ -46,6 +46,8 @@
#define UNW_LOCAL_ONLY
#include <libunwind.h>
#undef UNW_LOCAL_ONLY
namespace {
int _dummy_ = unw_set_caching_policy(unw_local_addr_space, UNW_CACHE_PER_THREAD);
}
......
......@@ -19,9 +19,9 @@
#include "codegen/codegen.h"
#define UNW_LOCAL_ONLY
#include <libunwind.h>
#undef UNW_LOCAL_ONLY
// Forward-declare libunwind's typedef'd unw_cursor_t:
struct unw_cursor;
typedef struct unw_cursor unw_cursor_t;
namespace pyston {
......
......@@ -87,7 +87,7 @@ foreach(BC_SRC ${BC_INLINE_SRCS})
# generate the bitcode for this file
add_custom_command(OUTPUT ${BC_SRC_BASENAME}.bc
COMMAND ${BC_CXX} ${BC_DEFINES} ${BC_CXX_FLAGS} ${BC_INCLUDES} -c ${BC_SRC_FULLPATH} -o ${BC_SRC_BASENAME}.bc -emit-llvm
DEPENDS ${BC_SRC_FULLPATH} clang ${PYSTON_HEADERS} ${FROM_CPYTHON_HEADERS}
DEPENDS ${BC_SRC_FULLPATH} clang ${PYSTON_HEADERS} ${FROM_CPYTHON_HEADERS} libunwind
COMMENT "Building LLVM bitcode ${BC_SRC_BASENAME}.bc"
VERBATIM)
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${BC_SRC_BASENAME}.bc)
......
......@@ -27,6 +27,7 @@
#define UNW_LOCAL_ONLY
#include <libunwind.h>
#undef UNW_LOCAL_ONLY
namespace pyston {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment