Skip to content

Commit 4f3c316

Browse files
committed
latest. hopefully good and interactive?
1 parent 45d3006 commit 4f3c316

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

patchVampireInteractive.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,29 @@ run_patch "Relax TermOrderingDiagram asserts for Emscripten" '--- a/Kernel/TermO
147147
+#endif
148148
'
149149

150+
# Fallback: guard TermOrderingDiagram static_asserts if patch context doesn't match
151+
TOD_PATH="$ROOT_DIR/Kernel/TermOrderingDiagram.hpp"
152+
if [[ -f "$TOD_PATH" ]]; then
153+
TOD_PATH="$TOD_PATH" python - <<'PY'
154+
from pathlib import Path
155+
import os
156+
157+
path = Path(os.environ["TOD_PATH"])
158+
text = path.read_text()
159+
needle = (
160+
" static_assert(sizeof(uint64_t) == sizeof(Branch));\n"
161+
" static_assert(sizeof(uint64_t) == sizeof(TermList));\n"
162+
" static_assert(sizeof(uint64_t) == sizeof(void*));\n"
163+
" static_assert(sizeof(uint64_t) == sizeof(intptr_t));\n"
164+
)
165+
if needle in text and "__EMSCRIPTEN__" not in text:
166+
repl = "#ifndef __EMSCRIPTEN__\n" + needle + "#endif\n"
167+
text = text.replace(needle, repl, 1)
168+
path.write_text(text)
169+
print("Applied: Relax TermOrderingDiagram asserts for Emscripten (fallback)")
170+
PY
171+
fi
172+
150173
run_patch "List WebInteractive.cpp in sources" '--- a/cmake/sources.cmake
151174
+++ b/cmake/sources.cmake
152175
@@

0 commit comments

Comments
 (0)