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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
76a92270
Commit
76a92270
authored
Aug 20, 2020
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support of WITH_GPROF to cmake
parent
65c43bcf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
BUILD/SETUP.sh
BUILD/SETUP.sh
+3
-2
CMakeLists.txt
CMakeLists.txt
+6
-1
No files found.
BUILD/SETUP.sh
View file @
76a92270
...
@@ -315,10 +315,11 @@ gcov_configs="--with-gcov"
...
@@ -315,10 +315,11 @@ gcov_configs="--with-gcov"
# gprof
# gprof
gprof_compile_flags
=
"-O2
-pg -g
"
gprof_compile_flags
=
"-O2"
# Rest of the flags are set in CmakeFile.txt
gprof_link_flags
=
"--disable-shared
$static_link
"
gprof_link_flags
=
"--disable-shared
$static_link
"
disable_gprof_plugins
=
"--with-zlib-dir=bundled --without-plugin-oqgraph --without-plugin-mroonga"
disable_gprof_plugins
=
"--with-zlib-dir=bundled --without-plugin-oqgraph --without-plugin-mroonga
--with-gprof
"
disable_asan_plugins
=
"--without-plugin-rocksdb"
disable_asan_plugins
=
"--without-plugin-rocksdb"
CMakeLists.txt
View file @
76a92270
...
@@ -242,13 +242,18 @@ IF (WITH_MSAN)
...
@@ -242,13 +242,18 @@ IF (WITH_MSAN)
MY_CHECK_AND_SET_COMPILER_FLAG
(
"-fsanitize=memory -fsanitize-memory-track-origins -U_FORTIFY_SOURCE"
DEBUG RELWITHDEBINFO
)
MY_CHECK_AND_SET_COMPILER_FLAG
(
"-fsanitize=memory -fsanitize-memory-track-origins -U_FORTIFY_SOURCE"
DEBUG RELWITHDEBINFO
)
ENDIF
()
ENDIF
()
OPTION
(
WITH_GPROF
"Enable profilingg with gprof"
OFF
)
IF
(
WITH_GPROF
)
MY_CHECK_AND_SET_COMPILER_FLAG
(
"-pg -g -no-pie -fPIC"
)
ENDIF
()
# Be nice to profilers etc
# Be nice to profilers etc
MY_CHECK_AND_SET_COMPILER_FLAG
(
"-fno-omit-frame-pointer"
RELWITHDEBINFO
)
MY_CHECK_AND_SET_COMPILER_FLAG
(
"-fno-omit-frame-pointer"
RELWITHDEBINFO
)
# enable security hardening features, like most distributions do
# enable security hardening features, like most distributions do
# in our benchmarks that costs about ~1% of performance, depending on the load
# in our benchmarks that costs about ~1% of performance, depending on the load
OPTION
(
SECURITY_HARDENED
"Use security-enhancing compiler features (stack protector, relro, etc)"
ON
)
OPTION
(
SECURITY_HARDENED
"Use security-enhancing compiler features (stack protector, relro, etc)"
ON
)
IF
(
SECURITY_HARDENED AND NOT WITH_ASAN AND NOT WITH_UBSAN AND NOT WITH_TSAN
)
IF
(
SECURITY_HARDENED AND NOT WITH_ASAN AND NOT WITH_UBSAN AND NOT WITH_TSAN
AND NOT WITH_GPROF
)
# security-enhancing flags
# security-enhancing flags
MY_CHECK_AND_SET_COMPILER_FLAG
(
"-pie -fPIC"
)
MY_CHECK_AND_SET_COMPILER_FLAG
(
"-pie -fPIC"
)
MY_CHECK_AND_SET_LINKER_FLAG
(
"-Wl,-z,relro,-z,now"
)
MY_CHECK_AND_SET_LINKER_FLAG
(
"-Wl,-z,relro,-z,now"
)
...
...
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