Fix toolchain/target remove_configs
This change updates toolchain target definitions to support remove
configs from the default Pigweed config list.
Change-Id: I227f55211b4ba78fa0fe4978abbd72f54897b997
diff --git a/pw_build/defaults.gni b/pw_build/defaults.gni
index 59c6d69..5a481f4 100644
--- a/pw_build/defaults.gni
+++ b/pw_build/defaults.gni
@@ -24,6 +24,7 @@
# The default toolchain is never used.
default_configs = []
default_public_deps = []
+ remove_default_configs = []
}
# Combine target-specifc and target-agnostic default variables.
@@ -45,10 +46,10 @@
# One more pass, to remove configs
pw_build_defaults = {
configs = []
- forward_variables_from(_pw_build_defaults, "*", [ "remove_configs" ])
- if (defined(_pw_build_defaults.remove_configs)) {
+ forward_variables_from(_pw_build_defaults, "*")
+ if (remove_default_configs != []) {
# Add them first to ensure they are present to be removed.
- configs += _pw_build_defaults.remove_configs
- configs -= _pw_build_defaults.remove_configs
+ configs += remove_default_configs
+ configs -= remove_default_configs
}
}
diff --git a/pw_toolchain/host_clang/toolchains.gni b/pw_toolchain/host_clang/toolchains.gni
index e79d80c..8976118 100644
--- a/pw_toolchain/host_clang/toolchains.gni
+++ b/pw_toolchain/host_clang/toolchains.gni
@@ -60,7 +60,7 @@
# Add the configs to be removed. They will be de-duplicated, and this
# ensures they are present to be removed.
default_configs += oss_fuzz_removed_configs
- remove_configs = oss_fuzz_removed_configs
+ remove_default_configs = oss_fuzz_removed_configs
}
}