mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
Fix z64 building in debug mode (#822)
This commit is contained in:
parent
f12e57b7c4
commit
c1c1dfd533
@ -76,17 +76,9 @@ def write_ninja_rules(ninja: ninja_syntax.Writer, cpp: str, cppflags: str, extra
|
||||
command=f"{cross}ld -T ver/$version/build/undefined_syms.txt -T ver/$version/undefined_syms_auto.txt -T ver/$version/undefined_funcs_auto.txt -Map $mapfile --no-check-sections -T $in -o $out",
|
||||
)
|
||||
|
||||
objcopy_sections = ""
|
||||
if debug:
|
||||
ninja.rule("genobjcopy",
|
||||
description="generate $out",
|
||||
command=f"$python {BUILD_TOOLS}/genobjcopy.py $in $out",
|
||||
)
|
||||
objcopy_sections = "@ver/$version/build/objcopy_sections.txt "
|
||||
|
||||
ninja.rule("z64",
|
||||
description="rom $out",
|
||||
command=f"{cross}objcopy {objcopy_sections} $in $out -O binary && {BUILD_TOOLS}/rom/n64crc $out",
|
||||
command=f"{cross}objcopy $in $out -O binary && {BUILD_TOOLS}/rom/n64crc $out",
|
||||
)
|
||||
|
||||
ninja.rule("sha1sum",
|
||||
@ -262,9 +254,6 @@ class Configure:
|
||||
def build_path(self) -> Path:
|
||||
return Path(f"ver/{self.version}/build")
|
||||
|
||||
def objcopy_sections_path(self) -> Path:
|
||||
return self.build_path() / "objcopy_sections.txt"
|
||||
|
||||
def undefined_syms_path(self) -> Path:
|
||||
return self.build_path() / "undefined_syms.txt"
|
||||
|
||||
@ -657,14 +646,6 @@ class Configure:
|
||||
else:
|
||||
raise Exception(f"don't know how to build {seg.__class__.__name__} '{seg.name}'")
|
||||
|
||||
# Create objcopy section list
|
||||
if debug:
|
||||
ninja.build(
|
||||
str(self.objcopy_sections_path()),
|
||||
"genobjcopy",
|
||||
str(self.build_path() / "elf_sections.txt"),
|
||||
)
|
||||
|
||||
# Run undefined_syms through cpp
|
||||
ninja.build(
|
||||
str(self.undefined_syms_path()),
|
||||
@ -674,8 +655,6 @@ class Configure:
|
||||
|
||||
# Build elf, z64, ok
|
||||
additional_objects = [str(self.undefined_syms_path())]
|
||||
if debug:
|
||||
additional_objects += [str(self.objcopy_sections_path())]
|
||||
|
||||
ninja.build(
|
||||
str(self.elf_path()),
|
||||
|
Loading…
Reference in New Issue
Block a user