Skip to content

Commit af5d9d6

Browse files
committed
Auto merge of #29845 - wthrowe:libdir, r=alexcrichton
This should get `--libdir` working as well as it was a couple of weeks ago. (That is, it still rewrites paths incorrectly but it no longer fails during `make install`.) Fixes gentoo/gentoo-rust#28 and gentoo/gentoo-rust#29.
2 parents bf78389 + 2b98d4f commit af5d9d6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

mk/main.mk

+4-3
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
380380
ifeq ($$(CFG_WINDOWSY_$(3)),1)
381381
# On Windows we always store host runtime libraries in the 'bin' directory because
382382
# there's no rpath. Target libraries go under $CFG_LIBDIR_RELATIVE (usually 'lib').
383-
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
383+
HLIB_RELATIVE$(1)_H_$(3) = bin
384384
TROOT$(1)_T_$(2)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)/rustlib/$(2)
385385
# Remove the next 3 lines after a snapshot
386386
ifeq ($(1),0)
@@ -390,13 +390,14 @@ endif
390390
else
391391

392392
ifeq ($(1),0)
393-
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/lib
393+
HLIB_RELATIVE$(1)_H_$(3) = lib
394394
else
395-
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
395+
HLIB_RELATIVE$(1)_H_$(3) = $$(CFG_LIBDIR_RELATIVE)
396396
endif
397397
TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2)
398398

399399
endif
400+
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(HLIB_RELATIVE$(1)_H_$(3))
400401

401402
# Destinations of artifacts for target architectures
402403
TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin

mk/prepare.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ define DEF_PREPARE_HOST_LIB
115115
prepare-host-lib-$(1)-$(2)-$(3)-$(4): \
116116
PREPARE_WORKING_SOURCE_LIB_DIR=$$(HLIB$(2)_H_$(3))
117117
prepare-host-lib-$(1)-$(2)-$(3)-$(4): \
118-
PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_DIR)/$$(notdir $$(HLIB$(2)_H_$(3)))
118+
PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_DIR)/$$(HLIB_RELATIVE$(2)_H_$(3))
119119
prepare-host-lib-$(1)-$(2)-$(3)-$(4): prepare-maybe-clean-$(4) \
120120
$$(foreach dep,$$(RUST_DEPS_$(1)),prepare-host-lib-$$(dep)-$(2)-$(3)-$(4)) \
121121
$$(HLIB$(2)_H_$(3))/stamp.$(1) \

0 commit comments

Comments
 (0)