Pass a preprocessor define to identify us.
Needed so that <stdatomic.h> can identify when a <atomic> header is
available. We need to do this because including <atomic> after
<stdatomic.h> causes compilation to fail, and the cleanest way out of
that situation is to make <stdatomic.h> include <atomic> when it is
using in a C++ context.
Bug: 17007799
Change-Id: Ic5798cb579840c4a49c3eb2c9e468d5f61fb6dd3
(cherry picked from commit 246124b60c15f201071275dc05f3cf498fa97dd4)
diff --git a/libcxx.mk b/libcxx.mk
index b6ab7b7..a325865 100644
--- a/libcxx.mk
+++ b/libcxx.mk
@@ -20,6 +20,7 @@
external/libcxx/include \
$(LOCAL_C_INCLUDES) \
+LOCAL_CFLAGS += -D_USING_LIBCXX
LOCAL_CPPFLAGS += -nostdinc++
LOCAL_LDFLAGS += -nodefaultlibs
LOCAL_LDLIBS += -lm -lc