Use select() for gfxstream mesa3d_platforms flag
Minor cleanup, as it's now supported for srcs since b/358377461
Bug: 326956485
Test: m
Change-Id: I4dad7fb4debc30e1cd95cfacaac95a8f53ed539e
diff --git a/Android.bp b/Android.bp
index 4f17387..197c4a7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -100,17 +100,6 @@
],
}
-soong_config_module_type {
- name: "gfxstream_cc_defaults_config_for_platform",
- module_type: "cc_defaults",
- config_namespace: "gfxstream",
- variables: ["mesa3d_platforms"],
- properties: [
- "cflags",
- "target.android.srcs",
- ],
-}
-
soong_config_string_variable {
name: "mesa3d_platforms",
values: [
@@ -120,34 +109,23 @@
],
}
-gfxstream_cc_defaults_config_for_platform {
- name: "gfxstream_guest_cc_defaults_for_platform",
- soong_config_variables: {
- mesa3d_platforms: {
- // Android surfaceless build
- none: {
- cflags: [
- "-UANDROID",
- "-U__ANDROID__",
- "-DLINUX_GUEST_BUILD",
- ],
- },
- // The default when variable is not set is Android
- conditions_default: {
- cflags: [
- "-DVK_USE_PLATFORM_ANDROID_KHR",
- ],
- },
- },
- },
-}
-
cc_defaults {
name: "gfxstream_guest_cc_defaults",
defaults: [
"gfxstream_cc_defaults",
- "gfxstream_guest_cc_defaults_for_platform",
],
+ cflags: select(soong_config_variable("gfxstream", "mesa3d_platforms"), {
+ // Android surfaceless build
+ "none": [
+ "-UANDROID",
+ "-U__ANDROID__",
+ "-DLINUX_GUEST_BUILD",
+ ],
+ // The default when variable is not set is Android
+ default: [
+ "-DVK_USE_PLATFORM_ANDROID_KHR",
+ ],
+ }),
}
cc_defaults {