Make our definition of std::nothrow weak.
We can sometimes fail to link a static executable because of
duplicate definitions of std::nothrow in bionic/libc/bionic/new.cpp
and external/libcxx/src/new.cpp. Fix it by making our definition
weak since it doesn't matter which one ends up being chosen.
Change-Id: Iec02ae89f4a3d2ffe298817240f404e54b109a52
diff --git a/libc/bionic/new.cpp b/libc/bionic/new.cpp
index a0da2fb..c9ce163 100644
--- a/libc/bionic/new.cpp
+++ b/libc/bionic/new.cpp
@@ -21,7 +21,7 @@
#include <async_safe/log.h>
-const std::nothrow_t std::nothrow = {};
+__attribute__((weak)) const std::nothrow_t std::nothrow = {};
void* operator new(std::size_t size) {
void* p = malloc(size);