[Android] [PATCH] compile-libvlc: NO_OPTIM is not set before use

Thomas Guillem thomas at gllm.fr
Wed Nov 8 18:02:36 CET 2017


Hello,

On Wed, Nov 8, 2017, at 16:42, Zhao Zhili wrote:
> ---
>  compile-libvlc.sh | 24 ++++++++++++++----------
>  1 file changed, 14 insertions(+), 10 deletions(-)
> 
> diff --git a/compile-libvlc.sh b/compile-libvlc.sh
> index abee5c427..6c2eef6dc 100755
> --- a/compile-libvlc.sh
> +++ b/compile-libvlc.sh
> @@ -21,6 +21,7 @@ MEDIALIBRARY_HASH=1f7e168
>  BUILD_ML=1
>  RELEASE=0
>  ASAN=0
> +NO_OPTIM=1
>  while [ $# -gt 0 ]; do
>      case $1 in
>          help|--help)
> @@ -369,6 +370,19 @@ fi
>  
>  VLC_CFLAGS="-std=gnu11"
>  VLC_CXXFLAGS="-std=gnu++11"
> +
> +# Release or not?
> +if [ "$RELEASE" = 1 ]; then
> +    OPTS=""
> +    EXTRA_CFLAGS="${EXTRA_CFLAGS} -DNDEBUG "
> +    NDK_DEBUG=0
> +    NO_OPTIM=0
> +else
> +    OPTS="--enable-debug"
> +    NDK_DEBUG=1
> +    NO_OPTIM=1

We don't want to disable optimizations for the  default build (the debug
one). Optimizations should be disabled specifically by the user.

> +fi
> +
>  if [ "$NO_OPTIM" = "1" ];
>  then
>       VLC_CFLAGS="${VLC_CFLAGS} -g -O0"
> @@ -417,16 +431,6 @@ fi
>  EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -L${NDK_LIB_DIR} -lc++abi -lc++_static"
>  VLC_LDFLAGS="${EXTRA_LDFLAGS}"
>  
> -# Release or not?
> -if [ "$RELEASE" = 1 ]; then
> -    OPTS=""
> -    EXTRA_CFLAGS="${EXTRA_CFLAGS} -DNDEBUG "
> -    NDK_DEBUG=0
> -else
> -    OPTS="--enable-debug"
> -    NDK_DEBUG=1
> -fi
> -
>  if [ "${ASAN}" = 1 ];then
>      VLC_CFLAGS="${VLC_CFLAGS} -O0 -fno-omit-frame-pointer
>      -fsanitize=address"
>      VLC_CXXFLAGS="${VLC_CXXFLAGS} -O0 -fno-omit-frame-pointer
>      -fsanitize=address"
> -- 
> 2.14.2
> 
> 
> 
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android


More information about the Android mailing list