Skip to content

Commit 316ba2b

Browse files
authored
Merge pull request #108 from TheBlueMatt/main
Skip address sanitizer builds on OSX
2 parents 4a2d8a2 + 11c0367 commit 316ba2b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

genbindings.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,8 @@ if [ "$CLANG" != "" -a "$CLANGPP" = "" ]; then
450450
echo "You should create a symlink called clang++-$RUSTC_LLVM_V pointing to $CLANG in $(dirname $CLANG)"
451451
fi
452452

453-
# Finally, if we're on OSX or on Linux, build the final debug binary with address sanitizer (and leave it there)
454-
if [ "$HOST_PLATFORM" = "x86_64-unknown-linux-gnu" -o "$HOST_PLATFORM" = "x86_64-apple-darwin" ]; then
453+
# Finally, if we're on Linux, build the final debug binary with address sanitizer (and leave it there)
454+
if [ "$HOST_PLATFORM" = "x86_64-unknown-linux-gnu" ]; then
455455
if [ "$CLANGPP" != "" ]; then
456456
if is_gnu_sed; then
457457
sed -i.bk 's/,"cdylib"]/]/g' Cargo.toml
@@ -460,9 +460,6 @@ if [ "$HOST_PLATFORM" = "x86_64-unknown-linux-gnu" -o "$HOST_PLATFORM" = "x86_64
460460
sed -i .bk 's/,"cdylib"]/]/g' Cargo.toml
461461
fi
462462

463-
if [ "$CFLAGS_aarch64_apple_darwin" != "" -a "$HOST_OSX" = "true" ]; then
464-
RUSTFLAGS="$BASE_RUSTFLAGS -C target-cpu=apple-a14" RUSTC_BOOTSTRAP=1 cargo rustc $CARGO_BUILD_ARGS --target aarch64-apple-darwin -v -- -Zsanitizer=address -Cforce-frame-pointers=yes || ( mv Cargo.toml.bk Cargo.toml; exit 1)
465-
fi
466463
RUSTFLAGS="$RUSTFLAGS --cfg=test_mod_pointers" RUSTC_BOOTSTRAP=1 cargo rustc $CARGO_BUILD_ARGS -v -- -Zsanitizer=address -Cforce-frame-pointers=yes || ( mv Cargo.toml.bk Cargo.toml; exit 1)
467464
mv Cargo.toml.bk Cargo.toml
468465

@@ -484,7 +481,7 @@ if [ "$HOST_PLATFORM" = "x86_64-unknown-linux-gnu" -o "$HOST_PLATFORM" = "x86_64
484481
echo "WARNING: Please install clang-$RUSTC_LLVM_V and clang++-$RUSTC_LLVM_V to build with address sanitizer"
485482
fi
486483
else
487-
echo "WARNING: Can't use address sanitizer on non-Linux, non-OSX non-x86 platforms"
484+
echo "WARNING: Can't use address sanitizer on non-Linux, non-x86 platforms"
488485
fi
489486

490487
# Now build with LTO on on both C++ and rust, but without cross-language LTO:

0 commit comments

Comments
 (0)