Use C++ standard lib from toolchain

Signed-off-by: trns1997 <trns1997@gmail.com>
This commit is contained in:
trns1997
2024-02-26 18:46:20 +08:00
committed by Xiang Xiao
parent 113ab704c7
commit 54e9e582d5
22 changed files with 155 additions and 28 deletions

View File

@@ -481,15 +481,17 @@ if(WIN32)
else()
add_compile_options(
# system wide warnings
-Wall
$<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>
-Wshadow
-Wundef
-Wall $<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes> -Wshadow -Wundef
# system wide options
$<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>
$<$<COMPILE_LANGUAGE:ASM>:-D__ASSEMBLY__>)
endif()
if(NOT CONFIG_LIBCXXTOOLCHAIN)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>)
else()
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-D_STDLIB_H_>)
endif()
if(NOT CONFIG_CXX_EXCEPTION)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
$<$<COMPILE_LANGUAGE:CXX>:-fcheck-new>)