soong_config: bool_variables shortcut

Using a lot of boolean variables can become very verbose without adding
really any new information:

      variables: ["a", "b", "c"],
  }

  soong_config_bool_variable {
      name: "a",
  }

  soong_config_bool_variable {
      name: "b",
  }

  soong_config_bool_variable {
      name: "c",
  }

Now turns into:

      bool_variables: ["a", "b", "c"],
  }

Test: built-in tests
Change-Id: If5455a38433431c7ecbce1e5b32cfbb47f42602a
This commit is contained in:
Dan Willemsen
2020-03-23 19:39:34 -07:00
parent b358ebb759
commit 2b8b89cfa2
6 changed files with 163 additions and 20 deletions

View File

@@ -88,7 +88,8 @@ type soongConfigModuleTypeImportProperties struct {
// name: "acme_cc_defaults",
// module_type: "cc_defaults",
// config_namespace: "acme",
// variables: ["board", "feature"],
// variables: ["board"],
// bool_variables: ["feature"],
// properties: ["cflags", "srcs"],
// }
//
@@ -97,10 +98,6 @@ type soongConfigModuleTypeImportProperties struct {
// values: ["soc_a", "soc_b"],
// }
//
// soong_config_bool_variable {
// name: "feature",
// }
//
// If an acme BoardConfig.mk file contained:
//
// SOONG_CONFIG_NAMESPACES += acme
@@ -149,7 +146,8 @@ type soongConfigModuleTypeModule struct {
// name: "acme_cc_defaults",
// module_type: "cc_defaults",
// config_namespace: "acme",
// variables: ["board", "feature"],
// variables: ["board"],
// bool_variables: ["feature"],
// properties: ["cflags", "srcs"],
// }
//
@@ -158,10 +156,6 @@ type soongConfigModuleTypeModule struct {
// values: ["soc_a", "soc_b"],
// }
//
// soong_config_bool_variable {
// name: "feature",
// }
//
// acme_cc_defaults {
// name: "acme_defaults",
// cflags: ["-DGENERIC"],