[FFmpeg-devel] [PATCH 1/5] configure: allow multiple sanitizers in --toolchain
Kacper Michajłow
kasper93 at gmail.com
Thu Jul 17 04:14:51 EEST 2025
For example this allows --toolchain=clang-asan-usan.
Signed-off-by: Kacper Michajłow <kasper93 at gmail.com>
---
configure | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 10dafae8e2..85712380c0 100755
--- a/configure
+++ b/configure
@@ -4638,14 +4638,21 @@ add_sanitizer_flags(){
esac
}
+add_sanitizers(){
+ IFS=- read -ra sanitizers <<< "$1"
+ for sanitizer in "${sanitizers[@]}"; do
+ add_sanitizer_flags "$sanitizer"
+ done
+}
+
case "$toolchain" in
clang-*)
- add_sanitizer_flags "${toolchain#clang-}"
+ add_sanitizers "${toolchain#clang-}"
cc_default="clang"
cxx_default="clang++"
;;
gcc-*)
- add_sanitizer_flags "${toolchain#gcc-}"
+ add_sanitizers "${toolchain#gcc-}"
cc_default="gcc"
cxx_default="g++"
# In case of tsan with gcc, PIC has to be enabled
--
2.50.1
More information about the ffmpeg-devel
mailing list