tools/metrics.py: Don't build mpy-cross if not needed by any ports.

To save build time.
This commit is contained in:
Damien George 2020-04-19 21:09:22 +10:00
parent a4423570e2
commit 1cc24cd39a

View File

@ -54,6 +54,7 @@ class PortData:
self.dir = dir self.dir = dir
self.output = output self.output = output
self.make_flags = make_flags self.make_flags = make_flags
self.needs_mpy_cross = dir not in ("bare-arm", "minimal")
port_data = { port_data = {
@ -185,8 +186,9 @@ def do_build(args):
ports = parse_port_list(args) ports = parse_port_list(args)
print("BUILDING MPY-CROSS") if any(port.needs_mpy_cross for port in ports):
syscmd("make", "-C", "mpy-cross", MAKE_FLAGS) print("BUILDING MPY-CROSS")
syscmd("make", "-C", "mpy-cross", MAKE_FLAGS)
print("BUILDING PORTS") print("BUILDING PORTS")
for port in ports: for port in ports: