Skip to content

Commit 138252c

Browse files
committed
trans: Specify archive_format for MSVC
This means that we no longer need to ship the `llvm-ar.exe` binary in the MSVC distribution, and after a snapshot we can remove a good bit of logic from the makefiles!
1 parent ceded6a commit 138252c

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

mk/platform.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ $(foreach target,$(CFG_TARGET), \
243243
# Windows MSVC in the compiler, but the gist of it is that we use `llvm-ar.exe`
244244
# instead of `lib.exe` for assembling archives, so we need to inject this custom
245245
# dependency here.
246+
#
247+
# FIXME(stage0): remove this and all other relevant support in the makefiles
248+
# after a snapshot is made
246249
define ADD_LLVM_AR_TO_MSVC_DEPS
247250
ifeq ($$(findstring msvc,$(1)),msvc)
248251
NATIVE_TOOL_DEPS_core_T_$(1) += llvm-ar.exe

mk/target.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ $(foreach host,$(CFG_HOST), \
206206
# $(3) - triple snapshot is built for
207207
# $(4) - crate
208208
# $(5) - tool
209+
#
210+
# FIXME(stage0): remove this and all other relevant support in the makefiles
211+
# after a snapshot is made
209212
define MOVE_TOOLS_TO_SNAPSHOT_HOST_DIR
210213
ifneq (,$(3))
211214
$$(TLIB$(1)_T_$(2)_H_$(2))/stamp.$(4): $$(HLIB$(1)_H_$(2))/rustlib/$(3)/bin/$(5)
@@ -230,6 +233,9 @@ $(foreach target,$(CFG_TARGET), \
230233
# path instead of MinGW's /usr/bin/link.exe (entirely unrelated)
231234
#
232235
# The values for these variables are detected by the configure script.
236+
#
237+
# FIXME(stage0): remove this and all other relevant support in the makefiles
238+
# after a snapshot is made
233239
define SETUP_LIB_MSVC_ENV_VARS
234240
ifeq ($$(findstring msvc,$(2)),msvc)
235241
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \

src/librustc_back/target/windows_msvc_base.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ pub fn opts() -> TargetOptions {
6060
"/NOLOGO".to_string(),
6161
"/NXCOMPAT".to_string(),
6262
],
63+
archive_format: "gnu".to_string(),
6364

6465
.. Default::default()
6566
}

0 commit comments

Comments
 (0)