- LOCAL_CFLAGS="$LOCAL_CFLAGS -isysroot$(xcrun --show-sdk-path) -mmacosx-version-min=10.9"
- BASE_HOST_CFLAGS="$BASE_HOST_CFLAGS -isysroot$(xcrun --show-sdk-path) -mmacosx-version-min=10.9"
+ LOCAL_CFLAGS="$LOCAL_CFLAGS --target=$HOST_PLATFORM -isysroot$(xcrun --show-sdk-path) -mmacosx-version-min=10.9"
+ BASE_HOST_CFLAGS="$BASE_HOST_CFLAGS --target=$HOST_PLATFORM -isysroot$(xcrun --show-sdk-path) -mmacosx-version-min=10.9"
# Targeting aarch64 appears to be supported only starting with Big Sur, so check it before use
clang -o /dev/null $BASE_HOST_CFLAGS --target=aarch64-apple-darwin -mcpu=apple-a14 genbindings_path_map_test_file.c &&
export CFLAGS_aarch64_apple_darwin="$BASE_HOST_CFLAGS --target=aarch64-apple-darwin -mcpu=apple-a14" ||
# Targeting aarch64 appears to be supported only starting with Big Sur, so check it before use
clang -o /dev/null $BASE_HOST_CFLAGS --target=aarch64-apple-darwin -mcpu=apple-a14 genbindings_path_map_test_file.c &&
export CFLAGS_aarch64_apple_darwin="$BASE_HOST_CFLAGS --target=aarch64-apple-darwin -mcpu=apple-a14" ||
if cargo +nightly --version >/dev/null 2>&1; then
LLVM_V=$(rustc +nightly --version --verbose | grep "LLVM version" | awk '{ print substr($3, 0, 2); }')
if [ -x "$(which clang-$LLVM_V)" ]; then
if cargo +nightly --version >/dev/null 2>&1; then
LLVM_V=$(rustc +nightly --version --verbose | grep "LLVM version" | awk '{ print substr($3, 0, 2); }')
if [ -x "$(which clang-$LLVM_V)" ]; then
fi
# Finally, if we're on OSX or on Linux, build the final debug binary with address sanitizer (and leave it there)
fi
# Finally, if we're on OSX or on Linux, build the final debug binary with address sanitizer (and leave it there)
if [ "$CLANGPP" != "" ]; then
if [ "$HOST_OSX" = "true" ]; then
# OSX sed is for some reason not compatible with GNU sed
if [ "$CLANGPP" != "" ]; then
if [ "$HOST_OSX" = "true" ]; then
# OSX sed is for some reason not compatible with GNU sed