mk: Correct names of installed libs on windows

Previously libmorestack.a and libcompiler-rt.a were installed, but link.exe
looks for morestack.lib and compiler-rt.lib by default, so we need to install
these with the correct name
This commit is contained in:
Alex Crichton 2015-05-11 12:29:08 -07:00
parent eb5bf151a5
commit 150663c3b6
5 changed files with 10 additions and 12 deletions

View File

@ -125,9 +125,6 @@ ONLY_RLIB_rustc_bitflags := 1
# Documented-by-default crates
DOC_CRATES := std alloc collections core libc rustc_unicode
# Installed objects/libraries by default
INSTALLED_OBJECTS := libmorestack.a libcompiler-rt.a
################################################################################
# You should not need to edit below this line
################################################################################

View File

@ -396,8 +396,6 @@ endif
# Prerequisites for using the stageN compiler to build target artifacts
TSREQ$(1)_T_$(2)_H_$(3) = \
$$(HSREQ$(1)_H_$(3)) \
$$(foreach obj,$$(INSTALLED_OBJECTS),\
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(obj)) \
$$(foreach obj,$$(INSTALLED_OBJECTS_$(2)),\
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(obj))

View File

@ -112,6 +112,14 @@ CFG_RLIB_GLOB=lib$(1)-*.rlib
include $(wildcard $(CFG_SRC_DIR)mk/cfg/*.mk)
define ADD_INSTALLED_OBJECTS
INSTALLED_OBJECTS_$(1) += $$(call CFG_STATIC_LIB_NAME_$(1),morestack) \
$$(call CFG_STATIC_LIB_NAME_$(1),compiler-rt)
endef
$(foreach target,$(CFG_TARGET), \
$(eval $(call ADD_INSTALLED_OBJECTS,$(target))))
# The -Qunused-arguments sidesteps spurious warnings from clang
define FILTER_FLAGS
ifeq ($$(CFG_USING_CLANG),1)

View File

@ -140,7 +140,7 @@ prepare-target-$(2)-host-$(3)-$(1)-$(4): prepare-maybe-clean-$(4) \
$$(if $$(findstring $(2),$$(CFG_HOST)), \
$$(foreach crate,$$(HOST_CRATES), \
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))),) \
$$(foreach object,$$(INSTALLED_OBJECTS) $$(INSTALLED_OBJECTS_$(2)),\
$$(foreach object,$$(INSTALLED_OBJECTS_$(2)),\
$$(call PREPARE_LIB,$$(object))),),),)
endef

View File

@ -111,11 +111,6 @@ $$(RT_OUTPUT_DIR_$(1))/$$(NATIVE_$(2)_$(1)): $$(OBJS_$(2)_$(1))
@$$(call E, link: $$@)
$$(Q)$$(AR_$(1)) rcs $$@ $$^
ifeq ($$(findstring windows,$(1)),windows)
$$(RT_OUTPUT_DIR_$(1))/lib$(2).a: $$(RT_OUTPUT_DIR_$(1))/$$(NATIVE_$(2)_$(1))
$$(Q)cp $$^ $$@
endif
endef
$(foreach target,$(CFG_TARGET), \
@ -227,7 +222,7 @@ COMPRT_DEPS := $(wildcard \
$(S)src/compiler-rt/*/*/*/*)
endif
COMPRT_NAME_$(1) := libcompiler-rt.a
COMPRT_NAME_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),compiler-rt)
COMPRT_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(COMPRT_NAME_$(1))
COMPRT_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/compiler-rt