Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
b8af9b8c
Commit
b8af9b8c
authored
Jul 19, 2013
by
RIch Prohaska
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #33 from Tokutek/drd-flags
changed cmake to use a new build type for drd Tokutek/ft-engine#48
parents
68bcf15b
18421f4b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
cmake_modules/TokuSetupCompiler.cmake
cmake_modules/TokuSetupCompiler.cmake
+12
-6
cmake_modules/TokuThirdParty.cmake
cmake_modules/TokuThirdParty.cmake
+1
-1
No files found.
cmake_modules/TokuSetupCompiler.cmake
View file @
b8af9b8c
...
...
@@ -24,8 +24,8 @@ endif ()
## add TOKU_PTHREAD_DEBUG for debug builds
set_property
(
DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG TOKU_PTHREAD_DEBUG=1
)
set_property
(
DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_
RELWITHDEBINFO
TOKU_PTHREAD_DEBUG=1
)
set_property
(
DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_
RELWITHDEBINFO
_FORTIFY_SOURCE=2
)
set_property
(
DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_
DRD
TOKU_PTHREAD_DEBUG=1
)
set_property
(
DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_
DRD
_FORTIFY_SOURCE=2
)
## coverage
option
(
USE_GCOV
"Use gcov for test coverage."
OFF
)
...
...
@@ -120,18 +120,24 @@ set_ldflags_if_supported(
set
(
CMAKE_C_FLAGS_DEBUG
"-g3 -O0
${
CMAKE_C_FLAGS_DEBUG
}
"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-g3 -O0
${
CMAKE_CXX_FLAGS_DEBUG
}
"
)
## The default for this is -g -O2 -DNDEBUG.
## Since we want none of those for drd, we just overwrite it.
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"-g3 -O1"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-g3 -O1"
)
## flags to use when we want to run DRD on the resulting binaries
## DRD needs debugging symbols.
## -O0 makes it too slow, and -O2 inlines too much for our suppressions to work. -O1 is just right.
set
(
CMAKE_C_FLAGS_DRD
"-g3 -O1
${
CMAKE_C_FLAGS_DRD
}
"
)
set
(
CMAKE_CXX_FLAGS_DRD
"-g3 -O1
${
CMAKE_CXX_FLAGS_DRD
}
"
)
## set extra release flags
## need to set flags for RelWithDebInfo as well because we want the MySQL/MariaDB builds to use them
if
(
APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang
)
# have tried -flto and -O4, both make our statically linked executables break apple's linker
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"
${
CMAKE_C_FLAGS_RELWITHDEBINFO
}
-g -O3 -UNDEBUG"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"
${
CMAKE_CXX_FLAGS_RELWITHDEBINFO
}
-g -O3 -UNDEBUG"
)
set
(
CMAKE_C_FLAGS_RELEASE
"-g -O3
${
CMAKE_C_FLAGS_RELEASE
}
-UNDEBUG"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-g -O3
${
CMAKE_CXX_FLAGS_RELEASE
}
-UNDEBUG"
)
else
()
# we overwrite this because the default passes -DNDEBUG and we don't want that
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"-flto -fuse-linker-plugin
${
CMAKE_C_FLAGS_RELWITHDEBINFO
}
-g -O3 -UNDEBUG"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-flto -fuse-linker-plugin
${
CMAKE_CXX_FLAGS_RELWITHDEBINFO
}
-g -O3 -UNDEBUG"
)
set
(
CMAKE_C_FLAGS_RELEASE
"-g -O3 -flto -fuse-linker-plugin
${
CMAKE_C_FLAGS_RELEASE
}
-UNDEBUG"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-g -O3 -flto -fuse-linker-plugin
${
CMAKE_CXX_FLAGS_RELEASE
}
-UNDEBUG"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"-g -fuse-linker-plugin
${
CMAKE_EXE_LINKER_FLAGS
}
"
)
...
...
cmake_modules/TokuThirdParty.cmake
View file @
b8af9b8c
...
...
@@ -43,7 +43,7 @@ if (APPLE)
endif
()
list
(
APPEND xz_configure_opts CC=
${
CMAKE_C_COMPILER
}
)
if
(
NOT CMAKE_BUILD_TYPE MATCHES Release
)
if
(
CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL drd
)
list
(
APPEND xz_configure_opts --enable-debug
)
endif
()
...
...
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