Skip to content

Commit c2e4b56

Browse files
Merge branch 'master' into YAML-Updates-2-23-2024
2 parents 65263bb + d899019 commit c2e4b56

File tree

3 files changed

+3
-106
lines changed

3 files changed

+3
-106
lines changed

build/chip/chip_codegen.gni

+3-52
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ template("_chip_build_time_zapgen") {
152152
_output_subdir = "zap-generated"
153153
}
154154

155-
pw_python_action("${_name}_zap_pregen") {
155+
pw_python_action("${_name}_zap") {
156156
script = "${chip_root}/scripts/tools/zap/generate.py"
157157

158158
# TODO: this seems to touch internals. Is this ok? speeds up builds!
@@ -165,7 +165,7 @@ template("_chip_build_time_zapgen") {
165165
"--templates",
166166
_template_path,
167167
"--output-dir",
168-
rebase_path(target_gen_dir) + "/zap_pregen/" + _output_subdir,
168+
rebase_path(target_gen_dir) + "/zapgen/" + _output_subdir,
169169

170170
# TODO: lock file support should be removed as this serializes zap
171171
# (slower), however this is currently done because on Darwin zap startup
@@ -188,54 +188,10 @@ template("_chip_build_time_zapgen") {
188188

189189
sources = [ _idl_file ]
190190

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-
233191
outputs = []
234192
foreach(name, invoker.outputs) {
235193
outputs += [ "${target_gen_dir}/zapgen/${name}" ]
236194
}
237-
238-
deps = [ ":${_name}_zap_pregen" ]
239195
}
240196

241197
source_set(_name) {
@@ -255,10 +211,7 @@ template("_chip_build_time_zapgen") {
255211
if (!defined(public_deps)) {
256212
public_deps = []
257213
}
258-
public_deps += [
259-
":${_name}_files",
260-
":${_name}_zap_pregen",
261-
]
214+
public_deps += [ ":${_name}_zap" ]
262215
}
263216
}
264217

@@ -420,7 +373,6 @@ template("chip_zapgen") {
420373
"input",
421374
"outputs",
422375
"public_configs",
423-
"prune_outputs",
424376
])
425377
}
426378
} else {
@@ -482,7 +434,6 @@ template("chip_zapgen") {
482434
[
483435
"deps",
484436
"public_configs",
485-
"prune_outputs",
486437
])
487438
if (!defined(public_configs)) {
488439
public_configs = []

scripts/tools/zap/prune_outputs.py

-42
This file was deleted.

src/app/chip_data_model.gni

-12
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,8 @@ template("chip_data_model") {
5656
"zap-generated/endpoint_config.h",
5757
]
5858

59-
# NOTE: these are ALSO auto-generated but handled below:
60-
# "zap-generated/IMClusterCommandHandler.cpp"
61-
# -> contains one large DispatchSingleClusterCommand and DispatchServerCommand
62-
63-
if (chip_code_pre_generated_directory == "") {
64-
prune_outputs = []
65-
}
66-
6759
if (!chip_build_controller_dynamic_server) {
6860
outputs += [ "zap-generated/IMClusterCommandHandler.cpp" ]
69-
} else {
70-
if (defined(prune_outputs)) {
71-
prune_outputs += [ "zap-generated/IMClusterCommandHandler.cpp" ]
72-
}
7361
}
7462

7563
if (!defined(deps)) {

0 commit comments

Comments
 (0)