From 8fac0f194dd06d00e4b25f86ef67382e2ef1219d Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Fri, 22 Apr 2022 20:06:16 -0400 Subject: [PATCH] Remove duplicate declarations of build variables Each argument should be declared in exactly one build file. The args.gni files are for setting arguments, not declaring them. Remove errant declare_args() from args.gni files. Using declare_args() in these files doesn't do anything except for suppress "unused argument" diagnostics, which isn't desirable (those diagnostics are already opt-in). --- config/tizen/chip-gn/args.gni | 5 ----- examples/light-switch-app/efr32/args.gni | 4 +--- examples/lighting-app/bouffalolab/bl602/args.gni | 9 ++++----- examples/lighting-app/efr32/args.gni | 4 +--- examples/lighting-app/nxp/k32w/k32w0/args.gni | 8 +++----- examples/lighting-app/qpg/args.gni | 12 +++++------- examples/lock-app/efr32/args.gni | 4 +--- examples/lock-app/nxp/k32w/k32w0/args.gni | 6 ++---- examples/lock-app/qpg/args.gni | 12 +++++------- examples/ota-requestor-app/cyw30739/args.gni | 4 +--- examples/ota-requestor-app/efr32/args.gni | 4 +--- examples/ota-requestor-app/linux/args.gni | 4 +--- examples/ota-requestor-app/p6/args.gni | 4 +--- examples/persistent-storage/qpg/args.gni | 8 +++----- examples/shell/nxp/k32w/k32w0/args.gni | 4 +--- examples/window-app/efr32/args.gni | 6 ++---- 16 files changed, 32 insertions(+), 66 deletions(-) diff --git a/config/tizen/chip-gn/args.gni b/config/tizen/chip-gn/args.gni index 3bd4f2592fd5c7..7cd1033eecc268 100644 --- a/config/tizen/chip-gn/args.gni +++ b/config/tizen/chip-gn/args.gni @@ -14,11 +14,6 @@ import("//build_overrides/chip.gni") -declare_args() { - # Location of the Tizen SDK. - tizen_sdk_root = "" -} - chip_device_platform = "tizen" chip_build_tests = false diff --git a/examples/light-switch-app/efr32/args.gni b/examples/light-switch-app/efr32/args.gni index 1a0052682125a4..96b6262f50b93e 100644 --- a/examples/light-switch-app/efr32/args.gni +++ b/examples/light-switch-app/efr32/args.gni @@ -18,9 +18,7 @@ import("${chip_root}/src/platform/EFR32/args.gni") efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") -declare_args() { - chip_enable_ota_requestor = true -} +chip_enable_ota_requestor = true pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log" diff --git a/examples/lighting-app/bouffalolab/bl602/args.gni b/examples/lighting-app/bouffalolab/bl602/args.gni index 6ac49b227fe402..ab5fb2b420693f 100644 --- a/examples/lighting-app/bouffalolab/bl602/args.gni +++ b/examples/lighting-app/bouffalolab/bl602/args.gni @@ -21,8 +21,7 @@ pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log" chip_enable_openthread = false -declare_args() { - # Disable lock tracking, since our FreeRTOS configuration does not set - # INCLUDE_xSemaphoreGetMutexHolder - chip_stack_lock_tracking = "none" -} + +# Disable lock tracking, since our FreeRTOS configuration does not set +# INCLUDE_xSemaphoreGetMutexHolder +chip_stack_lock_tracking = "none" diff --git a/examples/lighting-app/efr32/args.gni b/examples/lighting-app/efr32/args.gni index 1a0052682125a4..96b6262f50b93e 100644 --- a/examples/lighting-app/efr32/args.gni +++ b/examples/lighting-app/efr32/args.gni @@ -18,9 +18,7 @@ import("${chip_root}/src/platform/EFR32/args.gni") efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") -declare_args() { - chip_enable_ota_requestor = true -} +chip_enable_ota_requestor = true pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log" diff --git a/examples/lighting-app/nxp/k32w/k32w0/args.gni b/examples/lighting-app/nxp/k32w/k32w0/args.gni index 8bbd1e952f5ab9..5f4766d8429e64 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/args.gni +++ b/examples/lighting-app/nxp/k32w/k32w0/args.gni @@ -18,8 +18,6 @@ import("${chip_root}/examples/platform/nxp/k32w/k32w0/args.gni") # SDK target. This is overridden to add our SDK app_config.h & defines. k32w0_sdk_target = get_label_info(":sdk", "label_no_toolchain") -declare_args() { - chip_enable_ota_requestor = true - chip_stack_lock_tracking = "fatal" - chip_enable_ble = true -} +chip_enable_ota_requestor = true +chip_stack_lock_tracking = "fatal" +chip_enable_ble = true diff --git a/examples/lighting-app/qpg/args.gni b/examples/lighting-app/qpg/args.gni index d62d91402aa283..90189de5731270 100644 --- a/examples/lighting-app/qpg/args.gni +++ b/examples/lighting-app/qpg/args.gni @@ -18,14 +18,12 @@ import("${chip_root}/examples/platform/qpg/args.gni") qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") -declare_args() { - chip_enable_ota_requestor = true - chip_openthread_ftd = true +chip_enable_ota_requestor = true +chip_openthread_ftd = true - # Disable lock tracking, since our FreeRTOS configuration does not set - # INCLUDE_xSemaphoreGetMutexHolder - chip_stack_lock_tracking = "none" -} +# Disable lock tracking, since our FreeRTOS configuration does not set +# INCLUDE_xSemaphoreGetMutexHolder +chip_stack_lock_tracking = "none" pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log" diff --git a/examples/lock-app/efr32/args.gni b/examples/lock-app/efr32/args.gni index a32b60b7164b44..de1a2fd4f0e9f4 100644 --- a/examples/lock-app/efr32/args.gni +++ b/examples/lock-app/efr32/args.gni @@ -18,9 +18,7 @@ import("${chip_root}/src/platform/EFR32/args.gni") efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") -declare_args() { - chip_enable_ota_requestor = true -} +chip_enable_ota_requestor = true chip_enable_openthread = true pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" diff --git a/examples/lock-app/nxp/k32w/k32w0/args.gni b/examples/lock-app/nxp/k32w/k32w0/args.gni index aac1d79a737a71..2ace8356337891 100644 --- a/examples/lock-app/nxp/k32w/k32w0/args.gni +++ b/examples/lock-app/nxp/k32w/k32w0/args.gni @@ -18,7 +18,5 @@ import("${chip_root}/examples/platform/nxp/k32w/k32w0/args.gni") # SDK target. This is overridden to add our SDK app_config.h & defines. k32w0_sdk_target = get_label_info(":sdk", "label_no_toolchain") -declare_args() { - chip_stack_lock_tracking = "fatal" - chip_enable_ble = true -} +chip_stack_lock_tracking = "fatal" +chip_enable_ble = true diff --git a/examples/lock-app/qpg/args.gni b/examples/lock-app/qpg/args.gni index e6c39ccee5331a..03c7000100c47f 100644 --- a/examples/lock-app/qpg/args.gni +++ b/examples/lock-app/qpg/args.gni @@ -18,14 +18,12 @@ import("${chip_root}/examples/platform/qpg/args.gni") qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") -declare_args() { - chip_enable_ota_requestor = true - chip_openthread_ftd = false +chip_enable_ota_requestor = true +chip_openthread_ftd = false - # Disable lock tracking, since our FreeRTOS configuration does not set - # INCLUDE_xSemaphoreGetMutexHolder - chip_stack_lock_tracking = "none" -} +# Disable lock tracking, since our FreeRTOS configuration does not set +# INCLUDE_xSemaphoreGetMutexHolder +chip_stack_lock_tracking = "none" pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log" diff --git a/examples/ota-requestor-app/cyw30739/args.gni b/examples/ota-requestor-app/cyw30739/args.gni index b56162c2ce097e..28971944353082 100644 --- a/examples/ota-requestor-app/cyw30739/args.gni +++ b/examples/ota-requestor-app/cyw30739/args.gni @@ -23,6 +23,4 @@ chip_openthread_ftd = true chip_progress_logging = false chip_error_logging = false -declare_args() { - chip_enable_ota_requestor = true -} +chip_enable_ota_requestor = true diff --git a/examples/ota-requestor-app/efr32/args.gni b/examples/ota-requestor-app/efr32/args.gni index 6a39a339cf61ea..fde26ca7395bb4 100644 --- a/examples/ota-requestor-app/efr32/args.gni +++ b/examples/ota-requestor-app/efr32/args.gni @@ -27,6 +27,4 @@ chip_openthread_ftd = false # Example will not be maintained in the long term and will be depraceted now that OTA is beeing intagrated into our examples chip_stack_lock_tracking = "None" -declare_args() { - chip_enable_ota_requestor = true -} +chip_enable_ota_requestor = true diff --git a/examples/ota-requestor-app/linux/args.gni b/examples/ota-requestor-app/linux/args.gni index 511f14b2cbbe7b..87c6eb3c1f59de 100644 --- a/examples/ota-requestor-app/linux/args.gni +++ b/examples/ota-requestor-app/linux/args.gni @@ -24,6 +24,4 @@ chip_project_config_include_dirs = [ "${chip_root}/examples/ota-requestor-app/linux/include" ] chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] -declare_args() { - chip_enable_ota_requestor = true -} +chip_enable_ota_requestor = true diff --git a/examples/ota-requestor-app/p6/args.gni b/examples/ota-requestor-app/p6/args.gni index 43c58836f60ddf..8505c08a26d719 100644 --- a/examples/ota-requestor-app/p6/args.gni +++ b/examples/ota-requestor-app/p6/args.gni @@ -16,9 +16,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") import("${chip_root}/src/platform/P6/args.gni") -declare_args() { - chip_enable_ota_requestor = true -} +chip_enable_ota_requestor = true p6_target_project = get_label_info(":ota_requestor_app_sdk_sources", "label_no_toolchain") diff --git a/examples/persistent-storage/qpg/args.gni b/examples/persistent-storage/qpg/args.gni index 20c6596a6a866b..9af3ab4e4553cd 100644 --- a/examples/persistent-storage/qpg/args.gni +++ b/examples/persistent-storage/qpg/args.gni @@ -21,8 +21,6 @@ chip_openthread_ftd = false chip_system_config_use_open_thread_inet_endpoints = false chip_with_lwip = true -declare_args() { - # Disable lock tracking, since our FreeRTOS configuration does not set - # INCLUDE_xSemaphoreGetMutexHolder - chip_stack_lock_tracking = "none" -} +# Disable lock tracking, since our FreeRTOS configuration does not set +# INCLUDE_xSemaphoreGetMutexHolder +chip_stack_lock_tracking = "none" diff --git a/examples/shell/nxp/k32w/k32w0/args.gni b/examples/shell/nxp/k32w/k32w0/args.gni index 5f68faa6512372..5c0a2522c3d51d 100644 --- a/examples/shell/nxp/k32w/k32w0/args.gni +++ b/examples/shell/nxp/k32w/k32w0/args.gni @@ -19,6 +19,4 @@ import("${chip_root}/src/platform/nxp/k32w/k32w0/args.gni") k32w0_sdk_target = get_label_info(":sdk", "label_no_toolchain") -declare_args() { - chip_enable_ble = true -} +chip_enable_ble = true diff --git a/examples/window-app/efr32/args.gni b/examples/window-app/efr32/args.gni index 8db1cfbfb54ef0..4fbeec81fd8e05 100644 --- a/examples/window-app/efr32/args.gni +++ b/examples/window-app/efr32/args.gni @@ -18,10 +18,8 @@ import("${chip_root}/src/platform/EFR32/args.gni") efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") -declare_args() { - # TODO fix me - chip_enable_ota_requestor = false -} +# TODO fix me +chip_enable_ota_requestor = false pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log"