Suggest using add_soong_config_ macros instead of direct variable assignments
Bug: 190051051 Test: treehugger Change-Id: Ib77d8af8f926412f6337173927cee6bb1deda2bb
This commit is contained in:
13
README.md
13
README.md
@@ -451,15 +451,10 @@ used. To specify that no properties should be amended for `soc_b`, you can set
|
|||||||
|
|
||||||
The values of the variables can be set from a product's `BoardConfig.mk` file:
|
The values of the variables can be set from a product's `BoardConfig.mk` file:
|
||||||
```
|
```
|
||||||
SOONG_CONFIG_NAMESPACES += acme
|
$(call add_soong_config_namespace, acme)
|
||||||
SOONG_CONFIG_acme += \
|
$(call add_soong_config_var_value, acme, board, soc_a)
|
||||||
board \
|
$(call add_soong_config_var_value, acme, feature, true)
|
||||||
feature \
|
$(call add_soong_config_var_value, acme, width, 200)
|
||||||
width \
|
|
||||||
|
|
||||||
SOONG_CONFIG_acme_board := soc_a
|
|
||||||
SOONG_CONFIG_acme_feature := true
|
|
||||||
SOONG_CONFIG_acme_width := 200
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The `acme_cc_defaults` module type can be used anywhere after the definition in
|
The `acme_cc_defaults` module type can be used anywhere after the definition in
|
||||||
|
@@ -122,15 +122,10 @@ type soongConfigModuleTypeImportProperties struct {
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// If an acme BoardConfig.mk file contained:
|
// If an acme BoardConfig.mk file contained:
|
||||||
//
|
// $(call add_sonng_config_namespace, acme)
|
||||||
// SOONG_CONFIG_NAMESPACES += acme
|
// $(call add_soong_config_var_value, acme, board, soc_a)
|
||||||
// SOONG_CONFIG_acme += \
|
// $(call add_soong_config_var_value, acme, feature, true)
|
||||||
// board \
|
// $(call add_soong_config_var_value, acme, width, 200)
|
||||||
// feature \
|
|
||||||
//
|
|
||||||
// SOONG_CONFIG_acme_board := soc_a
|
|
||||||
// SOONG_CONFIG_acme_feature := true
|
|
||||||
// SOONG_CONFIG_acme_width := 200
|
|
||||||
//
|
//
|
||||||
// Then libacme_foo would build with cflags "-DGENERIC -DSOC_A -DFEATURE -DWIDTH=200".
|
// Then libacme_foo would build with cflags "-DGENERIC -DSOC_A -DFEATURE -DWIDTH=200".
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user