summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stjernholm <mast@google.com>2020-11-29 23:14:18 +0000
committerMartin Stjernholm <mast@google.com>2020-12-07 13:52:13 +0000
commit496729b9e5cf8918f4d1c34d5b407c76e260589c (patch)
treede0ffba964eaef2ae36729bd87a261e63c3438e1
parent0825ebfccab80c8afb3570665a04eb2454bcfb68 (diff)
downloaddevice_generic_art-496729b9e5cf8918f4d1c34d5b407c76e260589c.tar.gz
device_generic_art-496729b9e5cf8918f4d1c34d5b407c76e260589c.tar.bz2
device_generic_art-496729b9e5cf8918f4d1c34d5b407c76e260589c.zip
Introduce a Soong config variable to flip to ART Module sources when
prebuilts are preferred by default. It enables the apex/sdk/module_exports modules and toggles off the prefer flags on the ART Module prebuilts when the ART-specific products are used, typically on master-art. Also add new generic architecture products for use in art/build/build-art-module.sh to build the ART Module prebuilts. Test: m TARGET_PRODUCT=art_module_{arm,arm64,x86,x86_64} nothing Bug: 172480617 Change-Id: Id1c91ebe47a24167374530643e0e444f74d9d3a0
-rw-r--r--BoardConfigCommon.mk10
-rw-r--r--art_module/AndroidProducts.mk21
-rw-r--r--art_module/art_module.mk25
-rw-r--r--art_module/art_module_arm.mk21
-rw-r--r--art_module/art_module_arm64.mk21
-rw-r--r--art_module/art_module_x86.mk21
-rw-r--r--art_module/art_module_x86_64.mk21
7 files changed, 140 insertions, 0 deletions
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index f2dfec8..2dd5ec3 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -24,3 +24,13 @@ TARGET_CPU_SMP := true
# Flatten APEX packages to make them simpler to use in
# ART testing/benchmarking environments.
TARGET_FLATTEN_APEX := true
+
+# Enable ART Module top level apex/sdk/module_export modules. When they are
+# enabled the ART Module prebuilts (packages/modules/ArtPrebuilt and
+# prebuilts/module_sdk/art) cannot be present with prefer:true in the build
+# tree.
+# TODO(b/174997203): Clean this up when there is a better way to switch between
+# prebuilts and sources.
+SOONG_CONFIG_NAMESPACES += art_module
+SOONG_CONFIG_art_module += source_build
+SOONG_CONFIG_art_module_source_build := true
diff --git a/art_module/AndroidProducts.mk b/art_module/AndroidProducts.mk
new file mode 100644
index 0000000..cb219cb
--- /dev/null
+++ b/art_module/AndroidProducts.mk
@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2020 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.
+#
+
+PRODUCT_MAKEFILES := \
+ $(LOCAL_DIR)/art_module_arm.mk \
+ $(LOCAL_DIR)/art_module_arm64.mk \
+ $(LOCAL_DIR)/art_module_x86.mk \
+ $(LOCAL_DIR)/art_module_x86_64.mk \
diff --git a/art_module/art_module.mk b/art_module/art_module.mk
new file mode 100644
index 0000000..4366345
--- /dev/null
+++ b/art_module/art_module.mk
@@ -0,0 +1,25 @@
+#
+# Copyright (C) 2020 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.
+#
+
+# Enable ART Module top level apex/sdk/module_export modules. When they are
+# enabled the ART Module prebuilts (packages/modules/ArtPrebuilt and
+# prebuilts/module_sdk/art) cannot be present with prefer:true in the build
+# tree.
+# TODO(b/174997203): Clean up the art_module_* products when there is a better
+# way to switch between prebuilts and sources.
+SOONG_CONFIG_NAMESPACES += art_module
+SOONG_CONFIG_art_module += source_build
+SOONG_CONFIG_art_module_source_build := true
diff --git a/art_module/art_module_arm.mk b/art_module/art_module_arm.mk
new file mode 100644
index 0000000..9d3929a
--- /dev/null
+++ b/art_module/art_module_arm.mk
@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2020 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/aosp_arm.mk)
+$(call inherit-product, device/generic/art/art_module/art_module.mk)
+
+PRODUCT_NAME := art_module_arm
+PRODUCT_DEVICE := generic
diff --git a/art_module/art_module_arm64.mk b/art_module/art_module_arm64.mk
new file mode 100644
index 0000000..b775600
--- /dev/null
+++ b/art_module/art_module_arm64.mk
@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2020 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/aosp_arm64.mk)
+$(call inherit-product, device/generic/art/art_module/art_module.mk)
+
+PRODUCT_NAME := art_module_arm64
+PRODUCT_DEVICE := generic_arm64
diff --git a/art_module/art_module_x86.mk b/art_module/art_module_x86.mk
new file mode 100644
index 0000000..7272ad4
--- /dev/null
+++ b/art_module/art_module_x86.mk
@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2020 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/aosp_x86.mk)
+$(call inherit-product, device/generic/art/art_module/art_module.mk)
+
+PRODUCT_NAME := art_module_x86
+PRODUCT_DEVICE := generic_x86
diff --git a/art_module/art_module_x86_64.mk b/art_module/art_module_x86_64.mk
new file mode 100644
index 0000000..7a16ff2
--- /dev/null
+++ b/art_module/art_module_x86_64.mk
@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2020 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/aosp_x86_64.mk)
+$(call inherit-product, device/generic/art/art_module/art_module.mk)
+
+PRODUCT_NAME := art_module_x86_64
+PRODUCT_DEVICE := generic_x86_64