Fix remote execution of r8 and d8 in make

1. The location of the r8.jar and d8.jar files was no longer correct.
2. $(JAVA) was not defined before rbe.mk was included.
3. $(JAVA) includes options, which much be stripped to be a rewrapper toolchain input.

Test: ran against an RBE cluster with RBE_D8_EXEC_STRATEGY=remote and RBE_R8_EXEC_STRATEGY=remote

Change-Id: Icf434f5c0fda687c70c75b01b0bfd63bcd8cc474
This commit is contained in:
Benjamin Peterson
2023-01-19 18:00:54 +00:00
parent 529aa12817
commit 099349bea8
2 changed files with 5 additions and 5 deletions

View File

@@ -431,6 +431,9 @@ $(hide) $(HOST_OTOOL) -l $(1) | grep LC_ID_DYLIB -A 5 > $(2)
$(hide) $(HOST_NM) -gP $(1) | cut -f1-2 -d" " | (grep -v U$$ >> $(2) || true) $(hide) $(HOST_NM) -gP $(1) | cut -f1-2 -d" " | (grep -v U$$ >> $(2) || true)
endef endef
# Pick a Java compiler.
include $(BUILD_SYSTEM)/combo/javac.mk
ifeq ($(CALLED_FROM_SETUP),true) ifeq ($(CALLED_FROM_SETUP),true)
include $(BUILD_SYSTEM)/ccache.mk include $(BUILD_SYSTEM)/ccache.mk
include $(BUILD_SYSTEM)/goma.mk include $(BUILD_SYSTEM)/goma.mk
@@ -453,9 +456,6 @@ ifeq (,$(filter 1 true,$(WITH_TIDY_ONLY)))
WITH_TIDY_ONLY := WITH_TIDY_ONLY :=
endif endif
# Pick a Java compiler.
include $(BUILD_SYSTEM)/combo/javac.mk
# --------------------------------------------------------------- # ---------------------------------------------------------------
# Check that the configuration is current. We check that # Check that the configuration is current. We check that
# BUILD_ENV_SEQUENCE_NUMBER is current against this value. # BUILD_ENV_SEQUENCE_NUMBER is current against this value.

View File

@@ -81,11 +81,11 @@ ifneq ($(filter-out false,$(USE_RBE)),)
endif endif
ifdef RBE_R8 ifdef RBE_R8
R8_WRAPPER := $(strip $(RBE_WRAPPER) --labels=type=compile,compiler=r8 --exec_strategy=$(r8_exec_strategy) --platform=$(java_r8_d8_platform) --inputs=$(OUT_DIR)/soong/host/linux-x86/framework/r8-compat-proguard.jar,build/make/core/proguard_basic_keeps.flags --toolchain_inputs=$(JAVA)) R8_WRAPPER := $(strip $(RBE_WRAPPER) --labels=type=compile,compiler=r8 --exec_strategy=$(r8_exec_strategy) --platform=$(java_r8_d8_platform) --inputs=$(OUT_DIR)/host/linux-x86/framework/r8.jar,build/make/core/proguard_basic_keeps.flags --toolchain_inputs=$(firstword $(JAVA)))
endif endif
ifdef RBE_D8 ifdef RBE_D8
D8_WRAPPER := $(strip $(RBE_WRAPPER) --labels=type=compile,compiler=d8 --exec_strategy=$(d8_exec_strategy) --platform=$(java_r8_d8_platform) --inputs=$(OUT_DIR)/soong/host/linux-x86/framework/d8.jar --toolchain_inputs=$(JAVA)) D8_WRAPPER := $(strip $(RBE_WRAPPER) --labels=type=compile,compiler=d8 --exec_strategy=$(d8_exec_strategy) --platform=$(java_r8_d8_platform) --inputs=$(OUT_DIR)/host/linux-x86/framework/d8.jar --toolchain_inputs=$(firstword $(JAVA)))
endif endif
rbe_dir := rbe_dir :=