mirror of
https://github.com/esphome/esphome.git
synced 2026-10-06 19:06:37 +00:00
Escape object paths once at the source and drop a dead parameter
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user