]>
git.proxmox.com Git - rustc.git/blob - mk/stage0.mk
1 # Extract the snapshot host compiler
5 $(HBIN0_H_
$(CFG_BUILD_TRIPLE
))/rustc
$(X_
$(CFG_BUILD_TRIPLE
)): \
6 $(S
)src
/snapshots.txt \
7 $(S
)src
/etc
/get-snapshot.py
$(MKFILE_DEPS
)
9 # Note: the variable "SNAPSHOT_FILE" is generally not set, and so
10 # we generally only pass one argument to this script.
11 ifdef CFG_ENABLE_LOCAL_RUST
12 $(Q
)$(S
)src
/etc
/local_stage0.sh
$(CFG_BUILD_TRIPLE
) $(CFG_LOCAL_RUST_ROOT
)
14 $(Q
)$(CFG_PYTHON
) $(S
)src
/etc
/get-snapshot.py
$(CFG_BUILD_TRIPLE
) $(SNAPSHOT_FILE
)
15 ifdef CFG_ENABLE_PAX_FLAGS
16 @
$(call E
, apply PaX flags
: $@
)
17 @
"$(CFG_PAXCTL)" -cm
"$@"
22 # Host libs will be extracted by the above rule
24 $(HLIB0_H_
$(CFG_BUILD_TRIPLE
))/$(CFG_RUNTIME_
$(CFG_BUILD_TRIPLE
)): \
25 $(HBIN0_H_
$(CFG_BUILD_TRIPLE
))/rustc
$(X_
$(CFG_BUILD_TRIPLE
))
28 $(HLIB0_H_
$(CFG_BUILD_TRIPLE
))/$(CFG_CORELIB_
$(CFG_BUILD_TRIPLE
)): \
29 $(HBIN0_H_
$(CFG_BUILD_TRIPLE
))/rustc
$(X_
$(CFG_BUILD_TRIPLE
))
32 $(HLIB0_H_
$(CFG_BUILD_TRIPLE
))/$(CFG_STDLIB_
$(CFG_BUILD_TRIPLE
)): \
33 $(HBIN0_H_
$(CFG_BUILD_TRIPLE
))/rustc
$(X_
$(CFG_BUILD_TRIPLE
))
36 $(HLIB0_H_
$(CFG_BUILD_TRIPLE
))/$(CFG_LIBRUSTC_
$(CFG_BUILD_TRIPLE
)): \
37 $(HBIN0_H_
$(CFG_BUILD_TRIPLE
))/rustc
$(X_
$(CFG_BUILD_TRIPLE
))
40 $(HLIB0_H_
$(CFG_BUILD_TRIPLE
))/$(CFG_RUSTLLVM_
$(CFG_BUILD_TRIPLE
)): \
41 $(HBIN0_H_
$(CFG_BUILD_TRIPLE
))/rustc
$(X_
$(CFG_BUILD_TRIPLE
))
44 # For other targets, let the host build the target:
46 define BOOTSTRAP_STAGE0
47 # $(1) target to bootstrap
48 # $(2) stage to bootstrap from
49 # $(3) target to bootstrap from
51 $$(HBIN0_H_
$(1))/rustc
$$(X_
$(1)): \
52 $$(TBIN
$(2)_T_
$(1)_H_
$(3))/rustc
$$(X_
$(1))
56 $$(HLIB0_H_
$(1))/$(CFG_RUNTIME_
$(1)): \
57 $$(TLIB
$(2)_T_
$(1)_H_
$(3))/$(CFG_RUNTIME_
$(1))
61 $$(HLIB0_H_
$(1))/$(CFG_CORELIB_
$(1)): \
62 $$(TLIB
$(2)_T_
$(1)_H_
$(3))/$(CFG_CORELIB_
$(1))
64 $$(Q
)cp
$$(TLIB
$(2)_T_
$(1)_H_
$(3))/$(CORELIB_GLOB_
$(1)) $$@
66 $$(HLIB0_H_
$(1))/$(CFG_STDLIB_
$(1)): \
67 $$(TLIB
$(2)_T_
$(1)_H_
$(3))/$(CFG_STDLIB_
$(1))
69 $$(Q
)cp
$$(TLIB
$(2)_T_
$(1)_H_
$(3))/$(STDLIB_GLOB_
$(1)) $$@
71 $$(HLIB0_H_
$(1))/$(CFG_LIBRUSTC_
$(1)): \
72 $$(TLIB
$(2)_T_
$(1)_H_
$(3))/$(CFG_LIBRUSTC_
$(1))
74 $$(Q
)cp
$$(TLIB
$(2)_T_
$(1)_H_
$(3))/$(LIBRUSTC_GLOB_
$(1)) $$@
76 $$(HLIB0_H_
$(1))/$(CFG_RUSTLLVM_
$(1)): \
77 $$(TLIB
$(2)_T_
$(1)_H_
$(3))/$(CFG_RUSTLLVM_
$(1))
83 # Use stage1 to build other architectures: then you don't have to wait
84 # for stage2, but you get the latest updates to the compiler source.
85 $(foreach t
,$(NON_BUILD_HOST_TRIPLES
), \
86 $(eval
$(call BOOTSTRAP_STAGE0
,$(t
),1,$(CFG_BUILD_TRIPLE
))))