Fix misplaced `None` assignment in project.py (#20)

This commit is contained in:
Robin Avery 2024-03-14 19:18:01 -04:00 committed by GitHub
parent afb82c88dc
commit 5ea53e5a59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -688,6 +688,7 @@ def generate_build_ninja(
).with_suffix(".s")
link_built_obj = obj.completed
built_obj_path: Optional[Path] = None
if unit_src_path.exists():
if unit_src_path.suffix in (".c", ".cp", ".cpp"):
# Add MWCC & host build rules
@ -703,7 +704,6 @@ def generate_build_ninja(
link_built_obj = False
# Assembly overrides
built_obj_path: Optional[Path] = None
if unit_asm_path is not None and unit_asm_path.exists():
link_built_obj = True
built_obj_path = asm_build(obj, options, lib_name, unit_asm_path)