Repository: flutter
Issue: Local Android Profile & Release builds fail due to missing symbols referenced by the Dart VM.
Labels: platform-android,engine,dependency: dart,P2,team-android,triaged-android

Build flags are: `flutter/tools/gn --unopt --runtime-mode release --no-lto && flutter/tools/gn --unopt --runtime-mode release --no-lto --android && ninja -C out/android_release_unopt && ninja -C out/host_release_unopt`

There seem to be two issues:

1: `native_symbol_android.cc` seems to reference the missing native symbol `__cxa_demangle`
```
ninja: Entering directory `out/android_release_unopt'
[3090/3176] SOLINK ./libflutter.so
FAILED: libflutter.so libflutter.so.TOC lib.stripped/libflutter.so 
/Users/chinmaygarde/goma/gomacc ../../buildtools/mac-x64/clang/bin/clang++ -shared -Wl,--version-script=/Users/chinmaygarde/VersionControlled/engine/src/flutter/shell/platform/android/android_exports.lst -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs --gcc-toolchain=../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 -Wl,--no-undefined -Wl,--exclude-libs,ALL -fuse-ld=lld -Wl,--icf=all --target=arm-linux-androideabi -Wl,--warn-shared-textrel -nostdlib --sysroot=/Users/chinmaygarde/VersionControlled/engine/src/third_party/android_tools/ndk/platforms/android-16/arch-arm  -L../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a  -o ./libflutter.so -Wl,--build-id -Wl,-soname=libflutter.so @./libflutter.so.rsp && { /Users/chinmaygarde/goma/gomacc ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-readelf -d ./libflutter.so | grep SONAME ; /Users/chinmaygarde/goma/gomacc ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-nm -gD -f p ./libflutter.so | cut -f1-2 -d' '; } > ./libflutter.so.tmp && if ! cmp -s ./libflutter.so.tmp ./libflutter.so.TOC; then mv ./libflutter.so.tmp ./libflutter.so.TOC; fi && ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded -o lib.stripped/libflutter.so.tmp libflutter.so && if ! cmp -s lib.stripped/libflutter.so.tmp lib.stripped/libflutter.so; then mv lib.stripped/libflutter.so.tmp lib.stripped/libflutter.so; fi
ld.lld: error: undefined symbol: __cxa_demangle
>>> referenced by native_symbol_android.cc:33 (../../third_party/dart/runtime/vm/native_symbol_android.cc:33)
>>>               obj/third_party/dart/runtime/vm/libdart_vm_precompiled_runtime.native_symbol_android.o:(dart::NativeSymbolResolver::LookupSymbolName(unsigned int, unsigned int*))
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
[3161/3176] CXX clang_x86/obj/third_party/dart/runtime/vm/compiler/aot/libdart_vm_nosnapshot_with_precompiler.precompiler.o^C
ninja: build stopped: interrupted by user.
```

2: `build/gn_run_binary.py` seems to be passed in the unrecognized flag `enable_asserts`
```
python ../../build/gn_run_binary.py clang_x86/gen_snapshot --snapshot_kind=core --enable_mirrors=false --vm_snapshot_data=/Users/chinmaygarde/VersionControlled/engine/src/out/android_release_unopt/gen/flutter/lib/snapshot/vm_isolate_snapshot.bin --vm_snapshot_instructions=/Users/chinmaygarde/VersionControlled/engine/src/out/android_release_unopt/gen/flutter/lib/snapshot/vm_snapshot_instructions.bin --isolate_snapshot_data=/Users/chinmaygarde/VersionControlled/engine/src/out/android_release_unopt/gen/flutter/lib/snapshot/isolate_snapshot.bin --isolate_snapshot_instructions=/Users/chinmaygarde/VersionControlled/engine/src/out/android_release_unopt/gen/flutter/lib/snapshot/isolate_snapshot_instructions.bin --enable_asserts /Users/chinmaygarde/VersionControlled/engine/src/out/android_release_unopt/flutter_patched_sdk/platform_strong.dill
Setting VM flags failed: Unrecognized flags: enable_asserts
```