Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0c98ef0 authored by David 'Digit' Turner's avatar David 'Digit' Turner
Browse files

Ensure -user builds can run the dex preopt pass in the emulator.

This is done by ensuring that /init.goldfish.rc and /system/etc/init.goldfish.sh
are part of the system image, even if it lacks other emulator related bits.
parent 79aedbee
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -11,10 +11,13 @@ ifeq ($(TARGET_PRODUCT),generic)
copy_from += etc/vold.conf
endif

# for non -user build, also copy emulator-support script into /system/etc
ifneq ($(TARGET_BUILD_VARIANT),user)
# the /system/etc/init.goldfish.sh is needed to enable emulator support
# in the system image. In theory, we don't need these for -user builds
# which are device-specific. However, these builds require at the moment
# to run the dex pre-optimization *in* the emulator. So keep the file until
# we are capable of running dex preopt on the host.
#
copy_from += etc/init.goldfish.sh
endif

copy_to := $(addprefix $(TARGET_OUT)/,$(copy_from))
copy_from := $(addprefix $(LOCAL_PATH)/,$(copy_from))
@@ -36,13 +39,13 @@ $(file) : $(LOCAL_PATH)/init.rc | $(ACP)
ALL_PREBUILT += $(file)
endif

# for non -user build, also copy emulator-specific init script into /
ifneq ($(TARGET_BUILD_VARIANT),user)
# Just like /system/etc/init.goldfish.sh, the /init.godlfish.rc is here
# to allow -user builds to properly run the dex pre-optimization pass in
# the emulator.
file := $(TARGET_ROOT_OUT)/init.goldfish.rc
$(file) : $(LOCAL_PATH)/etc/init.goldfish.rc | $(ACP)
	$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
endif

# create some directories (some are mount points)
DIRS := $(addprefix $(TARGET_ROOT_OUT)/, \