Skip to content

Commit

Permalink
WIP objdiff decomp.me integration
Browse files Browse the repository at this point in the history
this *is* a hack, does not work (e.g. still hitting localhost), just
wanted to see what more was needed
  • Loading branch information
BR- committed Jan 28, 2024
1 parent 75796e9 commit e4cf345
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tools/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,20 @@ def generate_build_ninja(
)
n.newline()

n.comment("Context generation")
n.rule(
name="ctx_gen",
command="pipenv run python tools/m2ctx/m2ctx.py -qfrp",
description="CTX",
)
n.build(
outputs=None,
rule="ctx_gen",
implicit=path([*config.src_dir.rglob("*.h")]),
implicit_outputs=path([config.build_dir / "ctx.c", config.build_dir / "ctx.h", config.build_dir / "ctx.html"]),
)
n.newline()

###
# Source files
###
Expand Down Expand Up @@ -898,10 +912,22 @@ def add_unit(build_obj: Dict[str, Any], module_name: str) -> None:
reverse_fn_order = True
elif value == "nodeferred":
reverse_fn_order = False
str_cflags = " ".join(cflags)
elif type(cflags) is str:
str_cflags = cflags
else:
str_cflags = None

unit_config["base_path"] = src_obj_path
unit_config["reverse_fn_order"] = reverse_fn_order
unit_config["complete"] = obj.completed
unit_config["scratch"] = {
"platform": "PowerPC",
"compiler": "mwcc_233_163n",
"c_flags": str_cflags,
"ctx_path": "build/ctx.h",
"build_ctx": True,
}
objdiff_config["units"].append(unit_config)

# Add DOL units
Expand Down

0 comments on commit e4cf345

Please sign in to comment.