authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-05-08 16:05:27-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-05-08 19:37:30-07:00
log98a30acad6f28825cd93a9d478f6f2b84333bcb6
tree936d930cde941f93dafcacc1e126dbaea6b58898
parentcd1ddca698bac817d356a1c10222734cdc98a51f

libcxxabi patch: respect NDEBUG

zig patch: respect NDEBUG. Otherwise the file path makes it into the binary, causing non-reproducible builds.

1 files changed, 6 insertions(+), 0 deletions(-)

lib/libcxxabi/src/abort_message.h+6
...@@ -15,6 +15,11 @@ extern "C" _LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN void...@@ -15,6 +15,11 @@ extern "C" _LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN void
15abort_message(const char *format, ...) __attribute__((format(printf, 1, 2)));15abort_message(const char *format, ...) __attribute__((format(printf, 1, 2)));
1616
17#ifndef _LIBCXXABI_ASSERT17#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)
2530
26#endif31#endif
32#endif
2733
28#endif // __ABORT_MESSAGE_H_34#endif // __ABORT_MESSAGE_H_