-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor PCH + script dependencies and use a 2-stage pipeline
- Loading branch information
1 parent
1611ac3
commit 03103c1
Showing
17 changed files
with
86 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1131,30 +1131,14 @@ scr_seq_files = files( | |
'scripts_route_230.s', | ||
) | ||
|
||
# Field scripts declare a direct dependency on `trdata.naix` for use in the | ||
# `StartTrainerBattle` command. Ordinarily, we would try to declare this as an | ||
# order-only dependency just to ensure that it is built before this generator | ||
# can be run, then let the individual script files include it as needed, similar | ||
# to message banks. But, there is only one `trdata.naix` file, and script files | ||
# are fast to build anyways, so this is the preferred solution. | ||
field_script_gen = generator(make_script_bin_sh, | ||
arguments: make_script_bin_args, | ||
output: '@BASENAME@', | ||
depfile: '@[email protected]', | ||
depends: [ | ||
message_banks_index, # TODO: Can this be an order-only dependency...? | ||
trdata_naix, | ||
], | ||
) | ||
|
||
scr_seq_narc_order = files('scripts.order') | ||
|
||
scr_seq_narc = custom_target('scr_seq.narc', | ||
output: [ | ||
'scr_seq.narc', | ||
'scr_seq.naix', | ||
], | ||
input: field_script_gen.process( | ||
input: script_bin_gen.process( | ||
scr_seq_files, | ||
extra_args: ['--depfile', '--out-dir', scr_seq_private_dir] | ||
), | ||
|
@@ -1167,5 +1151,5 @@ scr_seq_narc = custom_target('scr_seq.narc', | |
], | ||
) | ||
|
||
nitrofs_files += scr_seq_narc[0] | ||
nitrofs_files += scr_seq_narc | ||
naix_headers += scr_seq_narc[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,28 +20,33 @@ copy_gen = generator(find_program('cp'), | |
output: '@PLAINNAME@' | ||
) | ||
|
||
make_script_bin_args = [ | ||
'-i', relative_source_root / 'include', | ||
'-i', relative_source_root / 'asm', | ||
'-i', '.' / 'res' / 'text', | ||
'-i', '.' / 'res', | ||
'-i', '.', | ||
'--assembler', arm_none_eabi_gcc_exe.full_path(), | ||
'--objcopy', arm_none_eabi_objcopy_exe.full_path(), | ||
'@EXTRA_ARGS@', | ||
'@INPUT@', | ||
] | ||
|
||
make_script_bin_deps = [ | ||
message_banks_index, # for GMM headers | ||
asm_consts_generators, # for ASM headers | ||
c_consts_generators, # for C headers | ||
] | ||
|
||
s_to_bin_gen = generator(make_script_bin_sh, | ||
arguments: make_script_bin_args, | ||
depends: make_script_bin_deps, | ||
output: '@BASENAME@' | ||
# NOTE: The members of the `depends` clause below will always be modified by the | ||
# postconf script to be order-only dependencies. This means that this generator | ||
# will only *wait* to run until after these files have been generated, and it | ||
# *breaks* the dependency-chain if any of these files are edited. However, because | ||
# this generator produces a depfile, the build back-end will still see the correct | ||
# granular headers on which each input source file depends. | ||
script_bin_gen = generator(make_script_bin_sh, | ||
arguments: [ | ||
'-i', relative_source_root / 'include', | ||
'-i', relative_source_root / 'asm', | ||
'-i', '.' / 'res' / 'text', | ||
'-i', '.' / 'res', | ||
'-i', '.', | ||
'--depfile', | ||
'--assembler', arm_none_eabi_gcc_exe.full_path(), | ||
'--objcopy', arm_none_eabi_objcopy_exe.full_path(), | ||
'@EXTRA_ARGS@', | ||
'@INPUT@', | ||
], | ||
depends: [ | ||
message_banks_index, | ||
asm_consts_generators, | ||
c_consts_generators, | ||
trdata_naix, | ||
], | ||
output: '@BASENAME@', | ||
depfile: '@[email protected]', | ||
) | ||
|
||
ncgr_gen = generator(nitrogfx_exe, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters