@@ -152,7 +152,7 @@ template("_chip_build_time_zapgen") {
152
152
_output_subdir = " zap-generated"
153
153
}
154
154
155
- pw_python_action (" ${ _name } _zap_pregen " ) {
155
+ pw_python_action (" ${ _name } _zap " ) {
156
156
script = " ${ chip_root } /scripts/tools/zap/generate.py"
157
157
158
158
# TODO: this seems to touch internals. Is this ok? speeds up builds!
@@ -165,7 +165,7 @@ template("_chip_build_time_zapgen") {
165
165
" --templates" ,
166
166
_template_path ,
167
167
" --output-dir" ,
168
- rebase_path (target_gen_dir ) + " /zap_pregen /" + _output_subdir ,
168
+ rebase_path (target_gen_dir ) + " /zapgen /" + _output_subdir ,
169
169
170
170
# TODO: lock file support should be removed as this serializes zap
171
171
# (slower), however this is currently done because on Darwin zap startup
@@ -188,54 +188,10 @@ template("_chip_build_time_zapgen") {
188
188
189
189
sources = [ _idl_file ]
190
190
191
- outputs = []
192
- foreach (name , invoker .outputs ) {
193
- outputs += [ " ${ target_gen_dir } /zap_pregen/${ name } " ]
194
- }
195
-
196
- forward_variables_from (invoker , [ " prune_outputs" ])
197
- if (defined (prune_outputs )) {
198
- foreach (name , prune_outputs ) {
199
- outputs += [ " ${ target_gen_dir } /zap_pregen/${ name } " ]
200
- }
201
- }
202
- }
203
-
204
- # This action ensures that any "extra" files generated by zap codegen
205
- # are actually deleted.
206
- #
207
- # This is to avoid double-codegen of configurations like endpoint config
208
- # or access credentials being generated for both "controller client" and
209
- # application-specific
210
- pw_python_action (" ${ _name } _files" ) {
211
- # TODO: this seems to touch internals. Is this ok? speeds up builds!
212
- _pw_internal_run_in_venv = false
213
-
214
- script = " ${ chip_root } /scripts/tools/zap/prune_outputs.py"
215
-
216
- _keep_file = rebase_path (" ${ target_gen_dir } /${ _name } .keep.outputs" )
217
- write_file (_keep_file , invoker .outputs , " list lines" )
218
-
219
- args = [
220
- " --keep" ,
221
- _keep_file ,
222
- " --input-dir" ,
223
- rebase_path (" ${ target_gen_dir } /zap_pregen/" ),
224
- " --output-dir" ,
225
- rebase_path (" ${ target_gen_dir } /zapgen/" ),
226
- ]
227
-
228
- inputs = []
229
- foreach (name , invoker .outputs ) {
230
- inputs += [ " ${ target_gen_dir } /zap_pregen/${ name } " ]
231
- }
232
-
233
191
outputs = []
234
192
foreach (name , invoker .outputs ) {
235
193
outputs += [ " ${ target_gen_dir } /zapgen/${ name } " ]
236
194
}
237
-
238
- deps = [ " :${ _name } _zap_pregen" ]
239
195
}
240
196
241
197
source_set (_name ) {
@@ -255,10 +211,7 @@ template("_chip_build_time_zapgen") {
255
211
if (! defined (public_deps )) {
256
212
public_deps = []
257
213
}
258
- public_deps += [
259
- " :${ _name } _files" ,
260
- " :${ _name } _zap_pregen" ,
261
- ]
214
+ public_deps += [ " :${ _name } _zap" ]
262
215
}
263
216
}
264
217
@@ -420,7 +373,6 @@ template("chip_zapgen") {
420
373
" input" ,
421
374
" outputs" ,
422
375
" public_configs" ,
423
- " prune_outputs" ,
424
376
])
425
377
}
426
378
} else {
@@ -482,7 +434,6 @@ template("chip_zapgen") {
482
434
[
483
435
" deps" ,
484
436
" public_configs" ,
485
- " prune_outputs" ,
486
437
])
487
438
if (! defined (public_configs )) {
488
439
public_configs = []
0 commit comments