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
381e2fcd
Commit
381e2fcd
authored
Jan 21, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #263 from dagar/profile
cmake add oprofile and gperftools
parents
cc06ac6e
793d7d6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
CMakeLists.txt
CMakeLists.txt
+11
-1
src/CMakeLists.txt
src/CMakeLists.txt
+9
-1
No files found.
CMakeLists.txt
View file @
381e2fcd
...
...
@@ -18,9 +18,11 @@ endif()
option
(
ENABLE_CCACHE
"enable caching compiler output"
ON
)
option
(
ENABLE_GIL
"threading use GIL"
ON
)
option
(
ENABLE_GOLD
"enable the gold linker"
ON
)
option
(
ENABLE_GPERFTOOLS
"enable the google performance tools"
OFF
)
option
(
ENABLE_GRWL
"threading use GRWL"
OFF
)
option
(
ENABLE_INTEL_JIT_EVENTS
"LLVM support for Intel JIT Events API"
OFF
)
option
(
ENABLE_LLVM_DEBUG
"LLVM debug symbols"
OFF
)
option
(
ENABLE_OPROFILE
"enable oprofile support"
OFF
)
option
(
ENABLE_SELF_HOST
"use pyston to test pyston"
OFF
)
option
(
ENABLE_VALGRIND
"pyston valgrind support"
OFF
)
...
...
@@ -119,6 +121,14 @@ else()
add_definitions
(
-DTHREADING_USE_GIL=1 -DTHREADING_USE_GRWL=0
)
endif
()
if
(
ENABLE_GPERFTOOLS
)
set
(
OPTIONAL_LIBRARIES
${
OPTIONAL_LIBRARIES
}
profiler
)
endif
()
if
(
ENABLE_OPROFILE
)
set
(
OPTIONAL_LIBRARIES
${
OPTIONAL_LIBRARIES
}
opagent
)
endif
()
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wall -Wextra -Werror -Wreturn-type -Wno-sign-compare -Wno-unused -Wno-sign-compare -Wno-unused-parameter -fno-omit-frame-pointer"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
CMAKE_C_FLAGS
}
-std=c++11 -fPIC -fno-rtti -fexceptions -fvisibility-inlines-hidden -ffunction-sections -fdata-sections -Woverloaded-virtual -Wno-invalid-offsetof -Wcast-qual -Wno-sign-conversion -Wnon-virtual-dtor -Winit-self -Wmissing-include-dirs -Wstrict-overflow=5 -Wpointer-arith -Wtype-limits -Wwrite-strings -Wempty-body -Waggregate-return -Wmissing-field-initializers -Wredundant-decls -Winline -Wint-to-pointer-cast -Wlong-long -Wvla -Wno-attributes"
)
...
...
@@ -151,7 +161,7 @@ add_subdirectory(tools)
add_executable
(
pyston $<TARGET_OBJECTS:PYSTON_MAIN_OBJECT> $<TARGET_OBJECTS:PYSTON_OBJECTS> $<TARGET_OBJECTS:FROM_CPYTHON>
)
# 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 readline gmp unwind pypa double-conversion
${
LLVM_LIBS
}
${
LIBLZMA_LIBRARIES
}
)
target_link_libraries
(
pyston -Wl,--whole-archive stdlib -Wl,--no-whole-archive pthread m readline gmp unwind pypa double-conversion
${
LLVM_LIBS
}
${
LIBLZMA_LIBRARIES
}
${
OPTIONAL_LIBRARIES
}
)
# 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
)
...
...
src/CMakeLists.txt
View file @
381e2fcd
...
...
@@ -20,7 +20,15 @@ file(GLOB GC_SRCS gc/*.cpp)
file
(
GLOB RUNTIME_BUILTIN_MODULES_SRCS runtime/builtin_modules/*.cpp
)
file
(
GLOB RUNTIME_SRCS runtime/*.cpp
)
add_library
(
PYSTON_OBJECTS OBJECT codegen/profiling/profiling.cpp
${
ANALYSIS_SRCS
}
${
ASM_WRITING_SRCS
}
${
CAPI_SRCS
}
${
CODEGEN_SRCS
}
${
CODEGEN_IRGEN_SRCS
}
${
CODEGEN_OPT_SRCS
}
${
CORE_SRCS
}
${
GC_SRCS
}
${
RUNTIME_BUILTIN_MODULES_SRCS
}
${
RUNTIME_SRCS
}
)
if
(
ENABLE_GPERFTOOLS
)
set
(
OPTIONAL_SRCS
${
OPTIONAL_SRCS
}
codegen/profiling/pprof.cpp
)
endif
()
if
(
ENABLE_OPROFILE
)
set
(
OPTIONAL_SRCS codegen/profiling/oprofile.cpp
)
endif
()
add_library
(
PYSTON_OBJECTS OBJECT codegen/profiling/profiling.cpp
${
ANALYSIS_SRCS
}
${
ASM_WRITING_SRCS
}
${
CAPI_SRCS
}
${
CODEGEN_SRCS
}
${
CODEGEN_IRGEN_SRCS
}
${
CODEGEN_OPT_SRCS
}
${
CORE_SRCS
}
${
GC_SRCS
}
${
RUNTIME_BUILTIN_MODULES_SRCS
}
${
RUNTIME_SRCS
}
${
OPTIONAL_SRCS
}
)
add_dependencies
(
PYSTON_OBJECTS libunwind pypa
${
LLVM_LIBS
}
)
add_library
(
PYSTON_MAIN_OBJECT OBJECT jit.cpp
)
add_dependencies
(
PYSTON_MAIN_OBJECT
${
LLVM_LIBS
}
)
...
...
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