File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,12 +4,20 @@ echo "PYTHON_VARIANT: ${PYTHON_VARIANT}"
44
55if [[ " ${PYTHON_VARIANT} " == " freethreading" ]]; then
66 CONFIGURE_EXTRA=" --disable-gil"
7- elif [[ " ${PYTHON_VARIANT} " == " asan" ]]; then
8- CONFIGURE_EXTRA=" --with-address-sanitizer"
9- export ASAN_OPTIONS=" strict_init_order=true"
10- elif [[ " ${PYTHON_VARIANT} " == " tsan_freethreading" ]]; then
11- CONFIGURE_EXTRA=" --disable-gil --with-thread-sanitizer"
12- export TSAN_OPTIONS=" suppressions=${SRC_DIR} /Tools/tsan/suppressions_free_threading.txt"
7+ elif [[ " ${PYTHON_VARIANT} " == * san* ]]; then
8+ if [[ " ${PYTHON_VARIANT} " == " asan" ]]; then
9+ CONFIGURE_EXTRA=" --with-address-sanitizer"
10+ export ASAN_OPTIONS=" strict_init_order=true"
11+ elif [[ " ${PYTHON_VARIANT} " == " tsan_freethreading" ]]; then
12+ CONFIGURE_EXTRA=" --disable-gil --with-thread-sanitizer"
13+ export TSAN_OPTIONS=" suppressions=${SRC_DIR} /Tools/tsan/suppressions_free_threading.txt"
14+ else
15+ echo " Unknown PYTHON_VARIANT: ${PYTHON_VARIANT} "
16+ exit 1
17+ fi
18+ if [[ " $target_platform " == linux-* && " $c_compiler " == " clang" ]]; then
19+ export LDFLAGS=" -shared-libsan $LDFLAGS "
20+ fi
1321elif [[ " ${PYTHON_VARIANT} " == " default" ]]; then
1422 CONFIGURE_EXTRA=" "
1523else
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ outputs:
7272 - libuuid
7373 - libmpdec-devel
7474 - expat
75- - if : osx and "san" in variant
75+ - if : ' "san" in variant'
7676 then :
7777 - libcompiler-rt
7878
You can’t perform that action at this time.
0 commit comments