From 2d068b59e6bd53ebb70b6d62c73d753fb547f60a Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Tue, 12 Apr 2022 17:27:26 +0100 Subject: [PATCH] Add a product for building linux_bionic in --soong-only mode. Modelled after the mainline_sdk product. Test: build/soong/soong_ui.bash --make-mode --soong-only \ SOONG_ALLOW_MISSING_DEPENDENCIES=true \ TARGET_PRODUCT=linux_bionic com.android.art.host Bug: 31559095 Bug: 229123823 Change-Id: I6051d21cc4bae561e987561ddad5f1ec5435c4ca --- target/board/linux_bionic/BoardConfig.mk | 24 ++++++++++++++++++++++++ target/board/linux_bionic/README.md | 6 ++++++ target/product/AndroidProducts.mk | 1 + target/product/linux_bionic.mk | 18 ++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 target/board/linux_bionic/BoardConfig.mk create mode 100644 target/board/linux_bionic/README.md create mode 100644 target/product/linux_bionic.mk diff --git a/target/board/linux_bionic/BoardConfig.mk b/target/board/linux_bionic/BoardConfig.mk new file mode 100644 index 0000000000..7938bdbd7f --- /dev/null +++ b/target/board/linux_bionic/BoardConfig.mk @@ -0,0 +1,24 @@ +# 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. +# + +# This "device" is only intended to be used for host Bionic build targets, so +# (device) target architectures are irrelevant. However, the build system isn't +# prepared to handle no target architectures at all, so pick something +# arbitrarily. +TARGET_ARCH_SUITE := ndk + +HOST_CROSS_OS := linux_bionic +HOST_CROSS_ARCH := x86_64 +HOST_CROSS_2ND_ARCH := diff --git a/target/board/linux_bionic/README.md b/target/board/linux_bionic/README.md new file mode 100644 index 0000000000..8db77f2dc9 --- /dev/null +++ b/target/board/linux_bionic/README.md @@ -0,0 +1,6 @@ +This "device" is suitable for Soong-only builds to create Bionic binaries for +Linux hosts: + +``` +build/soong/soong_ui.bash --make-mode --soong-only TARGET_PRODUCT=linux_bionic ... +``` diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk index ee702e5d16..67b0b17ac9 100644 --- a/target/product/AndroidProducts.mk +++ b/target/product/AndroidProducts.mk @@ -74,6 +74,7 @@ PRODUCT_MAKEFILES := \ endif PRODUCT_MAKEFILES += \ + $(LOCAL_DIR)/linux_bionic.mk \ $(LOCAL_DIR)/mainline_sdk.mk \ $(LOCAL_DIR)/module_arm.mk \ $(LOCAL_DIR)/module_arm64.mk \ diff --git a/target/product/linux_bionic.mk b/target/product/linux_bionic.mk new file mode 100644 index 0000000000..da6b8908f0 --- /dev/null +++ b/target/product/linux_bionic.mk @@ -0,0 +1,18 @@ +# Copyright (C) 2022 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_NAME := linux_bionic +PRODUCT_BRAND := Android +PRODUCT_DEVICE := linux_bionic