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
b0db3e65
Commit
b0db3e65
authored
Jul 15, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #635 from dagar/jemalloc
jemalloc
parents
b50ffe4b
d627af55
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
8 deletions
+26
-8
.gitmodules
.gitmodules
+3
-0
CMakeLists.txt
CMakeLists.txt
+22
-8
jemalloc
jemalloc
+1
-0
No files found.
.gitmodules
View file @
b0db3e65
...
...
@@ -28,3 +28,6 @@
path = test/integration/pyxl
url = https://github.com/dropbox/pyxl.git
ignore = untracked
[submodule "jemalloc"]
path = jemalloc
url = git://github.com/jemalloc/jemalloc.git
CMakeLists.txt
View file @
b0db3e65
...
...
@@ -72,6 +72,26 @@ if(${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND NOT ENABLE_LLVM_DEBUG)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-O3"
CACHE STRING
""
FORCE
)
endif
()
add_custom_command
(
OUTPUT
${
CMAKE_BINARY_DIR
}
/gitmodules
COMMAND git submodule update --init
COMMAND cmake -E touch
${
CMAKE_BINARY_DIR
}
/gitmodules
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
DEPENDS
${
CMAKE_SOURCE_DIR
}
/.gitmodules
)
add_custom_target
(
gitsubmodules DEPENDS
${
CMAKE_BINARY_DIR
}
/gitmodules
)
# jemalloc
ExternalProject_Add
(
libjemalloc
PREFIX jemalloc-build
SOURCE_DIR
${
CMAKE_SOURCE_DIR
}
/jemalloc
DEPENDS gitsubmodules
UPDATE_COMMAND autoconf
CONFIGURE_COMMAND
${
CMAKE_SOURCE_DIR
}
/jemalloc/configure --prefix=
${
CMAKE_BINARY_DIR
}
/jemalloc --enable-autogen --enable-prof-libunwind
INSTALL_COMMAND make install_bin install_lib
LOG_UPDATE ON
LOG_CONFIGURE ON
LOG_BUILD ON
LOG_INSTALL ON
)
execute_process
(
COMMAND cat llvm_revision.txt WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
OUTPUT_VARIABLE LLVMREV OUTPUT_STRIP_TRAILING_WHITESPACE
)
# llvm, clang, and libunwind patches
...
...
@@ -86,13 +106,6 @@ set(LIBUNWIND_PATCHES
${
CMAKE_SOURCE_DIR
}
/libunwind_patches/9999-is-patched-marker.patch
)
add_custom_command
(
OUTPUT
${
CMAKE_BINARY_DIR
}
/gitmodules
COMMAND git submodule update --init
COMMAND cmake -E touch
${
CMAKE_BINARY_DIR
}
/gitmodules
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
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
}
...
...
@@ -213,7 +226,8 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/linkdeps_dummy.c COMMAND ${CMAKE_C
add_executable
(
pyston $<TARGET_OBJECTS:PYSTON_MAIN_OBJECT> $<TARGET_OBJECTS:PYSTON_OBJECTS> $<TARGET_OBJECTS:FROM_CPYTHON> linkdeps_dummy.c
)
# Wrap the stdlib in --whole-archive to force all the symbols to be included and eventually exported
target_link_libraries
(
pyston -Wl,--whole-archive stdlib -Wl,--no-whole-archive pthread m z readline sqlite3 gmp ssl crypto unwind pypa liblz4 double-conversion
${
LLVM_LIBS
}
${
LIBLZMA_LIBRARIES
}
${
OPTIONAL_LIBRARIES
}
)
target_link_libraries
(
pyston -Wl,--whole-archive stdlib -Wl,--no-whole-archive pthread m z readline sqlite3 gmp ssl crypto unwind pypa liblz4 double-conversion
${
LLVM_LIBS
}
${
LIBLZMA_LIBRARIES
}
${
OPTIONAL_LIBRARIES
}
-L
${
CMAKE_BINARY_DIR
}
/jemalloc/lib -Wl,-rpath,
${
CMAKE_BINARY_DIR
}
/jemalloc/lib jemalloc
)
add_dependencies
(
pyston libjemalloc
)
# copy src/codegen/parse_ast.py to the build directory
add_custom_command
(
TARGET pyston POST_BUILD COMMAND
${
CMAKE_COMMAND
}
-E copy_if_different
${
CMAKE_SOURCE_DIR
}
/src/codegen/parse_ast.py
${
CMAKE_BINARY_DIR
}
/src/codegen/parse_ast.py
)
...
...
jemalloc
@
46c0af68
Subproject commit 46c0af68bd248b04df75e4f92d5fb804c3d75340
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