tools: Use bundled copy of objdump to simplify setup

This commit is contained in:
Léo Lam 2021-07-23 18:05:23 +02:00
parent 0ebf0dac9b
commit 206d7781e5
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
3 changed files with 15 additions and 2 deletions

1
.gitignore vendored
View File

@ -29,5 +29,4 @@ perf.mData.old
.gdb_history
.DS_Store
tools/aarch64-none-elf-objdump
toolchain/clang/

Binary file not shown.

View File

@ -1,4 +1,18 @@
from pathlib import Path
import platform
ROOT = Path(__file__).resolve().parent.parent
def get_tools_bin_dir():
path = ROOT / 'tools' / 'nx-decomp-tools-binaries'
system = platform.system()
if system == "Linux":
return str(path) + "/linux/"
if system == "Darwin":
return str(path) + "/macos/"
return ""
def apply(config, args):
@ -6,7 +20,7 @@ def apply(config, args):
config['baseimg'] = 'data/main.elf'
config['myimg'] = 'build/uking'
config['source_directories'] = ['src', 'lib']
config['objdump_executable'] = 'tools/aarch64-none-elf-objdump'
config['objdump_executable'] = get_tools_bin_dir() + 'aarch64-none-elf-objdump'
for dir in ('build', 'build/nx64-release'):
if (Path(dir) / 'build.ninja').is_file():