Skip to content

Commit 0d5142f

Browse files
committed
Auto merge of #28023 - jmesmon:llvm-path-native-only, r=alexcrichton
This fixes the case where we try to re-build & re-install rust to the same prefix (without uninstalling) while using an llvm-root that is the same as the prefix. Without this, builds like that fail with: 'error: multiple dylib candidates for `std` found' See https://github.com/jmesmon/meta-rust/issues/6 for some details. May also be related to #20342.
2 parents ab21fe5 + 2d0cb31 commit 0d5142f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mk/main.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ LLVM_VERSION_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --version)
294294
LLVM_BINDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --bindir)
295295
LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir)
296296
LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir)
297-
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L "$$(LLVM_LIBDIR_$(1))"
297+
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L native="$$(LLVM_LIBDIR_$(1))"
298298
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
299299
ifeq ($$(findstring freebsd,$(1)),freebsd)
300300
# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),

0 commit comments

Comments
 (0)