mirror of
https://github.com/ziglang/zig.git
synced 2024-11-30 09:02:32 +00:00
libcxxabi patch: respect NDEBUG
zig patch: respect NDEBUG. Otherwise the file path makes it into the binary, causing non-reproducible builds.
This commit is contained in:
parent
cd1ddca698
commit
98a30acad6
6
lib/libcxxabi/src/abort_message.h
vendored
6
lib/libcxxabi/src/abort_message.h
vendored
@ -15,6 +15,11 @@ extern "C" _LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN void
|
|||||||
abort_message(const char *format, ...) __attribute__((format(printf, 1, 2)));
|
abort_message(const char *format, ...) __attribute__((format(printf, 1, 2)));
|
||||||
|
|
||||||
#ifndef _LIBCXXABI_ASSERT
|
#ifndef _LIBCXXABI_ASSERT
|
||||||
|
// zig patch: respect NDEBUG. Otherwise the file path makes it into the binary,
|
||||||
|
// causing non-reproducible builds.
|
||||||
|
#ifdef NDEBUG
|
||||||
|
#define _LIBCXXABI_ASSERT(a,b) (void)0
|
||||||
|
#else
|
||||||
# define _LIBCXXABI_ASSERT(expr, msg) \
|
# define _LIBCXXABI_ASSERT(expr, msg) \
|
||||||
do { \
|
do { \
|
||||||
if (!(expr)) { \
|
if (!(expr)) { \
|
||||||
@ -24,5 +29,6 @@ abort_message(const char *format, ...) __attribute__((format(printf, 1, 2)));
|
|||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // __ABORT_MESSAGE_H_
|
#endif // __ABORT_MESSAGE_H_
|
||||||
|
Loading…
Reference in New Issue
Block a user