1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-04 23:14:37 +00:00

Small asm-processor optimization (#459)

Co-authored-by: zelda2774 <zelda2774@invalid>
This commit is contained in:
zelda2774 2020-10-19 01:10:31 +02:00 committed by GitHub
parent d02153707e
commit 9e5cbcdd57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 10 deletions

View file

@ -35,7 +35,7 @@ try:
asmproc_flags = opt_flags + [in_file, '--input-enc', 'utf-8', '--output-enc', 'euc-jp']
compile_cmdline = compiler + compile_args + ['-I', in_dir, '-o', out_file, preprocessed_file.name]
asm_processor.run(asmproc_flags, outfile=preprocessed_file)
functions = asm_processor.run(asmproc_flags, outfile=preprocessed_file)
try:
subprocess.check_call(compile_cmdline)
except subprocess.CalledProcessError as e:
@ -47,6 +47,6 @@ try:
# To keep the preprocessed file:
# os._exit(1)
asm_processor.run(asmproc_flags + ['--post-process', out_file, '--assembler', assembler_sh, '--asm-prelude', prelude])
asm_processor.run(asmproc_flags + ['--post-process', out_file, '--assembler', assembler_sh, '--asm-prelude', prelude], functions=functions)
finally:
os.remove(preprocessed_file.name)