Skip to content

Commit 66bbaa0

Browse files
Nelson LiTreehugger Robot
Nelson Li
authored and
Treehugger Robot
committedAug 2, 2024
Convert art-libartd-libopenjdkd-host-dependency to Android.bp
The check `ifneq ($(HOST_OS),darwin)` in this Android.mk can be ignored because Android no longer supports building on macOS after June 22, 2021 (Android 11). Use `phony_rule` instead of `phony` because `libopenjdkd` has a visibility of `//art/build/apex`. Additionally, libopenjdkd's dependencies have various visibility settings, changing its visibility directly to `//art` would cause errors. Furthermore, `art-libartd-libopenjdkd-host-dependency` is essentially a phony target, existing solely for `mm/mmm/mmma` commands. Changing it to `phony_rule` aligns with the original design intent. Bug: 347142939 Test: 1) m -j art-libartd-libopenjdkd-host-dependency 2) ART_BUILD_HOST_DEBUG=false m -j art-libartd-libopenjdkd-host-dependency 3) cd art && mm/mmm/mmma, then, check `libopenjdkd` be built. Change-Id: Idd55667a0bd803d4124fbf0ea4c3bf45e2230aad
1 parent 3ea38e1 commit 66bbaa0

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed
 

‎Android.bp

+20
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,23 @@ phony {
4040
],
4141
}),
4242
}
43+
44+
// Fake packages to ensure generation of libopenjdkd when one builds with mm/mmm/mmma.
45+
//
46+
// The library is required for starting a runtime in debug mode, but libartd does not depend on it
47+
// (dependency cycle otherwise).
48+
//
49+
// Note: * As the package is phony to create a dependency the package name is irrelevant.
50+
// * We make MULTILIB explicit to "both," just to state here that we want both libraries on
51+
// 64-bit systems, even if it is the default.
52+
phony_rule {
53+
name: "art-libartd-libopenjdkd-host-dependency",
54+
phony_deps: [
55+
"libopenjdkd",
56+
],
57+
compile_multilib: "both",
58+
enabled: select(soong_config_variable("art_module", "art_build_host_debug"), {
59+
false: false,
60+
default: true,
61+
}),
62+
}

‎Android.mk

-25
Original file line numberDiff line numberDiff line change
@@ -247,31 +247,6 @@ endif
247247
# "include $(BUILD_...)".
248248
LOCAL_PATH := $(art_path)
249249

250-
####################################################################################################
251-
# Fake packages to ensure generation of libopenjdkd when one builds with mm/mmm/mmma.
252-
#
253-
# The library is required for starting a runtime in debug mode, but libartd does not depend on it
254-
# (dependency cycle otherwise).
255-
#
256-
# Note: * As the package is phony to create a dependency the package name is irrelevant.
257-
# * We make MULTILIB explicit to "both," just to state here that we want both libraries on
258-
# 64-bit systems, even if it is the default.
259-
260-
# ART on the host.
261-
ifneq ($(HOST_OS),darwin)
262-
ifeq ($(ART_BUILD_HOST_DEBUG),true)
263-
include $(CLEAR_VARS)
264-
LOCAL_MODULE := art-libartd-libopenjdkd-host-dependency
265-
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
266-
LOCAL_LICENSE_CONDITIONS := notice
267-
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
268-
LOCAL_MULTILIB := both
269-
LOCAL_REQUIRED_MODULES := libopenjdkd
270-
LOCAL_IS_HOST_MODULE := true
271-
include $(BUILD_PHONY_PACKAGE)
272-
endif
273-
endif # HOST_OS != darwin
274-
275250
########################################################################
276251
# "m build-art" for quick minimal build
277252
.PHONY: build-art

0 commit comments

Comments
 (0)
Please sign in to comment.