From 76bfcd4ab2fb081eb97d6ba1569e0c9921e44d4a Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 3 Feb 2017 16:16:11 -0800 Subject: [PATCH] Add c_std and cpp_std properties. Test: Checked showcommands ouput for each setting. Bug: None Change-Id: Ibc25f3977eaaecfd1fb99a27c9e15acae0ec4106 --- core/binary.mk | 17 +++++++++++++++-- core/clear_vars.mk | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/core/binary.mk b/core/binary.mk index 4986c85d6..304a72ec1 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -394,8 +394,21 @@ else ifeq ($(my_clang),) my_clang := true endif -my_c_std_version := $(DEFAULT_C_STD_VERSION) -my_cpp_std_version := $(DEFAULT_CPP_STD_VERSION) +ifeq ($(LOCAL_C_STD),) + my_c_std_version := $(DEFAULT_C_STD_VERSION) +else ifeq ($(LOCAL_C_STD),experimental) + my_c_std_version := $(EXPERIMENTAL_C_STD_VERSION) +else + my_c_std_version := $(LOCAL_C_STD) +endif + +ifeq ($(LOCAL_CPP_STD),) + my_cpp_std_version := $(DEFAULT_CPP_STD_VERSION) +else ifeq ($(LOCAL_CPP_STD),experimental) + my_cpp_std_version := $(EXPERIMENTAL_CPP_STD_VERSION) +else + my_cpp_std_version := $(LOCAL_CPP_STD) +endif ifneq ($(my_clang),true) # GCC uses an invalid C++14 ABI (emits calls to diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 6e61d153f..02e574fe6 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -224,6 +224,8 @@ LOCAL_VTS_INCLUDES:= LOCAL_WARNINGS_ENABLE:= LOCAL_WHOLE_STATIC_LIBRARIES:= LOCAL_YACCFLAGS:= +LOCAL_C_STD:= +LOCAL_CPP_STD:= OVERRIDE_BUILT_MODULE_PATH:= # arch specific variables