libxx: Add CXX_STANDARD to select -std=c++??

and default to "c++17"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-01-16 02:17:19 +08:00
committed by Petro Karashchenko
parent 6b4da4ad6e
commit f64da13e9b
14 changed files with 54 additions and 1 deletions
+4
View File
@@ -82,6 +82,10 @@ ARCHCXXFLAGS += -fno-common -nostdinc++
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef
ARCHCXXFLAGS += -Wall -Wshadow -Wundef
ifneq ($(CONFIG_CXX_STANDARD),)
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
endif
ifneq ($(CONFIG_CXX_EXCEPTION),y)
ARCHCXXFLAGS += -fno-exceptions -fcheck-new
endif