1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

configure: Refactor toolchain flag setting

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Diego Biurrun 2016-02-06 17:31:14 +01:00 committed by Luca Barbato
parent dd53af4b37
commit 34c9eba982

43
configure vendored
View File

@ -2718,44 +2718,43 @@ echo "# $0 $LIBAV_CONFIGURATION" > $logfile
set >> $logfile set >> $logfile
case "$toolchain" in case "$toolchain" in
clang-asan) *-asan)
cc_default="clang" cc_default="${toolchain%-asan}"
add_cflags -fsanitize=address add_cflags -fsanitize=address
add_ldflags -fsanitize=address add_ldflags -fsanitize=address
;; ;;
clang-tsan) *-tsan)
cc_default="clang" cc_default="${toolchain%-tsan}"
add_cflags -fsanitize=thread -pie add_cflags -fsanitize=thread -pie
add_ldflags -fsanitize=thread -pie add_ldflags -fsanitize=thread -pie
;; case "$toolchain" in
clang-usan)
cc_default="clang"
add_cflags -fsanitize=undefined -O1
add_ldflags -fsanitize=undefined
;;
gcc-asan)
cc_default="gcc"
add_cflags -fsanitize=address
add_ldflags -fsanitize=address
;;
gcc-tsan) gcc-tsan)
cc_default="gcc" add_cflags -fPIC
add_cflags -fsanitize=thread -pie -fPIC add_ldflags -fPIC
add_ldflags -fsanitize=thread -pie -fPIC
;; ;;
gcc-usan) esac
cc_default="gcc" ;;
*-usan)
cc_default="${toolchain%-usan}"
add_cflags -fsanitize=undefined add_cflags -fsanitize=undefined
add_ldflags -fsanitize=undefined add_ldflags -fsanitize=undefined
case "$toolchain" in
clang-usan)
add_cflags -O1
;; ;;
valgrind-massif) esac
;;
valgrind-*)
target_exec_default="valgrind" target_exec_default="valgrind"
case "$toolchain" in
valgrind-massif)
target_exec_args="--alloc-fn=av_malloc --alloc-fn=av_mallocz" target_exec_args="--alloc-fn=av_malloc --alloc-fn=av_mallocz"
;; ;;
valgrind-memcheck) valgrind-memcheck)
target_exec_default="valgrind"
target_exec_args="--track-origins=yes --leak-check=full" target_exec_args="--track-origins=yes --leak-check=full"
;; ;;
esac
;;
msvc) msvc)
# Check whether the current MSVC version needs the C99 converter. # Check whether the current MSVC version needs the C99 converter.
# From MSVC 2013 (compiler major version 18) onwards, it does actually # From MSVC 2013 (compiler major version 18) onwards, it does actually