From db410a2ab21fc2ec7b3b89c0e1a39fc23b4f3a7e Mon Sep 17 00:00:00 2001 From: 0xC0ncord Date: Sat, 7 May 2022 13:17:29 -0400 Subject: [PATCH] Use stdlib=libc++ when CONFIG_USE_LIBCXX is true for clang --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 94f1d8f..064fada 100644 --- a/Makefile +++ b/Makefile @@ -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++