Use stdlib=libc++ when CONFIG_USE_LIBCXX is true for clang

This commit is contained in:
0xC0ncord 2022-05-07 13:17:29 -04:00
parent aa63cf1d19
commit db410a2ab2

View file

@ -45,6 +45,9 @@ ifeq ($(CONFIG_CXX_ALLOCATOR),true)
# make sure LTO is compatible in case CC and CXX don't match (such as clang and g++)
CXX := $(CC)
ifeq ($(CONFIG_USE_LIBCXX),true)
ifeq ($(CXX),clang)
CXXFLAGS += -stdlib=libc++
endif
LDLIBS += -lc++
else
LDLIBS += -lstdc++