Make bp2build-generated selects() based on product config build settings
...instead of based on constraint settings. Bug: 269577299 Test: m nothing and ./build/bazel/ci/bp2build.sh Change-Id: Ib9caec79c92b8fd304e46be841de5612bd1637e3
This commit is contained in:
@@ -1188,13 +1188,13 @@ cc_library_static {
|
||||
ExpectedBazelTargets: []string{
|
||||
MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
|
||||
"copts": `select({
|
||||
"//build/bazel/product_variables:binder32bit": ["-Wbinder32bit"],
|
||||
"//build/bazel/product_config/config_settings:binder32bit": ["-Wbinder32bit"],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
"//build/bazel/product_variables:malloc_not_svelte": ["-Wmalloc_not_svelte"],
|
||||
"//build/bazel/product_config/config_settings:malloc_not_svelte": ["-Wmalloc_not_svelte"],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
"//build/bazel/product_variables:malloc_zero_contents": ["-Wmalloc_zero_contents"],
|
||||
"//build/bazel/product_config/config_settings:malloc_zero_contents": ["-Wmalloc_zero_contents"],
|
||||
"//conditions:default": [],
|
||||
})`,
|
||||
"srcs_c": `["common.c"]`,
|
||||
@@ -1248,19 +1248,19 @@ cc_library_static {
|
||||
ExpectedBazelTargets: []string{
|
||||
MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
|
||||
"copts": `select({
|
||||
"//build/bazel/product_variables:malloc_not_svelte": ["-Wmalloc_not_svelte"],
|
||||
"//build/bazel/product_config/config_settings:malloc_not_svelte": ["-Wmalloc_not_svelte"],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
"//build/bazel/product_variables:malloc_not_svelte-android": ["-Wandroid_malloc_not_svelte"],
|
||||
"//build/bazel/product_config/config_settings:malloc_not_svelte-android": ["-Wandroid_malloc_not_svelte"],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
"//build/bazel/product_variables:malloc_not_svelte-arm": ["-Wlib32_malloc_not_svelte"],
|
||||
"//build/bazel/product_config/config_settings:malloc_not_svelte-arm": ["-Wlib32_malloc_not_svelte"],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
"//build/bazel/product_variables:malloc_not_svelte-arm64": ["-Warm64_malloc_not_svelte"],
|
||||
"//build/bazel/product_config/config_settings:malloc_not_svelte-arm64": ["-Warm64_malloc_not_svelte"],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
"//build/bazel/product_variables:malloc_not_svelte-x86": ["-Wlib32_malloc_not_svelte"],
|
||||
"//build/bazel/product_config/config_settings:malloc_not_svelte-x86": ["-Wlib32_malloc_not_svelte"],
|
||||
"//conditions:default": [],
|
||||
})`,
|
||||
"srcs_c": `["common.c"]`,
|
||||
@@ -1287,7 +1287,7 @@ cc_library_static {
|
||||
ExpectedBazelTargets: []string{
|
||||
MakeBazelTarget("cc_library_static", "foo_static", AttrNameToString{
|
||||
"asflags": `select({
|
||||
"//build/bazel/product_variables:platform_sdk_version": ["-DPLATFORM_SDK_VERSION=$(Platform_sdk_version)"],
|
||||
"//build/bazel/product_config/config_settings:platform_sdk_version": ["-DPLATFORM_SDK_VERSION=$(Platform_sdk_version)"],
|
||||
"//conditions:default": [],
|
||||
})`,
|
||||
"srcs_as": `["common.S"]`,
|
||||
|
Reference in New Issue
Block a user