Skip to content

Commit

Permalink
Disable c++ static destructors on exit that is causing crashes within…
Browse files Browse the repository at this point in the history
… the destructors on app termination
  • Loading branch information
rawadhilal88 authored and Rawad Hilal committed May 23, 2023
1 parent c24294a commit 2b292f2
Showing 1 changed file with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,31 @@ for define in "${defines[@]}"; do

# skip over those that GN does for us
case "$define" in
CHIP_HAVE_CONFIG_H)
continue
;;
CHIP_HAVE_CONFIG_H)
continue
;;
esac
target_defines+=,\"${define//\"/\\\"}\"
done
target_defines=[${target_defines:1}]

declare target_cpu=
case $PLATFORM_PREFERRED_ARCH in
i386)
target_cpu=x86
;;
x86_64)
target_cpu=x64
;;
armv7)
target_cpu=arm
;;
arm64)
target_cpu=arm64
;;
*)
echo >&2
;;
i386)
target_cpu=x86
;;
x86_64)
target_cpu=x64
;;
armv7)
target_cpu=arm
;;
arm64)
target_cpu=arm64
;;
*)
echo >&2
;;
esac

declare target_cflags='"-target","'"$PLATFORM_PREFERRED_ARCH"'-'"$LLVM_TARGET_TRIPLE_VENDOR"'-'"$LLVM_TARGET_TRIPLE_OS_VERSION"'"'
Expand All @@ -91,6 +91,8 @@ done
target_cflags+=',"-flto"'
}

target_cflags+=',"-fno-c++-static-destructors"'

declare -a args=(
'default_configs_cosmetic=[]' # suppress colorization
'chip_crypto="mbedtls"'
Expand Down

0 comments on commit 2b292f2

Please sign in to comment.