Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
c4c58d0d
Commit
c4c58d0d
authored
Jun 01, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #575 from kmod/libunwind_build
Fix some issues with the way we build libunwind
parents
93e83aad
c4063b2e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
8 deletions
+49
-8
CMakeLists.txt
CMakeLists.txt
+25
-6
Makefile
Makefile
+2
-0
libunwind_patches/9999-is-patched-marker.patch
libunwind_patches/9999-is-patched-marker.patch
+20
-0
src/CMakeLists.txt
src/CMakeLists.txt
+2
-2
No files found.
CMakeLists.txt
View file @
c4c58d0d
...
...
@@ -79,17 +79,25 @@ add_custom_target(llvm_up DEPENDS llvm_gotorev clang_gotorev)
set
(
LIBUNWIND_PATCHES
${
CMAKE_SOURCE_DIR
}
/libunwind_patches/0001-pyston-add-lots-of-comments.patch
${
CMAKE_SOURCE_DIR
}
/libunwind_patches/0002-pyston-stop-x86_64-setcontext-restoring-uninitialize.patch
${
CMAKE_SOURCE_DIR
}
/libunwind_patches/0003-use-a-sorted-array-for-registered-objects-and-do-a-b.patch
)
${
CMAKE_SOURCE_DIR
}
/libunwind_patches/0003-use-a-sorted-array-for-registered-objects-and-do-a-b.patch
${
CMAKE_SOURCE_DIR
}
/libunwind_patches/9999-is-patched-marker.patch
)
add_custom_command
(
OUTPUT
${
CMAKE_BINARY_DIR
}
/gitmodules
COMMAND git submodule update --init
COMMAND python
${
CMAKE_SOURCE_DIR
}
/tools/git_am_automated.py libunwind
${
LIBUNWIND_PATCHES
}
COMMAND cmake -E touch
${
CMAKE_BINARY_DIR
}
/gitmodules
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
DEPENDS
${
CMAKE_SOURCE_DIR
}
/.gitmodules
DEPENDS
${
LIBUNWIND_PATCHES
}
)
DEPENDS
${
CMAKE_SOURCE_DIR
}
/.gitmodules
)
add_custom_target
(
gitsubmodules DEPENDS
${
CMAKE_BINARY_DIR
}
/gitmodules
)
add_custom_command
(
OUTPUT
${
CMAKE_SOURCE_DIR
}
/libunwind/pyston_patched
COMMAND git submodule update libunwind
COMMAND python
${
CMAKE_SOURCE_DIR
}
/tools/git_am_automated.py libunwind
${
LIBUNWIND_PATCHES
}
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
DEPENDS
${
LIBUNWIND_PATCHES
}
DEPENDS gitsubmodules
)
add_custom_target
(
libunwind_patched DEPENDS
${
CMAKE_SOURCE_DIR
}
/libunwind/pyston_patched
)
# llvm
set
(
LLVM_TARGETS_TO_BUILD
"host"
CACHE STRING
"LLVM targets"
)
#set(LLVM_EXTERNAL_CLANG_SOURCE_DIR "${CMAKE_SOURCE_DIR}/clang" CACHE String "Clang directory")
...
...
@@ -115,14 +123,25 @@ endif()
ExternalProject_Add
(
libunwind
PREFIX libunwind
SOURCE_DIR
${
CMAKE_SOURCE_DIR
}
/libunwind
# TODO: more accurate DEPENDS - should depend on *contents* of libunwind/ source directory
DEPENDS gitsubmodules
DEPENDS libunwind_patched
UPDATE_COMMAND autoreconf -i
CONFIGURE_COMMAND
${
CMAKE_SOURCE_DIR
}
/libunwind/configure
${
LIBUNWIND_DEBUG_CFLAGS
}
--prefix=
${
CMAKE_BINARY_DIR
}
/libunwind --enable-shared=0 --disable-block-signals
${
LIBUNWIND_CONSERVATIVE_CHECKS
}
${
LIBUNWIND_DEBUG
}
${
LIBUNWIND_DEBUG_FRAME
}
LOG_UPDATE ON
LOG_CONFIGURE ON
LOG_BUILD ON
LOG_INSTALL ON
)
# Tell CMake that patching libunwind means that we need to rebuild it:
ExternalProject_Add_Step
(
libunwind forcebuild
DEPENDS
${
CMAKE_SOURCE_DIR
}
/libunwind/pyston_patched
DEPENDERS build
)
# Tell CMake that rebuilding libunwind will touch the build files (why doesn't it know this??)
# Otherwise, if you do something that triggers a rebuild (not a fresh build) of libunwind,
# it will take another build to realize that any source files that #include libunwind.h
# need to get rebuilt.
SET_SOURCE_FILES_PROPERTIES
(
${
CMAKE_BINARY_DIR
}
/libunwind/include/libunwind.h PROPERTIES OBJECT_DEPENDS
${
CMAKE_SOURCE_DIR
}
/libunwind/pyston_patched
)
# libpypa
add_subdirectory
(
libpypa
)
...
...
Makefile
View file @
c4c58d0d
...
...
@@ -844,6 +844,8 @@ $(call make_compile_config,.nosync,$(CXXFLAGS_RELEASE) -DTHREADING_USE_GRWL=0 -D
else
%.o
:
%.cpp $(CMAKE_SETUP_DBG)
$(NINJA)
-C
$(HOME)
/pyston-build-dbg src/CMakeFiles/PYSTON_OBJECTS.dir/
$(
patsubst
src/%.o,%.cpp.o,
$@
)
$(NINJAFLAGS)
%.release.o
:
%.cpp $(CMAKE_SETUP_RELEASE)
$(NINJA)
-C
$(HOME)
/pyston-build-release src/CMakeFiles/PYSTON_OBJECTS.dir/
$(
patsubst
src/%.release.o,%.cpp.o,
$@
)
$(NINJAFLAGS)
endif
$(UNITTEST_SRCS
:
.cpp=.o): CXXFLAGS += -isystem $(GTEST_DIR)/include
...
...
libunwind_patches/9999-is-patched-marker.patch
0 → 100644
View file @
c4c58d0d
From be4f78b09bcb44eaf23d103acf865d547893e2a6 Mon Sep 17 00:00:00 2001
From: Kevin Modzelewski <kmod@dropbox.com>
Date: Tue, 2 Jun 2015 04:25:24 +0000
Subject: [PATCH] Add patched marker
---
pyston_patched | 1 +
1 files changed, 1 insertions(+)
create mode 100644 pyston_patched
diff --git a/pyston_patched b/pyston_patched
new file mode 100644
index 0000000..64219e8
--- /dev/null
+++ b/pyston_patched
@@ -0,0 +1 @@
+Patched for Pyston!
--
1.9.1
src/CMakeLists.txt
View file @
c4c58d0d
...
...
@@ -109,10 +109,10 @@ add_library(PYSTON_OBJECTS OBJECT ${OPTIONAL_SRCS}
runtime/util.cpp
)
add_dependencies
(
PYSTON_OBJECTS libunwind pypa
${
LLVM_LIBS
}
)
add_dependencies
(
PYSTON_OBJECTS libunwind
_patched libunwind
pypa
${
LLVM_LIBS
}
)
add_library
(
PYSTON_MAIN_OBJECT OBJECT jit.cpp
)
add_dependencies
(
PYSTON_MAIN_OBJECT libunwind pypa liblz4
${
LLVM_LIBS
}
)
add_dependencies
(
PYSTON_MAIN_OBJECT libunwind
_patched libunwind
pypa liblz4
${
LLVM_LIBS
}
)
# build stdlib
add_subdirectory
(
runtime/inline
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment