Skip to content

mk: Fix bootstrapping the nightly builds #15481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions mk/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ $(foreach host,$(CFG_HOST), \
$(foreach crate,$(CRATES), \
$(eval $(call RUST_CRATE_FULLDEPS,$(stage),$(target),$(host),$(crate)))))))

# NOTE: after a stage0 snap this should be just EXTRA_FILENAME, not with a stage
# bound
EXTRA_FILENAME_0 =
EXTRA_FILENAME_1 = -C extra-filename=-$(CFG_FILENAME_EXTRA)
EXTRA_FILENAME_2 = -C extra-filename=-$(CFG_FILENAME_EXTRA)
EXTRA_FILENAME_3 = -C extra-filename=-$(CFG_FILENAME_EXTRA)

# RUST_TARGET_STAGE_N template: This defines how target artifacts are built
# for all stage/target architecture combinations. This is one giant rule which
# works as follows:
Expand All @@ -75,6 +68,15 @@ EXTRA_FILENAME_3 = -C extra-filename=-$(CFG_FILENAME_EXTRA)
# $(4) is the crate name
define RUST_TARGET_STAGE_N

# NOTE: after a stage0 snap this should be just EXTRA_FILENAME, not with a stage
# or target bound
EXTRA_FILENAME_$(1)_$(2) = -C extra-filename=-$$(CFG_FILENAME_EXTRA)
ifeq ($(1),0)
ifeq ($$(CFG_BUILD),$(2))
EXTRA_FILENAME_$(1)_$(2) =
endif
endif

$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): CFG_COMPILER_HOST_TRIPLE = $(2)
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
$$(CRATEFILE_$(4)) \
Expand All @@ -93,7 +95,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
-L "$$(dir $$(LLVM_STDCPP_LOCATION_$(2)))" \
$$(RUSTFLAGS_$(4)) \
--out-dir $$(@D) \
$$(EXTRA_FILENAME_$(1)) \
$$(EXTRA_FILENAME_$(1)_$(2)) \
$$<
@touch $$@
$$(call LIST_ALL_OLD_GLOB_MATCHES,\
Expand Down