Skip to content

Commit 0dcc955

Browse files
committed
auto merge of #15006 : alexcrichton/rust/fix-nightly, r=brson
The nightly builds on linux have been failing over the past few days due to a malformed LD_LIBRARY_PATH. It appears that the underlying cause is that one of the tests, dep-info-custom, recursively invokes make but the RUSTC variable passed down has the string "$LD_LIBRARY_PATH". This is intended to read the host's original LD_LIBRARY_PATH, but it appears that the makefile is eagerly expanding the "$L" to nothing, causing the original host's LD_LIBRARY_PATH to be ignored. This fix removes passing the string "$LD_LIBRARY_PATH" and rather expands it eagerly to ensure that escaping doesn't happen at a later stage. I'm still not entirely sure why the makefile is interpreting the dollar as a variable, but this seems to fix the issue.
2 parents 6ca454f + 91c7687 commit 0dcc955

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/test/run-make/tools.mk

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
export LD_LIBRARY_PATH:=$(TMPDIR):$(LD_LIBRARY_PATH)
2-
export DYLD_LIBRARY_PATH:=$(TMPDIR):$(DYLD_LIBRARY_PATH)
3-
41
# These deliberately use `=` and not `:=` so that client makefiles can
52
# augment HOST_RPATH_DIR / TARGET_RPATH_DIR.
63
HOST_RPATH_ENV = \
7-
$(LD_LIB_PATH_ENVVAR)=$(HOST_RPATH_DIR):$$$(LD_LIB_PATH_ENVVAR)
4+
$(LD_LIB_PATH_ENVVAR)="$(HOST_RPATH_DIR):$($(LD_LIB_PATH_ENVVAR))"
85
TARGET_RPATH_ENV = \
9-
$(LD_LIB_PATH_ENVVAR)=$(TARGET_RPATH_DIR):$$$(LD_LIB_PATH_ENVVAR)
6+
$(LD_LIB_PATH_ENVVAR)="$(TARGET_RPATH_DIR):$($(LD_LIB_PATH_ENVVAR))"
107

118
RUSTC := $(HOST_RPATH_ENV) $(RUSTC) --out-dir $(TMPDIR) -L $(TMPDIR)
129
CC := $(CC) -L $(TMPDIR)
@@ -43,7 +40,6 @@ DYLIB_GLOB = $(1)*.dll
4340
DYLIB = $(TMPDIR)/$(1).dll
4441
BIN = $(1).exe
4542
RPATH_LINK_SEARCH =
46-
RUSTC := PATH="$(PATH):$(LD_LIBRARY_PATH)" $(RUSTC)
4743
else
4844
RUN = $(TARGET_RPATH_ENV) $(RUN_BINFILE)
4945
FAIL = $(TARGET_RPATH_ENV) $(RUN_BINFILE) && exit 1 || exit 0

0 commit comments

Comments
 (0)