diff options
author | Damien George <damien.p.george@gmail.com> | 2020-04-19 21:09:22 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-04-22 14:03:07 +1000 |
commit | 1cc24cd39a971a03fe397ce575e59aa7d9b48e3b (patch) | |
tree | ed4bb70588e72652647b11af07f4cef2c7a7faa8 /tools/metrics.py | |
parent | a4423570e2421c61886e7e28333298042bb349a2 (diff) |
tools/metrics.py: Don't build mpy-cross if not needed by any ports.
To save build time.
Diffstat (limited to 'tools/metrics.py')
-rwxr-xr-x | tools/metrics.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/metrics.py b/tools/metrics.py index d08a7462a..e603c43de 100755 --- a/tools/metrics.py +++ b/tools/metrics.py @@ -54,6 +54,7 @@ class PortData: self.dir = dir self.output = output self.make_flags = make_flags + self.needs_mpy_cross = dir not in ("bare-arm", "minimal") port_data = { @@ -185,8 +186,9 @@ def do_build(args): ports = parse_port_list(args) - print("BUILDING MPY-CROSS") - syscmd("make", "-C", "mpy-cross", MAKE_FLAGS) + if any(port.needs_mpy_cross for port in ports): + print("BUILDING MPY-CROSS") + syscmd("make", "-C", "mpy-cross", MAKE_FLAGS) print("BUILDING PORTS") for port in ports: |