Skip to content

Commit 5d0fea1

Browse files
committed
Use --crate-file-name to find out the library filename in dep-info test
1 parent 9b1e7db commit 5d0fea1

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/test/run-make/dep-info/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
-include ../tools.mk
2+
23
all:
34
$(RUSTC) --dep-info --lib lib.rs
45
sleep 1

src/test/run-make/dep-info/Makefile.foo

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
ifeq ($(shell uname),Darwin)
2-
LIBEXT=dylib
3-
else
4-
LIBEXT=so
5-
endif
1+
LIB := $(shell $(RUSTC) --crate-file-name --lib lib.rs)
62

7-
$(TMPDIR)/libfoo-b517899a-0.1.$(LIBEXT):
3+
$(TMPDIR)/$(LIB):
84
$(RUSTC) --dep-info --lib lib.rs
95
touch $(TMPDIR)/done
106

0 commit comments

Comments
 (0)