diff --git a/tools/build/configure.py b/tools/build/configure.py index 97caff0606..64b09fdb6b 100755 --- a/tools/build/configure.py +++ b/tools/build/configure.py @@ -76,9 +76,12 @@ 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", ) + Z64_DEBUG = "" + if debug: + Z64_DEBUG = "-gS -R .data -R .note -R .eh_frame -R .gnu.attributes -R .comment -R .options" ninja.rule("z64", description="rom $out", - command=f"{cross}objcopy $in $out -O binary && {BUILD_TOOLS}/rom/n64crc $out", + command=f"{cross}objcopy $in $out -O binary {Z64_DEBUG} && {BUILD_TOOLS}/rom/n64crc $out", ) ninja.rule("sha1sum", diff --git a/ver/us/splat-debug.yaml b/ver/us/splat-debug.yaml index 1c53be5d40..4254a34cb7 100644 --- a/ver/us/splat-debug.yaml +++ b/ver/us/splat-debug.yaml @@ -1,4 +1,4 @@ options: - linker_discard_section: False + ld_discard_section: False create_elf_section_list_auto: True elf_section_list_path: ver/us/build/elf_sections.txt