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

Commit d2a76c14 authored by Yohann Roussel's avatar Yohann Roussel
Browse files

Change built module of static java libraries

Set LOCAL_BUILT_MODULE of static java libraries when Jack is enabled
to classes.jack instead of javalib.jar.
This allows that running mm in those libraries will build classes.jack
instead of the jar.

Change-Id: I96b4b227848e971df96331b3f0cc731e856be349
parent 1f382fa4
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -43,13 +43,6 @@ endif

my_module_tags := $(LOCAL_MODULE_TAGS)

LOCAL_JACK_ENABLED := $(strip $(LOCAL_JACK_ENABLED))
ifneq ($(LOCAL_JACK_ENABLED),full)
ifneq ($(LOCAL_JACK_ENABLED),incremental)
LOCAL_JACK_ENABLED :=
endif
endif

###########################################################
## Validate and define fallbacks for input LOCAL_* variables.
###########################################################
+22 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2008 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.
#

LOCAL_JACK_ENABLED := $(strip $(LOCAL_JACK_ENABLED))
ifneq ($(LOCAL_JACK_ENABLED),full)
ifneq ($(LOCAL_JACK_ENABLED),incremental)
LOCAL_JACK_ENABLED :=
endif
endif
+3 −1
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@
#
ifeq ($(HOST_OS),linux)

LOCAL_UNINSTALLABLE_MODULE := true
LOCAL_IS_STATIC_JAVA_LIBRARY := true
USE_CORE_LIB_BOOTCLASSPATH := true
LOCAL_JAVA_LIBRARIES += core-libart-hostdex

@@ -51,5 +53,5 @@ $(full_classes_jack): $(java_sources) $(java_resource_sources) $(full_jack_lib_d
	$(java-to-jack)

USE_CORE_LIB_BOOTCLASSPATH :=

LOCAL_IS_STATIC_JAVA_LIBRARY :=
endif
+3 −3
Original line number Diff line number Diff line
@@ -58,13 +58,13 @@ endif
$(full_classes_emma_jar) : $(full_classes_compiled_jar) | $(EMMA_JAR)
	$(transform-classes.jar-to-emma)

$(LOCAL_BUILT_MODULE) : $(full_classes_emma_jar)
$(built_javalib_jar) : $(full_classes_emma_jar)
	@echo Copying: $@
	$(hide) $(ACP) -fp $< $@

else # LOCAL_EMMA_INSTRUMENT
# Directly build into LOCAL_BUILT_MODULE.
full_classes_compiled_jar := $(LOCAL_BUILT_MODULE)
# Directly build into $(built_javalib_jar).
full_classes_compiled_jar := $(built_javalib_jar)
endif # LOCAL_EMMA_INSTRUMENT

$(full_classes_compiled_jar): PRIVATE_JAVAC_DEBUG_FLAGS := -g
+16 −3
Original line number Diff line number Diff line
@@ -23,6 +23,22 @@ LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
LOCAL_IS_HOST_MODULE := true
LOCAL_BUILT_MODULE_STEM := javalib.jar

intermediates := $(call local-intermediates-dir)
intermediates.COMMON := $(call local-intermediates-dir,COMMON)

built_javalib_jar := $(intermediates)/javalib.jar

#################################
include $(BUILD_SYSTEM)/configure_local_jack.mk
#################################

ifdef LOCAL_JACK_ENABLED
ifdef LOCAL_IS_STATIC_JAVA_LIBRARY
LOCAL_BUILT_MODULE_STEM := classes.jack
LOCAL_INTERMEDIATE_TARGETS += $(built_javalib_jar)
endif
endif

# base_rules.mk looks at this
all_res_assets :=

@@ -39,9 +55,6 @@ else
endif
endif

intermediates := $(call local-intermediates-dir)
intermediates.COMMON := $(call local-intermediates-dir,COMMON)

LOCAL_INTERMEDIATE_SOURCE_DIR := $(intermediates.COMMON)/src
LOCAL_JAVA_LIBRARIES := $(sort $(LOCAL_JAVA_LIBRARIES))
Loading