Build libcodec2_client with gnu++20
Bug: http://b/343951602
Explicitly set cpp_std for libcodec2_client to gnu++20. The default
inherited from libcodec2-impl-defaults sets it to gnu++17 which causes a
segfault when mixing global std::string symbols built with gnu++17 and
gnu++20. Once the libcodec2-impl-defaults setting to gnu++17 is
removed, this can be cleaned up.
Test: lunch aosp_cf_x86_64_phone-userdebug && m && acloud create with clang-r522817
Change-Id: I72991835a29ef923284e81fdf3c1dd28a6b99663
diff --git a/media/codec2/hal/client/Android.bp b/media/codec2/hal/client/Android.bp
index af6f4ae..864eeb8 100644
--- a/media/codec2/hal/client/Android.bp
+++ b/media/codec2/hal/client/Android.bp
@@ -33,6 +33,13 @@
"libcodec2-aidl-client-defaults",
],
+ // http://b/343951602#comment4 Explicitly set cpp_std to gnu++20. The
+ // default inherited from libcodec2-impl-defaults sets it to gnu++17 which
+ // causes a segfault when mixing global std::string symbols built with
+ // gnu++17 and gnu++20. TODO(b/343951602): clean this after
+ // libcodec2-impl-defaults opt into gnu++17 is removed.
+ cpp_std: "gnu++20",
+
header_libs: [
"libcodec2_internal", // private
],