Skip to content

Commit 3dbfe98

Browse files
lucascolleyisuruf
andcommitted
gh-155375: -shared-libsan for linux ASAN builds
[skip ci] Co-authored-by: Isuru Fernando <isuruf@gmail.com>
1 parent 5e0c502 commit 3dbfe98

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎Tools/pixi-packages/build.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ if [[ "${PYTHON_VARIANT}" == "freethreading" ]]; then
77
elif [[ "${PYTHON_VARIANT}" == "asan" ]]; then
88
CONFIGURE_EXTRA="--with-address-sanitizer"
99
export ASAN_OPTIONS="strict_init_order=true"
10+
if [[ "$target_platform" == linux-* && "$c_compiler" == "clang" ]]; then
11+
export LDFLAGS="-shared-libsan $LDFLAGS"
12+
fi
1013
elif [[ "${PYTHON_VARIANT}" == "tsan_freethreading" ]]; then
1114
CONFIGURE_EXTRA="--disable-gil --with-thread-sanitizer"
1215
export TSAN_OPTIONS="suppressions=${SRC_DIR}/Tools/tsan/suppressions_free_threading.txt"

‎Tools/pixi-packages/recipe.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)