Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-qt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
savoirfairelinux
jami-client-qt
Commits
be85034d
Commit
be85034d
authored
1 year ago
by
Andreas Traczyk
Committed by
Sébastien Blin
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
build: support enabling ASAN for daemon + contrib + client
Change-Id: Ie014285e46feb82577125b68677b19d94005789f
parent
885f05ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+12
-1
12 additions, 1 deletion
CMakeLists.txt
build.py
+5
-0
5 additions, 0 deletions
build.py
extras/scripts/install.sh
+15
-2
15 additions, 2 deletions
extras/scripts/install.sh
with
32 additions
and
3 deletions
CMakeLists.txt
+
12
−
1
View file @
be85034d
...
...
@@ -36,6 +36,14 @@ if(WITH_WEBENGINE)
add_definitions
(
-DWITH_WEBENGINE
)
endif
()
option
(
ENABLE_ASAN
"Enable address sanitization"
OFF
)
if
(
ENABLE_ASAN AND NOT MSVC
)
message
(
STATUS
"Address sanitization enabled for client"
)
# Add AddressSanitizer flags for both compiler and linker
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fsanitize=address -fno-omit-frame-pointer"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
-fsanitize=address"
)
endif
()
# init some variables for includes, libs, etc.
set
(
CLIENT_INCLUDE_DIRS,
""
)
set
(
CLIENT_LINK_DIRS,
""
)
...
...
@@ -43,7 +51,10 @@ set(CLIENT_LIBS, "")
set
(
CMAKE_CXX_STANDARD 17
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-Og -ggdb"
)
if
(
NOT MSVC
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-Og -ggdb"
)
endif
()
set
(
CMAKE_AUTOMOC ON
)
set
(
CMAKE_AUTORCC ON
)
...
...
This diff is collapsed.
Click to expand it.
build.py
+
5
−
0
View file @
be85034d
...
...
@@ -28,6 +28,7 @@ import shutil
import
subprocess
import
sys
import
time
import
re
OSX_DISTRIBUTION_NAME
=
"
osx
"
WIN32_DISTRIBUTION_NAME
=
"
win32
"
...
...
@@ -392,6 +393,8 @@ def run_install(args):
install_args
.
append
(
'
-u
'
)
if
args
.
debug
:
install_args
.
append
(
'
-d
'
)
if
args
.
asan
:
install_args
.
append
(
'
-A
'
)
if
args
.
no_libwrap
:
install_args
.
append
(
'
-W
'
)
if
args
.
no_webengine
:
...
...
@@ -719,6 +722,8 @@ def parse_args():
ap
.
add_argument
(
'
--global-install
'
,
default
=
False
,
action
=
'
store_true
'
)
ap
.
add_argument
(
'
--debug
'
,
default
=
False
,
action
=
'
store_true
'
,
help
=
'
Build with debug support; run in GDB
'
)
ap
.
add_argument
(
'
--asan
'
,
default
=
False
,
action
=
'
store_true
'
,
help
=
'
Build both daemon and client with ASAN
'
)
ap
.
add_argument
(
'
--background
'
,
default
=
False
,
action
=
'
store_true
'
)
ap
.
add_argument
(
'
--no-priv-install
'
,
dest
=
'
priv_install
'
,
default
=
True
,
action
=
'
store_false
'
)
...
...
This diff is collapsed.
Click to expand it.
extras/scripts/install.sh
+
15
−
2
View file @
be85034d
...
...
@@ -43,9 +43,10 @@ proc='1'
priv_install
=
true
enable_libwrap
=
true
enable_webengine
=
true
asan
=
arch
=
''
while
getopts
gsc:dQ:P:p:uWwa: OPT
;
do
while
getopts
gsc:dQ:P:p:uWwa:
A
OPT
;
do
case
"
$OPT
"
in
g
)
global
=
'true'
...
...
@@ -77,6 +78,9 @@ while getopts gsc:dQ:P:p:uWwa: OPT; do
a
)
arch
=
"
${
OPTARG
}
"
;;
A
)
asan
=
'true'
;;
\?
)
exit
1
;;
...
...
@@ -116,7 +120,7 @@ else
mkdir
-p
contrib/native
(
cd
contrib/native
../bootstrap
${
prefix
:+
"--prefix=
$prefix
"
}
../bootstrap
${
prefix
:+
"--prefix=
$prefix
"
}
${
asan
:+
"--enable-asan"
}
make
-j
"
${
proc
}
"
)
...
...
@@ -135,6 +139,10 @@ else
CONFIGURE_FLAGS+
=
" --enable-debug"
fi
if
[
"
${
asan
}
"
=
"true"
]
;
then
CONFIGURE_FLAGS+
=
" --enable-asan"
fi
# Build the daemon itself.
test
-f
configure
||
./autogen.sh
...
...
@@ -183,6 +191,11 @@ client_cmake_flags=(-DCMAKE_BUILD_TYPE="${BUILD_TYPE}"
-DCMAKE_PREFIX_PATH
=
"
${
qtpath
}
"
-DENABLE_LIBWRAP
=
"
${
enable_libwrap
}
"
-DWITH_WEBENGINE
=
"
${
enable_webengine
}
"
)
if
[
"
${
asan
}
"
=
"true"
]
;
then
client_cmake_flags+
=(
-DENABLE_ASAN
=
true
)
fi
if
[[
"
$OSTYPE
"
==
"darwin"
*
]]
;
then
#detect arch for macos
CMAKE_OSX_ARCHITECTURES
=
"arm64"
...
...
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