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
d982ad12
Commit
d982ad12
authored
Nov 07, 2014
by
Daniel Agar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake disable debug info for llvm unless ENABLE_LLVM_DEBUG is ON
parent
afe1a115
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
+11
-3
CMakeLists.txt
CMakeLists.txt
+8
-0
src/CMakeLists.txt
src/CMakeLists.txt
+1
-1
src/runtime/inline/CMakeLists.txt
src/runtime/inline/CMakeLists.txt
+1
-1
test/unittests/CMakeLists.txt
test/unittests/CMakeLists.txt
+1
-1
No files found.
CMakeLists.txt
View file @
d982ad12
...
...
@@ -7,6 +7,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set
(
DEPS_DIR $ENV{HOME}/pyston_deps
)
# set build type to release by default
set
(
CMAKE_CONFIGURATION_TYPES
"Debug;Release"
CACHE STRING
""
FORCE
)
if
(
NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE
"Release"
CACHE STRING
"Choose the type of build, options are: Debug Release."
FORCE
)
endif
()
...
...
@@ -14,9 +15,11 @@ if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Release" AND NOT ${CMAKE_BUILD_TYPE} STREQU
message
(
FATAL_ERROR
"CMAKE_BUILD_TYPE must be set to Release or Debug"
)
endif
()
option
(
ENABLE_GIL
"threadind use GIL"
ON
)
option
(
ENABLE_GRWL
"threadind 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_VALGRIND
"pyston valgrind support"
OFF
)
# initial clang flags (set here so they're used when building llvm)
...
...
@@ -28,6 +31,11 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
CLANG_FLAGS
}
"
)
endif
()
# llvm disable debug info unless ENABLE_LLVM_DEBUG is ON
if
(
${
CMAKE_BUILD_TYPE
}
STREQUAL
"Debug"
AND NOT ENABLE_LLVM_DEBUG
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-g0"
CACHE STRING
""
FORCE
)
endif
()
execute_process
(
COMMAND cat llvm_revision.txt WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
OUTPUT_VARIABLE LLVMREV OUTPUT_STRIP_TRAILING_WHITESPACE
)
# llvm and clang patches
...
...
src/CMakeLists.txt
View file @
d982ad12
set
(
CMAKE_INCLUDE_CURRENT_DIR ON
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
-DBINARY_SUFFIX= -DBINARY_STRIPPED_SUFFIX=_stripped"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
-g
-DBINARY_SUFFIX= -DBINARY_STRIPPED_SUFFIX=_stripped"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
CMAKE_CXX_FLAGS_RELEASE
}
-fstrict-aliasing -enable-tbaa -DNVALGRIND -DBINARY_SUFFIX=_release -DBINARY_STRIPPED_SUFFIX="
)
execute_process
(
COMMAND git rev-parse HEAD WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
OUTPUT_VARIABLE GITREV OUTPUT_STRIP_TRAILING_WHITESPACE
)
...
...
src/runtime/inline/CMakeLists.txt
View file @
d982ad12
...
...
@@ -71,7 +71,7 @@ foreach(BC_SRC ${BC_INLINE_SRCS})
# generate the bitcode for this file
add_custom_command
(
OUTPUT
${
BC_SRC_BASENAME
}
.bc
COMMAND
${
LLVM_TOOLS_BINARY_DIR
}
/clang++
${
BC_DEFINES
}
${
BC_CXX_FLAGS
}
${
BC_INCLUDES
}
-c
${
BC_SRC_FULLPATH
}
-o
${
BC_SRC_BASENAME
}
.bc -emit-llvm
-g
COMMAND
${
LLVM_TOOLS_BINARY_DIR
}
/clang++
${
BC_DEFINES
}
${
BC_CXX_FLAGS
}
${
BC_INCLUDES
}
-c
${
BC_SRC_FULLPATH
}
-o
${
BC_SRC_BASENAME
}
.bc -emit-llvm
DEPENDS
${
BC_SRC_FULLPATH
}
clang
COMMENT
"Building LLVM bitcode
${
BC_SRC_BASENAME
}
.bc"
VERBATIM
)
...
...
test/unittests/CMakeLists.txt
View file @
d982ad12
...
...
@@ -8,7 +8,7 @@ include_directories(${LLVM_SOURCE_DIR}/utils/unittest/googletest/include)
add_custom_target
(
unittests
)
macro
(
add_unittest unittest
)
add_executable
(
${
unittest
}
_unittest
${
unittest
}
.cpp $<TARGET_OBJECTS:PYSTON_OBJECTS> $<TARGET_OBJECTS:FROM_CPYTHON_OBJECTS>
)
add_executable
(
${
unittest
}
_unittest
EXCLUDE_FROM_ALL
${
unittest
}
.cpp $<TARGET_OBJECTS:PYSTON_OBJECTS> $<TARGET_OBJECTS:FROM_CPYTHON_OBJECTS>
)
target_link_libraries
(
${
unittest
}
_unittest stdlib gmp readline pypa unwind gtest gtest_main
${
LLVM_LIBS
}
${
LIBLZMA_LIBRARIES
}
)
add_dependencies
(
${
unittest
}
_unittest gtest gtest_main
)
add_dependencies
(
unittests
${
unittest
}
_unittest
)
...
...
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