-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
Extern/dolphin headers are not included by our m2ctx script, so m2c is unaware of low-level structs and functions it should know. This gives suboptimal output for code that calls into dolphin functions.
It should be possible to fix m2ctx with something like this, but last time I tried this it caused failures in some of our CI jobs:
--- a/tools/m2ctx/m2ctx.py
+++ b/tools/m2ctx/m2ctx.py
@@ -10,6 +10,8 @@ from typing import List
here = Path(__file__).parent
root = (here / "../../").resolve()
src = root / "src"
+extern_dolphin_include = root / "extern" / "dolphin" / "include"
+extern_dolphin = root / "extern" / "dolphin" / "include" / "dolphin"
build = root / "build"
header_path = build / "ctx.h"
source_path = build / "ctx.c"
@@ -80,7 +82,8 @@ PCPP_FLAGS = [
def write_header(path: Path):
- files = sorted({f"#include <{file.relative_to(src)}>" for file in src.rglob("*.h")})
+ files = [f"#include <{file.relative_to(src)}>" for file in src.rglob("*.h")]
+ files += [f"#include <{file.relative_to(extern_dolphin_include)}>" for file in extern_dolphin.rglob("*.h")]
path.write_text("\n".join(files), encoding="utf-8")
Metadata
Metadata
Assignees
Labels
No labels