blob: 6b0c0d203d9746ea7a6cdf3a3e6208971d66679c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
# Disable the _md_check_consistency debug helpers in hashtable.h.
#
# Upstream gates these blocks behind `#ifndef NDEBUG`. Under the Arcadia build
# NDEBUG is not always defined, so the asserts compile in and break the build.
# Replacing the guard with `#if 0` keeps the blocks permanently disabled.
#
# Both `#ifndef NDEBUG` occurrences in this header guard the same helper, so an
# unconditional replacement is safe.
# See NOCDEV-18704, DEVTOOLSSUPPORT-88661, NOCDEVDUTY-5981
set -e
# macOS ships BSD sed (incompatible `-i` syntax); use GNU sed (gsed) there.
if [ "$(uname)" = "Darwin" ]; then
SED=gsed
else
SED=sed
fi
"$SED" -i 's/^#ifndef NDEBUG$/#if 0/' multidict/_multilib/hashtable.h
|