From a823bee9d349b7cd51536ee7751c1ab6d36265f9 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 8 Aug 2022 11:12:55 -0700 Subject: [PATCH] libprocessgroup: Switch from gnu++-17 to gnu++-20 This change enables headers like . Inside the header file file the following guard makes its functionality unavailable when building with std=gnu++-17: #if _LIBCPP_STD_VER > 17 [ ... ] #endif Bug: 213617178 Change-Id: I5c40708ea196ab112990b5ca6fae9370b75f8752 Signed-off-by: Bart Van Assche --- libprocessgroup/Android.bp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/libprocessgroup/Android.bp b/libprocessgroup/Android.bp index 7b0e0d301..c6a073789 100644 --- a/libprocessgroup/Android.bp +++ b/libprocessgroup/Android.bp @@ -2,6 +2,17 @@ package { default_applicable_licenses: ["Android-Apache-2.0"], } +cc_defaults { + name: "libprocessgroup_defaults", + cpp_std: "gnu++20", + cflags: [ + "-Wall", + "-Werror", + "-Wexit-time-destructors", + "-Wno-unused-parameter", + ], +} + cc_library_headers { name: "libprocessgroup_headers", vendor_available: true, @@ -62,11 +73,7 @@ cc_library { export_header_lib_headers: [ "libprocessgroup_headers", ], - cflags: [ - "-Wall", - "-Werror", - "-Wexit-time-destructors", - ], + defaults: ["libprocessgroup_defaults"], apex_available: [ "//apex_available:platform", "//apex_available:anyapex", @@ -77,12 +84,7 @@ cc_library { cc_test { name: "task_profiles_test", host_supported: true, - cflags: [ - "-Wall", - "-Werror", - "-Wexit-time-destructors", - "-Wno-unused-parameter", - ], + defaults: ["libprocessgroup_defaults"], srcs: [ "task_profiles_test.cpp", ],