Allow adding re-configure dependencies and doing non-matching builds (#22)

* Fix type checking errors with config version

* Add optional reconfigure dependency list to project config

* Add non-matching build option
Skips hash check and progress output

* Uncomment `config.reconfig_deps` assignment

* Change default target for non-matching instead of stubbing check/progress
This commit is contained in:
Nathan
2024-05-18 14:50:32 -06:00
committed by GitHub
parent d102696838
commit cf654dd8ad
2 changed files with 25 additions and 5 deletions

View File

@@ -105,10 +105,16 @@ parser.add_argument(
action="store_true",
help="print verbose output",
)
parser.add_argument(
"--non-matching",
dest="non_matching",
action="store_true",
help="builds equivalent (but non-matching) or modded objects",
)
args = parser.parse_args()
config = ProjectConfig()
config.version = args.version
config.version = str(args.version)
version_num = VERSIONS.index(config.version)
# Apply arguments
@@ -118,6 +124,7 @@ config.binutils_path = args.binutils
config.compilers_path = args.compilers
config.debug = args.debug
config.generate_map = args.map
config.non_matching = args.non_matching
config.sjiswrap_path = args.sjiswrap
if not is_windows():
config.wrapper = args.wrapper
@@ -146,6 +153,8 @@ config.ldflags = [
"-nodefaults",
# "-listclosure", # Uncomment for Wii linkers
]
# Use for any additional files that should cause a re-configure when modified
config.reconfig_deps = []
# Base flags, common to most GC/Wii games.
# Generally leave untouched, with overrides added below.
@@ -220,8 +229,9 @@ def Rel(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
}
Matching = True
NonMatching = False
Matching = True # Object matches and should be linked
NonMatching = False # Object does not match and should not be linked
Equivalent = config.non_matching # Object should be linked when configured with --non-matching
config.warn_missing_config = True
config.warn_missing_source = False