From 148276b55ae80378e5613a2b4d681b5cc74ba3f6 Mon Sep 17 00:00:00 2001 From: Peiyong Lin Date: Wed, 26 Apr 2023 01:07:35 +0000 Subject: [PATCH] Properly define angle.mk Previously we used USE_ANGLE to determine whether the build should include ANGLE drivers, this patch consolidates that into a separate Makefile. Bug: b/270994705 Test: atest CtsAngleIntegrationHostTestCases Change-Id: I4d7ffb869ced219009446d907230178e4b940157 --- core/main.mk | 4 ---- target/product/angle.mk | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 target/product/angle.mk diff --git a/core/main.mk b/core/main.mk index 6f0b927c85..09616d08dc 100644 --- a/core/main.mk +++ b/core/main.mk @@ -320,10 +320,6 @@ ADDITIONAL_VENDOR_PROPERTIES += \ ro.board.platform=$(TARGET_BOARD_PLATFORM) \ ro.hwui.use_vulkan=$(TARGET_USES_VULKAN) -# Set ro.gfx.angle.supported based on if ANGLE is installed in vendor partition -ADDITIONAL_VENDOR_PROPERTIES += \ - ro.gfx.angle.supported=$(USE_ANGLE) - ifdef TARGET_SCREEN_DENSITY ADDITIONAL_VENDOR_PROPERTIES += \ ro.sf.lcd_density=$(TARGET_SCREEN_DENSITY) diff --git a/target/product/angle.mk b/target/product/angle.mk new file mode 100644 index 0000000000..0d7f8cb1c0 --- /dev/null +++ b/target/product/angle.mk @@ -0,0 +1,26 @@ +# +# Copyright 2023 The Android Open-Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# To include ANGLE drivers into the build, add +# $(call inherit-product, $(SRC_TARGET_DIR)/product/angle.mk) to the Makefile. + +PRODUCT_PACKAGES := \ + libEGL_angle \ + libGLESv1_CM_angle \ + libGLESv2_angle + +# Set ro.gfx.angle.supported based on if ANGLE is installed in vendor partition +PRODUCT_VENDOR_PROPERTIES := ro.gfx.angle.supported=true