Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
a55cb325
Commit
a55cb325
authored
Aug 29, 2016
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: add asan support
parent
f0f5e22a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
compile-libvlc.sh
compile-libvlc.sh
+21
-0
compile.sh
compile.sh
+6
-0
No files found.
compile-libvlc.sh
View file @
a55cb325
...
...
@@ -17,6 +17,7 @@ checkfail()
#############
RELEASE
=
0
ASAN
=
0
while
[
$#
-gt
0
]
;
do
case
$1
in
help
|
--help
)
...
...
@@ -31,6 +32,9 @@ while [ $# -gt 0 ]; do
-c
)
CHROME_OS
=
1
;;
--asan
)
ASAN
=
1
;;
release|--release
)
RELEASE
=
1
;;
...
...
@@ -347,6 +351,7 @@ fi
##########
# CFLAGS #
##########
VLC_CFLAGS
=
"-std=gnu11"
VLC_CXXFLAGS
=
"-std=gnu++11"
if
[
"
$NO_OPTIM
"
=
"1"
]
;
...
...
@@ -418,6 +423,19 @@ else
NDK_DEBUG
=
1
fi
if
[
"
${
ASAN
}
"
=
1
]
;
then
VLC_CFLAGS
=
"
${
VLC_CFLAGS
}
-O0 -fno-omit-frame-pointer -fsanitize=address"
VLC_CXXFLAGS
=
"
${
VLC_CXXLAGS
}
-O0 -fno-omit-frame-pointer -fsanitize=address"
VLC_LDFLAGS
=
"
${
VLC_LDFLAGS
}
-ldl -fsanitize=address"
# ugly, sorry
if
[
"
${
ANDROID_API
}
"
=
"9"
]
;
then
cp
${
ANDROID_NDK
}
/platforms/android-9/arch-
${
PLATFORM_SHORT_ARCH
}
/usr/include/stdlib.h
\
${
NDK_TOOLCHAIN_DIR
}
/sysroot/usr/include
echo
"extern int posix_memalign(void **memptr, size_t alignment, size_t size);"
\
>>
${
NDK_TOOLCHAIN_DIR
}
/sysroot/usr/include/stdlib.h
fi
fi
echo
"EXTRA_CFLAGS:
${
EXTRA_CFLAGS
}
"
echo
"VLC_CFLAGS:
${
VLC_CFLAGS
}
"
...
...
@@ -505,6 +523,9 @@ if [ "${CHROME_OS}" = "1" ];then
else
VLC_BUILD_DIR
=
build-android-
${
TARGET_TUPLE
}
fi
if
[
"
${
ASAN
}
"
=
1
]
;
then
VLC_BUILD_DIR
=
${
VLC_BUILD_DIR
}
-asan
fi
mkdir
-p
$VLC_BUILD_DIR
&&
cd
$VLC_BUILD_DIR
#############
...
...
compile.sh
View file @
a55cb325
...
...
@@ -60,6 +60,9 @@ while [ $# -gt 0 ]; do
run
)
RUN
=
1
;;
--asan
)
ASAN
=
1
;;
*
)
diagnostic
"
$0
: Invalid option '
$1
'."
diagnostic
"
$0
: Try --help for more information."
...
...
@@ -218,6 +221,9 @@ fi
if
[
"
$CHROME_OS
"
=
1
]
;
then
OPTS
=
"
$OPTS
-c"
fi
if
[
"
$ASAN
"
=
1
]
;
then
OPTS
=
"
$OPTS
--asan"
fi
./compile-libvlc.sh
$OPTS
...
...
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