Skip to content

Commit

Permalink
mk: Don't install host rlibs
Browse files Browse the repository at this point in the history
You rarely want to statically link against librustc and friends, so there's no
real reason to install the rlib version of these libraries, especially because
the rlibs are massive.
  • Loading branch information
alexcrichton committed Feb 21, 2014
1 parent 991d466 commit 3cf0b9b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mk/prepare.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
# It requires the following variables to be set:
#
# PREPARE_HOST - the host triple
# PREPARE_HOST - the host triple
# PREPARE_TARGETS - the target triples, space separated
# PREPARE_DEST_DIR - the directory to put the image

Expand Down Expand Up @@ -172,7 +172,10 @@ prepare-target-$(2)-host-$(3)-$(1): \
$$(if $$(findstring $(2),$$(CFG_HOST)), \
$$(foreach crate,$$(HOST_CRATES), \
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate)),)
# Only install if this host and target combo is being prepared
# Only install if this host and target combo is being prepared. Also be sure to
# *not* install the rlibs for host crates because there's no need to statically
# link against most of them. They just produce a large amount of extra size
# bloat.
$$(if $$(findstring $(1), $$(PREPARE_STAGE)),\
$$(if $$(findstring $(2), $$(PREPARE_TARGETS)),\
$$(if $$(findstring $(3), $$(PREPARE_HOST)),\
Expand All @@ -182,8 +185,7 @@ prepare-target-$(2)-host-$(3)-$(1): \
$$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate))))\
$$(if $$(findstring $(2),$$(CFG_HOST)),\
$$(foreach crate,$$(HOST_CRATES),\
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))\
$$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate)))),)\
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))),)\
$$(call PREPARE_LIB,libmorestack.a) \
$$(call PREPARE_LIB,libcompiler-rt.a),),),)
endef
Expand Down

5 comments on commit 3cf0b9b

@bors
Copy link
Contributor

@bors bors commented on 3cf0b9b Feb 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at alexcrichton@3cf0b9b

@bors
Copy link
Contributor

@bors bors commented on 3cf0b9b Feb 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging alexcrichton/rust/smaller-rust = 3cf0b9b into auto

@bors
Copy link
Contributor

@bors bors commented on 3cf0b9b Feb 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alexcrichton/rust/smaller-rust = 3cf0b9b merged ok, testing candidate = 4995a85

@bors
Copy link
Contributor

@bors bors commented on 3cf0b9b Feb 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 3cf0b9b Feb 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 4995a85

Please sign in to comment.