Skip to content

Commit 1e2044e

Browse files
committed
mk: always use bin and lib as bindir and libdir for stage0 CFG_BUILD
1 parent 0cd38a8 commit 1e2044e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

mk/main.mk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,18 @@ define SREQ
333333

334334
# Destinations of artifacts for the host compiler
335335
HROOT$(1)_H_$(3) = $(3)/stage$(1)
336+
337+
ifeq ($(1)-$(3),0-$$(CFG_BUILD))
338+
# stage0 relative paths are fixed. This is done because we don't have control
339+
# over where the bootstrap (snapshot or local) rustc looks to locate it's
340+
# libdir. At the moment, this assumes the relative paths (from sysroot aka
341+
# prefix) are 'lib' and 'bin'.
342+
HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
343+
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/lib
344+
else
336345
HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_BINDIR_RELATIVE)
337346
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
347+
endif
338348

339349
# Destinations of artifacts for target architectures
340350
TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2)

0 commit comments

Comments
 (0)