Merge "Add RBE support for Javac, R8, and D8 if respective env vars are set." am: 2899e4871d

Change-Id: I8fa09e31be17050b69f54ed0f102ab0a8f3d1252
This commit is contained in:
Automerger Merge Worker 2020-01-28 20:07:56 +00:00
commit 1f58479935
3 changed files with 21 additions and 5 deletions

View File

@ -2200,7 +2200,7 @@ define transform-classes.jar-to-dex
@mkdir -p $(dir $@)
$(hide) rm -f $(dir $@)classes*.dex $(dir $@)d8_input.jar
$(hide) $(ZIP2ZIP) -j -i $< -o $(dir $@)d8_input.jar "**/*.class"
$(hide) $(DX_COMMAND) $(DEX_FLAGS) \
$(hide) $(D8_WRAPPER) $(DX_COMMAND) $(DEX_FLAGS) \
--output $(dir $@) \
$(addprefix --lib ,$(PRIVATE_D8_LIBS)) \
--min-api $(PRIVATE_MIN_SDK_VERSION) \
@ -2679,7 +2679,7 @@ endif
define transform-jar-to-dex-r8
@echo R8: $@
$(hide) rm -f $(PRIVATE_PROGUARD_DICTIONARY)
$(hide) $(R8_COMPAT_PROGUARD) $(DEX_FLAGS) \
$(hide) $(R8_WRAPPER) $(R8_COMPAT_PROGUARD) $(DEX_FLAGS) \
-injars '$<' \
--min-api $(PRIVATE_MIN_SDK_VERSION) \
--no-data-resources \

View File

@ -21,12 +21,25 @@ ifneq ($(filter-out false,$(USE_RBE)),)
else
rbe_dir := $(HOME)/rbe
endif
RBE_WRAPPER := $(rbe_dir)/rewrapper --labels=type=compile,lang=cpp,compiler=clang --env_var_whitelist=PWD
RBE_WRAPPER := $(rbe_dir)/rewrapper
RBE_CXX := --labels=type=compile,lang=cpp,compiler=clang --env_var_whitelist=PWD
# Append rewrapper to existing *_WRAPPER variables so it's possible to
# use both ccache and rewrapper.
CC_WRAPPER := $(strip $(CC_WRAPPER) $(RBE_WRAPPER))
CXX_WRAPPER := $(strip $(CXX_WRAPPER) $(RBE_WRAPPER))
CC_WRAPPER := $(strip $(CC_WRAPPER) $(RBE_WRAPPER) $(RBE_CXX))
CXX_WRAPPER := $(strip $(CXX_WRAPPER) $(RBE_WRAPPER) $(RBE_CXX))
ifdef RBE_JAVAC
JAVAC_WRAPPER := $(strip $(JAVAC_WRAPPER) $(RBE_WRAPPER) --labels=type=compile,lang=java,compiler=javac,shallow=true)
endif
ifdef RBE_R8
R8_WRAPPER := $(strip $(RBE_WRAPPER) --labels=type=compile,compiler=r8,shallow=true)
endif
ifdef RBE_D8
D8_WRAPPER := $(strip $(RBE_WRAPPER) --labels=type=compile,compiler=d8,shallow=true)
endif
rbe_dir :=
endif

View File

@ -156,6 +156,9 @@ $(call add_json_bool, MinimizeJavaDebugInfo, $(filter true,$(PRODUCT
$(call add_json_bool, UseGoma, $(filter-out false,$(USE_GOMA)))
$(call add_json_bool, UseRBE, $(filter-out false,$(USE_RBE)))
$(call add_json_bool, UseRBEJAVAC, $(filter-out false,$(RBE_JAVAC)))
$(call add_json_bool, UseRBER8, $(filter-out false,$(RBE_R8)))
$(call add_json_bool, UseRBED8, $(filter-out false,$(RBE_D8)))
$(call add_json_bool, Arc, $(filter true,$(TARGET_ARC)))
$(call add_json_list, NamespacesToExport, $(PRODUCT_SOONG_NAMESPACES))