Skip to content

Commit b9d9689

Browse files
committed
Fix staticlib name for *-pc-windows-gnu targets
1 parent af89eb5 commit b9d9689

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/librustc_target/spec/windows_base.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ pub fn opts() -> TargetOptions {
7575
dll_prefix: String::new(),
7676
dll_suffix: ".dll".to_string(),
7777
exe_suffix: ".exe".to_string(),
78-
staticlib_prefix: String::new(),
79-
staticlib_suffix: ".lib".to_string(),
78+
staticlib_prefix: "lib".to_string(),
79+
staticlib_suffix: ".a".to_string(),
8080
target_family: Some("windows".to_string()),
8181
is_like_windows: true,
8282
allows_weak_linkage: false,

src/test/run-make-fulldeps/output-type-permutations/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ all:
7878
rm $(TMPDIR)/$(call BIN,foo)
7979
$(RUSTC) foo.rs --crate-type=dylib --emit=link=$(TMPDIR)/$(call BIN,foo)
8080
rm $(TMPDIR)/$(call BIN,foo)
81-
rm -f $(TMPDIR)/{lib,}foo.{dll.exp,dll.lib,pdb,dll.a,exe.lib}
81+
rm -f $(TMPDIR)/{lib,}foo.{dll.exp,dll.lib,pdb,dll.a,exe.a}
8282
[ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ] || (ls -1 $(TMPDIR) && exit 1)
8383

8484
$(RUSTC) foo.rs --crate-type=staticlib -o $(TMPDIR)/foo

src/test/run-make-fulldeps/tools.mk

+5
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,13 @@ RUN = PATH="$(PATH):$(TARGET_RPATH_DIR)" $(RUN_BINFILE)
4444
FAIL = PATH="$(PATH):$(TARGET_RPATH_DIR)" $(RUN_BINFILE) && exit 1 || exit 0
4545
DYLIB_GLOB = $(1)*.dll
4646
DYLIB = $(TMPDIR)/$(1).dll
47+
ifdef IS_MSVC
4748
STATICLIB = $(TMPDIR)/$(1).lib
4849
STATICLIB_GLOB = $(1)*.lib
50+
else
51+
STATICLIB = $(TMPDIR)/lib$(1).a
52+
STATICLIB_GLOB = lib$(1)*.a
53+
endif
4954
BIN = $(1).exe
5055
LLVM_FILECHECK := $(shell cygpath -u "$(LLVM_FILECHECK)")
5156
else

0 commit comments

Comments
 (0)