Skip to content

run-make-support: run might not accurately preserve the behavior of RUN in tools.mk #123832

Closed
@jieyouxu

Description

@jieyouxu

RUN in tools.mk has different environments depending on the platform. Audit run_make_support::run to make sure run correctly preserves the semantics of RUN in tools.mk:

# This is the name of the binary we will generate and run; use this
# e.g. for `$(CC) -o $(RUN_BINFILE)`.
RUN_BINFILE = $(TMPDIR)/$(1)

# Invoke the generated binary on the remote machine if compiletest was
# configured to use a remote test device, otherwise run it on the current host.
ifdef REMOTE_TEST_CLIENT
# FIXME: if a test requires additional files, this will need to be changed to
# also push them (by changing the 0 to the number of additional files, and
# providing the path of the additional files as the last arguments).
EXECUTE = $(REMOTE_TEST_CLIENT) run 0 $(RUN_BINFILE)
else
EXECUTE = $(RUN_BINFILE)
endif

TARGET_RPATH_ENV = \
    $(LD_LIB_PATH_ENVVAR)="$(TMPDIR):$(TARGET_RPATH_DIR):$($(LD_LIB_PATH_ENVVAR))"

# trimmed
ifeq ($(UNAME),Darwin)
    RUN = $(TARGET_RPATH_ENV) $(EXECUTE)
else
    ifdef IS_WINDOWS
        RUN = PATH="$(PATH):$(TARGET_RPATH_DIR)" $(EXECUTE)
    else
        RUN = $(TARGET_RPATH_ENV) $(EXECUTE)
    endif
endif

Metadata

Metadata

Assignees

Labels

A-run-makeArea: port run-make Makefiles to rmake.rsA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions