Skip to content

Commit 31367d0

Browse files
committed
---
yaml --- r: 2355 b: refs/heads/master c: 04f966f h: refs/heads/master i: 2353: 44540e8 2351: ffb19d3 v: v3
1 parent 6baaab9 commit 31367d0

File tree

8 files changed

+49
-9
lines changed

8 files changed

+49
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: add7d34164089626a7f0b2fa86e2fb6c29e5118b
2+
refs/heads/master: 04f966f0bc8d092a000e5b6dad0bdd3353ec4efe

trunk/Makefile.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ SREQ2 := stage2/rustc$(X) $(LREQ) stage3/glue.o stage3/$(CFG_STDLIB)
137137

138138
export CFG_SRC_DIR
139139

140+
######################################################################
141+
# Subprograms
142+
######################################################################
143+
144+
LLVM_AS := $(CFG_LLVM_BINDIR)/llvm-as
145+
140146

141147
######################################################################
142148
# Single-target rules
@@ -145,17 +151,21 @@ export CFG_SRC_DIR
145151
all: rt/$(CFG_RUNTIME) \
146152
rustllvm/$(CFG_RUSTLLVM) \
147153
stage0/$(CFG_STDLIB) \
154+
stage0/intrinsics.bc \
148155
stage0/rustc$(X) \
149156
$(GENERATED) \
150157
$(DOCS) \
151158
stage1/$(CFG_STDLIB) \
159+
stage1/intrinsics.bc \
152160
stage1/glue.o \
153161
stage1/rustc$(X) \
154162
stage2/$(CFG_STDLIB) \
163+
stage2/intrinsics.bc \
155164
stage2/glue.o \
156165
stage2/rustc$(X) \
157166
stage3/$(CFG_STDLIB) \
158167
stage3/glue.o \
168+
stage3/intrinsics.bc \
159169
stage3/rustc$(X)
160170

161171

@@ -172,6 +182,7 @@ config.mk: $(S)configure $(S)Makefile.in
172182
# Additional makefiles
173183
######################################################################
174184

185+
include $(CFG_SRC_DIR)/mk/intrinsics.mk
175186
include $(CFG_SRC_DIR)/mk/stage0.mk
176187
include $(CFG_SRC_DIR)/mk/stage1.mk
177188
include $(CFG_SRC_DIR)/mk/stage2.mk

trunk/configure

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ need_cmd find
122122
need_cmd uname
123123
need_cmd date
124124
need_cmd tr
125+
need_cmd sed
125126

126127
msg "inspecting environment"
127128

@@ -215,6 +216,10 @@ then
215216
--version \
216217
| grep version \
217218
| cut -d ' ' -f 5-)
219+
CFG_LLVM_TRIPLE=$("$CFG_LLVM_BINDIR/llc" \
220+
--version \
221+
| grep Host: \
222+
| cut -d ' ' -f 4-)
218223
elif [ ! -z "$CFG_LLVM_CONFIG" ]
219224
then
220225
CFG_LLVM_VERSION=$(llvm-config --version)
@@ -224,6 +229,7 @@ then
224229
CFG_LLVM_CXXFLAGS=$(llvm-config --cxxflags)
225230
CFG_LLVM_LDFLAGS=$(llvm-config --ldflags)
226231
CFG_LLVM_LIBS=$(llvm-config --libs)
232+
CFG_LLVM_TRIPLE=$(llvm-config --host-target)
227233
else
228234
err "either the \"CFG_LLVM_ROOT\" environment variable must be set, or a \
229235
\"llvm-config\" script must be present"
@@ -244,6 +250,7 @@ putvar CFG_LLVM_LIBDIR
244250
putvar CFG_LLVM_CXXFLAGS
245251
putvar CFG_LLVM_LDFLAGS
246252
putvar CFG_LLVM_LIBS
253+
putvar CFG_LLVM_TRIPLE
247254

248255
# Munge any paths that appear in config.mk back to posix-y
249256
perl -i.bak -p -e 's@ ([a-zA-Z]):[/\\]@ /\1/@go;' \

trunk/mk/stage0.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ stage0/glue.o: stage0/rustc$(X)
1010

1111
stage0/$(CFG_STDLIB): stage0/rustc$(X)
1212
$(Q)touch $@
13+
14+
# TODO: Include as part of the snapshot.
15+
stage0/intrinsics.bc: $(INTRINSICS_BC)
16+
@$(call E, cp: $@)
17+
$(Q)cp $< $@
18+

trunk/mk/stage1.mk

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
stage1/std.o: $(STDLIB_CRATE) $(STDLIB_INPUTS) \
2-
stage0/rustc$(X) stage0/$(CFG_STDLIB) $(LREQ) $(MKFILES)
2+
stage0/rustc$(X) stage0/$(CFG_STDLIB) stage0/intrinsics.bc \
3+
$(LREQ) $(MKFILES)
34
@$(call E, compile: $@)
45
$(STAGE0) -c --shared -o $@ $<
56

@@ -12,10 +13,15 @@ stage1/rustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ0)
1213
@$(call E, compile: $@)
1314
$(STAGE0) -c -o $@ $<
1415

15-
stage1/glue.o: stage0/rustc$(X) stage0/$(CFG_STDLIB) $(LREQ) $(MKFILES)
16+
stage1/glue.o: stage0/rustc$(X) stage0/$(CFG_STDLIB) stage0/intrinsics.bc \
17+
$(LREQ) $(MKFILES)
1618
@$(call E, generate: $@)
1719
$(STAGE0) -c -o $@ --glue
1820

21+
stage1/intrinsics.bc: $(INTRINSICS_BC)
22+
@$(call E, cp: $@)
23+
$(Q)cp $< $@
24+
1925
# Due to make not wanting to run the same implicit rules twice on the same
2026
# rule tree (implicit-rule recursion prevention, see "Chains of Implicit
2127
# Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here

trunk/mk/stage2.mk

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
stage2/std.o: $(STDLIB_CRATE) $(STDLIB_INPUTS) stage1/rustc$(X) $(MKFILES)
1+
stage2/std.o: $(STDLIB_CRATE) $(STDLIB_INPUTS) stage1/rustc$(X) \
2+
stage1/intrinsics.bc $(MKFILES)
23
@$(call E, compile: $@)
34
$(STAGE1) -c --shared -o $@ $<
45

@@ -11,11 +12,15 @@ stage2/rustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ1)
1112
@$(call E, compile: $@)
1213
$(STAGE1) -c -o $@ $<
1314

14-
stage2/glue.o: stage1/rustc$(X) stage1/$(CFG_STDLIB) \
15-
rustllvm/$(CFG_RUSTLLVM) rt/$(CFG_RUNTIME)
15+
stage2/glue.o: stage1/rustc$(X) stage1/$(CFG_STDLIB) stage1/intrinsics.bc \
16+
rustllvm/$(CFG_RUSTLLVM) rt/$(CFG_RUNTIME)
1617
@$(call E, generate: $@)
1718
$(STAGE1) -c -o $@ --glue
1819

20+
stage2/intrinsics.bc: $(INTRINSICS_BC)
21+
@$(call E, cp: $@)
22+
$(Q)cp $< $@
23+
1924
# Due to make not wanting to run the same implicit rules twice on the same
2025
# rule tree (implicit-rule recursion prevention, see "Chains of Implicit
2126
# Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here

trunk/mk/stage3.mk

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
stage3/std.o: $(STDLIB_CRATE) $(STDLIB_INPUTS) stage2/rustc$(X) $(MKFILES)
1+
stage3/std.o: $(STDLIB_CRATE) $(STDLIB_INPUTS) stage2/rustc$(X) \
2+
stage2/intrinsics.bc $(MKFILES)
23
@$(call E, compile: $@)
34
$(STAGE2) -c --shared -o $@ $<
45

@@ -11,11 +12,15 @@ stage3/rustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ2)
1112
@$(call E, compile: $@)
1213
$(STAGE2) -c -o $@ $<
1314

14-
stage3/glue.o: stage2/rustc$(X) stage2/$(CFG_STDLIB) \
15+
stage3/glue.o: stage2/rustc$(X) stage2/$(CFG_STDLIB) stage2/intrinsics.bc \
1516
rustllvm/$(CFG_RUSTLLVM) rt/$(CFG_RUNTIME)
1617
@$(call E, generate: $@)
1718
$(STAGE2) -c -o $@ --glue
1819

20+
stage3/intrinsics.bc: $(INTRINSICS_BC)
21+
@$(call E, cp: $@)
22+
$(Q)cp $< $@
23+
1924
# Due to make not wanting to run the same implicit rules twice on the same
2025
# rule tree (implicit-rule recursion prevention, see "Chains of Implicit
2126
# Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here

trunk/src/rt/intrinsics/intrinsics.ll.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'intrinsics.cpp'
22
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32"
3-
target triple = "$(LLVM_TRIPLE)"
3+
target triple = "@CFG_LLVM_TRIPLE@"
44

55
%0 = type { i32, i8**, i32 }
66
%1 = type { %"struct.hash_map<rust_task *, rust_handle<rust_task> *>::map_entry"* }

0 commit comments

Comments
 (0)