From 228de7b72c4f4fe1a40ee73cb99ddb1c1bfadf65 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Mon, 9 Oct 2023 14:29:24 +0000 Subject: [PATCH 1/2] Remove sdk_ products The SDK is arch-agnostic, so does not need per-arch products. Bug: 205008975 Test: presubmit Change-Id: I1847ab2bae0d07793bdd043430f0e79b36edb384 --- target/product/AndroidProducts.mk | 3 --- target/product/sdk.mk | 9 +++++++-- target/product/sdk_arm64.mk | 26 -------------------------- target/product/sdk_x86.mk | 26 -------------------------- target/product/sdk_x86_64.mk | 29 ----------------------------- 5 files changed, 7 insertions(+), 86 deletions(-) delete mode 100644 target/product/sdk_arm64.mk delete mode 100644 target/product/sdk_x86.mk delete mode 100644 target/product/sdk_x86_64.mk diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk index 473a27555f..8787c59689 100644 --- a/target/product/AndroidProducts.mk +++ b/target/product/AndroidProducts.mk @@ -66,14 +66,11 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/mainline_system_x86_64.mk \ $(LOCAL_DIR)/mainline_system_x86_arm.mk \ $(LOCAL_DIR)/ndk.mk \ - $(LOCAL_DIR)/sdk_arm64.mk \ $(LOCAL_DIR)/sdk.mk \ $(LOCAL_DIR)/sdk_phone_arm64.mk \ $(LOCAL_DIR)/sdk_phone_armv7.mk \ $(LOCAL_DIR)/sdk_phone_x86_64.mk \ $(LOCAL_DIR)/sdk_phone_x86.mk \ - $(LOCAL_DIR)/sdk_x86_64.mk \ - $(LOCAL_DIR)/sdk_x86.mk \ endif diff --git a/target/product/sdk.mk b/target/product/sdk.mk index e4cb7ff4fb..7a3fc82534 100644 --- a/target/product/sdk.mk +++ b/target/product/sdk.mk @@ -14,8 +14,13 @@ # limitations under the License. # -# Don't modify this file - It's just an alias! +# This is a simple product that uses configures the minimum amount +# needed to build the SDK (without the emulator). -$(call inherit-product, $(SRC_TARGET_DIR)/product/sdk_x86.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_default.mk) PRODUCT_NAME := sdk +PRODUCT_BRAND := Android +PRODUCT_DEVICE := mainline_x86 + +PRODUCT_NEXT_RELEASE_HIDE_FLAGGED_API := true diff --git a/target/product/sdk_arm64.mk b/target/product/sdk_arm64.mk deleted file mode 100644 index 3eb930435d..0000000000 --- a/target/product/sdk_arm64.mk +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (C) 2014 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. -# - -$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_default.mk) - -TARGET_SUPPORTS_32_BIT_APPS := true -TARGET_SUPPORTS_64_BIT_APPS := true - -PRODUCT_NAME := sdk_arm64 -PRODUCT_BRAND := Android -PRODUCT_DEVICE := mainline_arm64 - -PRODUCT_NEXT_RELEASE_HIDE_FLAGGED_API := true diff --git a/target/product/sdk_x86.mk b/target/product/sdk_x86.mk deleted file mode 100644 index a6e3bcdab0..0000000000 --- a/target/product/sdk_x86.mk +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (C) 2014 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. -# - -# This is a simple product that uses configures the minimum amount -# needed to build the SDK (without the emulator). - -$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_default.mk) - -PRODUCT_NAME := sdk_x86_64 -PRODUCT_BRAND := Android -PRODUCT_DEVICE := mainline_x86 - -PRODUCT_NEXT_RELEASE_HIDE_FLAGGED_API := true diff --git a/target/product/sdk_x86_64.mk b/target/product/sdk_x86_64.mk deleted file mode 100644 index af73007a35..0000000000 --- a/target/product/sdk_x86_64.mk +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (C) 2014 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. -# - -# This is a simple product that uses configures the minimum amount -# needed to build the SDK (without the emulator). - -$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_default.mk) - -TARGET_SUPPORTS_32_BIT_APPS := true -TARGET_SUPPORTS_64_BIT_APPS := true - -PRODUCT_NAME := sdk_x86_64 -PRODUCT_BRAND := Android -PRODUCT_DEVICE := mainline_x86_64 - -PRODUCT_NEXT_RELEASE_HIDE_FLAGGED_API := true From dde748a8319f35c6a14932ce246d1112312f258c Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Mon, 9 Oct 2023 14:31:03 +0000 Subject: [PATCH 2/2] Configure bootclasspath for sdk product The SDK product is currently used to build the SDK sources, which are the full sources of the bootclasspath. For this to work, the bootclasspath needs to be configured correctly, so inherit that config. In the future, it would probably make sense for the sources to be built together with a device -- the emulator, at which point this config can be removed. Bug: 151360309 Test: lunch sdk; m sdk sdk_repo dist Change-Id: I66b09cd42249c4d5b76f06478781a90108e006e4 --- target/product/sdk.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/product/sdk.mk b/target/product/sdk.mk index 7a3fc82534..fff8d4caa3 100644 --- a/target/product/sdk.mk +++ b/target/product/sdk.mk @@ -17,6 +17,12 @@ # This is a simple product that uses configures the minimum amount # needed to build the SDK (without the emulator). +# In order to build the bootclasspath sources, the bootclasspath needs to +# be setup via default_art_config.mk. The sources only really make sense +# together with a device (e.g. the emulator). So if the SDK sources change +# to be built with the device, this could be removed. +$(call inherit-product, $(SRC_TARGET_DIR)/product/default_art_config.mk) + $(call inherit-product, $(SRC_TARGET_DIR)/product/languages_default.mk) PRODUCT_NAME := sdk