| ... | @@ -15,6 +15,11 @@ extern "C" _LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN void | ... | @@ -15,6 +15,11 @@ extern "C" _LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN void |
| 15 | abort_message(const char *format, ...) __attribute__((format(printf, 1, 2))); | 15 | abort_message(const char *format, ...) __attribute__((format(printf, 1, 2))); |
| 16 | | 16 | |
| 17 | #ifndef _LIBCXXABI_ASSERT | 17 | #ifndef _LIBCXXABI_ASSERT |
| | 18 | // zig patch: respect NDEBUG. Otherwise the file path makes it into the binary, |
| | 19 | // causing non-reproducible builds. |
| | 20 | #ifdef NDEBUG |
| | 21 | #define _LIBCXXABI_ASSERT(a,b) (void)0 |
| | 22 | #else |
| 18 | # define _LIBCXXABI_ASSERT(expr, msg) \ | 23 | # define _LIBCXXABI_ASSERT(expr, msg) \ |
| 19 | do { \ | 24 | do { \ |
| 20 | if (!(expr)) { \ | 25 | if (!(expr)) { \ |
| ... | @@ -24,5 +29,6 @@ abort_message(const char *format, ...) __attribute__((format(printf, 1, 2))); | ... | @@ -24,5 +29,6 @@ abort_message(const char *format, ...) __attribute__((format(printf, 1, 2))); |
| 24 | } while (false) | 29 | } while (false) |
| 25 | | 30 | |
| 26 | #endif | 31 | #endif |
| | 32 | #endif |
| 27 | | 33 | |
| 28 | #endif // __ABORT_MESSAGE_H_ | 34 | #endif // __ABORT_MESSAGE_H_ |