Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TEC Server Config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MSK-SW
Infrastructure and Support
TEC
TEC Server Config
Commits
c412f9e0
Commit
c412f9e0
authored
6 months ago
by
Martin Christoph Hierholzer
Browse files
Options
Downloads
Patches
Plain Diff
chore(project-template): asan: add no-inline and no-omit-frame-pointer
parent
8561efcf
No related branches found
Branches containing commit
No related tags found
1 merge request
!14
update project template
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/set_default_flags.cmake
+6
-7
6 additions, 7 deletions
cmake/set_default_flags.cmake
with
6 additions
and
7 deletions
cmake/set_default_flags.cmake
+
6
−
7
View file @
c412f9e0
#######################################################################################################################
#
######################################################################################################################
# set_default_flags.cmake
#
# Set default compiler flags for C++, including the flags for thelatest C++ standard (see
...
...
@@ -7,9 +7,9 @@
# It will also append ${PROJECT_NAME}_CXX_FLAGS to the CMAKE_CXX_FLAGS, so it is a good idea to set any project
# specific flags before calling this macro.
#
#######################################################################################################################
#
######################################################################################################################
#######################################################################################################################
#
######################################################################################################################
#
# IMPORTANT NOTE:
#
...
...
@@ -19,7 +19,7 @@
# If you have modified this file inside a project despite this warning, make sure to cherry-pick all your changes
# into the project-template repository immediately.
#
#######################################################################################################################
#
######################################################################################################################
include
(
cmake/enable_latest_cxx_support.cmake
)
...
...
@@ -29,7 +29,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"
${
CMAKE_CXX_FLAGS_RELWITHDEBINFO
}
-O3 -g"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
-g -O0"
)
set
(
CMAKE_CXX_FLAGS_TSAN
"
${
CMAKE_CXX_FLAGS
}
-g -O1 -fsanitize=thread -fno-inline"
)
set
(
CMAKE_CXX_FLAGS_ASAN
"
${
CMAKE_CXX_FLAGS
}
-g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=leak"
)
set
(
CMAKE_CXX_FLAGS_ASAN
"
${
CMAKE_CXX_FLAGS
}
-g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=leak
-fno-inline -fno-omit-frame-pointer
"
)
add_compile_definitions
(
"$<$<CONFIG:Debug>:_GLIBCXX_ASSERTIONS>"
)
...
...
@@ -38,8 +38,7 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"
${
CMAKE_C_FLAGS_RELWITHDEBINFO
}
-O3 -g"
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
-g -O0"
)
set
(
CMAKE_C_FLAGS_TSAN
"
${
CMAKE_C_FLAGS
}
-g -O1 -fsanitize=thread -fno-inline"
)
set
(
CMAKE_C_FLAGS_ASAN
"
${
CMAKE_C_FLAGS
}
-g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=leak"
)
set
(
CMAKE_C_FLAGS_ASAN
"
${
CMAKE_C_FLAGS
}
-g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=leak -fsanitize=leak -fno-inline -fno-omit-frame-pointer"
)
# Make sure any non-standard library path are added in library or executable targets.
# Since this in done only at install time, behavior of unit tests is not affected.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment