Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
spbro
OpenXG-RAN
Commits
24b651b4
Commit
24b651b4
authored
Jun 19, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide build_oai option UBSan
parent
65c9af7d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+6
-0
cmake_targets/build_oai
cmake_targets/build_oai
+11
-1
No files found.
cmake_targets/CMakeLists.txt
View file @
24b651b4
...
@@ -271,6 +271,12 @@ if (SANITIZE_ADDRESS)
...
@@ -271,6 +271,12 @@ if (SANITIZE_ADDRESS)
# wrong in the pthread library, or something subtly wrong in this CMakeLists.txt. Use Ubuntu 20.04 instead.
# wrong in the pthread library, or something subtly wrong in this CMakeLists.txt. Use Ubuntu 20.04 instead.
endif
()
endif
()
add_boolean_option
(
SANITIZE_UNDEFINED False
"enable the undefined behavior sanitizer (UBSan)"
)
if
(
SANITIZE_UNDEFINED
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fsanitize=undefined -fno-sanitize-recover=all"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fsanitize=undefined -fno-sanitize-recover=all"
)
endif
()
add_definitions
(
"-DASN_DISABLE_OER_SUPPORT"
)
add_definitions
(
"-DASN_DISABLE_OER_SUPPORT"
)
#########################
#########################
...
...
cmake_targets/build_oai
View file @
24b651b4
...
@@ -171,8 +171,12 @@ Options:
...
@@ -171,8 +171,12 @@ Options:
Skip build for shared libraries to reduce compilation time when building frequently for debugging purposes
Skip build for shared libraries to reduce compilation time when building frequently for debugging purposes
--ninja
--ninja
Tell cmake to use the Ninja build system. Without, will generate make files
Tell cmake to use the Ninja build system. Without, will generate make files
--sanitize
Shortcut for usage of --sanitize-address --sanitize-undefined
--sanitize-address | -fsanitize=address
--sanitize-address | -fsanitize=address
Enable the address sanitizer on all targets
Enable the address sanitizer on all targets
--sanitize-undefined | -fsanitize=undefined
Enable the undefined behavior sanitizer on all targets
--ittiSIM
--ittiSIM
Makes the itti simulator
Makes the itti simulator
-h | --help
-h | --help
...
@@ -451,10 +455,16 @@ function main() {
...
@@ -451,10 +455,16 @@ function main() {
CMAKE_CMD
=
"
$CMAKE_CMD
-GNinja"
CMAKE_CMD
=
"
$CMAKE_CMD
-GNinja"
MAKE_CMD
=
ninja
MAKE_CMD
=
ninja
shift
;;
shift
;;
--sanitize
)
CMAKE_CMD
=
"
$CMAKE_CMD
-DSANITIZE_ADDRESS=True -DSANITIZE_UNDEFINED=True"
shift
;;
--sanitize-address
|
-fsanitize
=
address
)
--sanitize-address
|
-fsanitize
=
address
)
grep
-sq
"Ubuntu 18.04"
/etc/os-release
&&
echo_error
"Bug in OS with this option, see CMakeLists.txt"
grep
-sq
"Ubuntu 18.04"
/etc/os-release
&&
echo_error
"Bug in OS with this option, see CMakeLists.txt"
CMAKE_CMD
=
"
$CMAKE_CMD
-DSANITIZE_ADDRESS=True"
CMAKE_CMD
=
"
$CMAKE_CMD
-DSANITIZE_ADDRESS=True"
shift
;;
shift
;;
--sanitize-undefined
|
-fundefined
=
address
)
CMAKE_CMD
=
"
$CMAKE_CMD
-DSANITIZE_UNDEFINED=True"
shift
;;
--ittiSIM
)
--ittiSIM
)
ittiSIM
=
1
ittiSIM
=
1
CMAKE_CMD
=
"
$CMAKE_CMD
-DITTI_SIM=True"
CMAKE_CMD
=
"
$CMAKE_CMD
-DITTI_SIM=True"
...
...
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