From d4b1d66dbe28818df3408a920ef37a3e0afca0aa Mon Sep 17 00:00:00 2001 From: Jack He Date: Wed, 18 Oct 2017 00:26:16 -0700 Subject: Add -fno-exceptions to default build config * C++ exceptions are expensive and are not used in our code * We need to disable exception to achieve desired behavior for std::stoi, which we don't want it to crash when failing to parse an incoming integer Test: make, net_test_osi Change-Id: Idc363ff1f25f085c75df3c473ee4d2a210af3b17 --- build/Android.bp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'build/Android.bp') diff --git a/build/Android.bp b/build/Android.bp index 8e4d6867c..ad1252b50 100644 --- a/build/Android.bp +++ b/build/Android.bp @@ -18,7 +18,8 @@ fluoride_defaults { name: "fluoride_types_defaults", cflags: [ "-DEXPORT_SYMBOL=__attribute__((visibility(\"default\")))", - "-fvisibility=hidden", + "-fno-exceptions", + "-fvisibility=hidden", "-Wall", "-Wextra", "-Werror", -- cgit v1.2.3