File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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+
150173run_patch " List WebInteractive.cpp in sources" ' --- a/cmake/sources.cmake
151174+++ b/cmake/sources.cmake
152175@@
You can’t perform that action at this time.
0 commit comments