@@ -91,19 +91,19 @@ def set_boards_to_build(build_all):
91
91
port_to_boards [port ].add (board_id )
92
92
board_to_port [board_id ] = port
93
93
94
- def compute_board_settings ():
95
- if board_settings :
94
+ def compute_board_settings (boards ):
95
+ need = set (boards ) - set (board_settings .keys ())
96
+ if not need :
96
97
return
97
98
98
- def get_settings (arg ):
99
- board = arg [1 ].name
99
+ def get_settings (board ):
100
100
return (
101
101
board ,
102
102
get_settings_from_makefile (str (top_dir / "ports" / board_to_port [board ]), board ),
103
103
)
104
104
105
105
with ThreadPoolExecutor (max_workers = os .cpu_count ()) as ex :
106
- board_settings .update (ex .map (get_settings , all_ports_all_boards () ))
106
+ board_settings .update (ex .map (get_settings , need ))
107
107
108
108
boards_to_build = all_board_ids
109
109
@@ -142,8 +142,13 @@ def get_settings(arg):
142
142
# As a (nearly) last resort, for some certain files, we compute the settings from the
143
143
# makefile for each board and determine whether to build them that way.
144
144
if p .startswith ("frozen" ) or p .startswith ("supervisor" ) or module_matches :
145
- compute_board_settings ()
146
- for board in all_board_ids :
145
+ if port_matches :
146
+ port = port_matches .group (1 )
147
+ board_ids = port_to_boards [port ]
148
+ else :
149
+ board_ids = all_board_ids
150
+ compute_board_settings (board_ids )
151
+ for board in board_ids :
147
152
settings = board_settings [board ]
148
153
149
154
# Check frozen files to see if they are in each board.
0 commit comments