pw_build: Fix configs in pw_rust_executable
Bug: 343111481
Fix issue that configs forwared from invoker are overwriten.
Change-Id: I7c0a7cdf5fc9e22e4605378cbb3896dae1adecb8
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/212171
Reviewed-by: Erik Gilling <konkers@google.com>
Commit-Queue: Jiacheng Lu <lujc@google.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
diff --git a/pw_build/rust_executable.gni b/pw_build/rust_executable.gni
index 59a680d..8a41b4e 100644
--- a/pw_build/rust_executable.gni
+++ b/pw_build/rust_executable.gni
@@ -42,9 +42,7 @@
assert(_edition == "2015" || _edition == "2018" || _edition == "2021",
"edition ${_edition} is not supported")
- if (defined(invoker.configs)) {
- configs = invoker.configs
- } else {
+ if (!defined(configs)) {
configs = []
}
configs += [ "$dir_pw_build:rust_edition_${_edition}" ]