boards/sim/sim/sim/scripts/Make.defs: Disable libcxx availability macros

This commit is contained in:
YAMAMOTO Takashi 2022-01-19 11:16:56 +09:00 committed by Xiang Xiao
parent 6bb7a92a9a
commit 7a576ff056

View File

@ -122,6 +122,14 @@ ifeq ($(CONFIG_LIBCXX),y)
# XXX what to do for windows?
CXXFLAGS += -D__GLIBCXX__
endif
# Disable availability macros.
# The availability on Host OS is not likely appropriate for NuttX.
#
# Note: When compiling NuttX apps, we undefine __APPLE__.
# It makes libcxx __availability header unhappy.
# https://github.com/llvm/llvm-project/blob/2e2999cd44f6ec9a5e396fa0113497ea82582f69/libcxx/include/__availability#L258
CXXFLAGS += -D_LIBCPP_DISABLE_AVAILABILITY
endif
ifeq ($(CONFIG_SIM_ASAN),y)