Escape object paths once at the source and drop a dead parameter

This commit is contained in:
J. Nick Koston
2026-08-20 04:39:50 -05:00
parent db010d486e
commit 7cb22725e3
3 changed files with 11 additions and 9 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ def run_compile(config: ConfigType, verbose: bool) -> int:
# regeneration (a ninja spawn plus MBs of text) on unchanged builds.
if ninja_changed or not (build_dir / "compile_commands.json").is_file():
_write_compile_commands(paths["ninja_path"], build_dir, env)
_print_size_summary(build_dir, paths["toolchain_path"])
_print_size_summary(build_dir)
get_idedata()
return 0
@@ -125,7 +125,7 @@ def _parse_app_size(build_dir: Path) -> int | None:
return app_size
def _print_size_summary(build_dir: Path, toolchain_path: Path) -> None:
def _print_size_summary(build_dir: Path) -> None:
"""Print the PlatformIO-shaped RAM/Flash lines.
The exact shape (including the bar) is parsed by
+3 -1
View File
@@ -410,7 +410,9 @@ def _ninja_compile_edges(
lines.append(f"build {_e(obj)}: {_RULE_FOR_SUFFIX[src.suffix]} {_e(src)}")
if flags:
lines.append(f" flags = {flags}")
objects.append(obj)
# Escaped once here: the returned paths only ever appear in build
# statements (archive/link inputs), which use ninja escaping.
objects.append(_e(obj))
return objects