File tree Expand file tree Collapse file tree 12 files changed +450
-121
lines changed Expand file tree Collapse file tree 12 files changed +450
-121
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
- refs/heads/dist-snap: e633249b31d6ecfb46a4d7d85b5be4a9dd96b1c0
9
+ refs/heads/dist-snap: 11bc14d724052e5567d794c425fcef1c3c73302d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
12
12
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
Original file line number Diff line number Diff line change 9
9
[submodule "src/gyp "]
10
10
path = src/gyp
11
11
url = https://github.com/rust-lang/gyp.git
12
+ [submodule "src/compiler-rt "]
13
+ path = src/compiler-rt
14
+ url = https://github.com/rust-lang/compiler-rt.git
Original file line number Diff line number Diff line change @@ -355,7 +355,8 @@ endif
355
355
# Prerequisites for using the stageN compiler to build target artifacts
356
356
TSREQ$(1 ) _T_$(2 ) _H_$(3 ) = \
357
357
$$(HSREQ$(1 ) _H_$(3 ) ) \
358
- $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /libmorestack.a
358
+ $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /libmorestack.a \
359
+ $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /libcompiler-rt.a
359
360
360
361
# Prerequisites for a working stageN compiler and libraries, for a specific
361
362
# target
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ clean-generic-$(2)-$(1):
54
54
$(1 ) /rt \
55
55
$(1 ) /test \
56
56
$(1 ) /stage* \
57
+ -type f \( \
57
58
-name '*.[odasS]' -o \
58
59
-name '*.so' -o \
59
60
-name '*.dylib' -o \
@@ -62,6 +63,7 @@ clean-generic-$(2)-$(1):
62
63
-name '*.dll' -o \
63
64
-name '*.def' -o \
64
65
-name '*.bc' \
66
+ \) \
65
67
| xargs rm -f
66
68
$(Q ) find $(1 ) \
67
69
-name '*.dSYM' \
@@ -96,6 +98,7 @@ clean$(1)_T_$(2)_H_$(3): \
96
98
$$(foreach crate,$$(CRATES ) ,clean$(1 ) _T_$(2 ) _H_$(3 ) -lib-$$(crate ) ) \
97
99
$$(foreach tool,$$(TOOLS ) ,clean$(1 ) _T_$(2 ) _H_$(3 ) -tool-$$(tool ) )
98
100
$$(Q ) rm -f $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /libmorestack.a
101
+ $$(Q ) rm -f $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /libcompiler-rt.a
99
102
$(Q ) rm -f $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /librun_pass_stage* # For unix
100
103
$(Q ) rm -f $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /run_pass_stage* # For windows
101
104
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ HOST_CRATES := syntax rustc rustdoc fourcc
55
55
CRATES := $(TARGET_CRATES ) $(HOST_CRATES )
56
56
TOOLS := compiletest rustdoc rustc
57
57
58
- DEPS_std := native:rustrt
58
+ DEPS_std := native:rustrt native:compiler-rt
59
59
DEPS_extra := std term sync serialize getopts collections
60
60
DEPS_green := std
61
61
DEPS_rustuv := std native:uv native:uv_support
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ install-target-$(1)-host-$(2): \
96
96
$$(call INSTALL_LIB,$$(call CFG_LIB_GLOB_$(1 ) ,$$(crate ) ) ) ;\
97
97
$$(call INSTALL_LIB,$$(call CFG_RLIB_GLOB,$$(crate ) ) ) ;)
98
98
$$(Q )$$(call INSTALL_LIB,libmorestack.a)
99
+ $$(Q )$$(call INSTALL_LIB,libcompiler-rt.a)
99
100
100
101
endef
101
102
@@ -110,6 +111,7 @@ install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
110
111
$$(Q )$$(foreach crate,$$(TARGET_CRATES ) ,\
111
112
$$(call INSTALL_LIB,$$(call CFG_RLIB_GLOB,$$(crate ) ) ) ;)
112
113
$$(Q )$$(call INSTALL_LIB,libmorestack.a)
114
+ $$(Q )$$(call INSTALL_LIB,libcompiler-rt.a)
113
115
endef
114
116
115
117
$(foreach target,$(CFG_TARGET), \
Original file line number Diff line number Diff line change @@ -217,6 +217,37 @@ $$(LIBUV_DIR_$(1))/Release/libuv.a: $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)) \
217
217
218
218
endif
219
219
220
+ # ###############################################################################
221
+ # compiler-rt
222
+ # ###############################################################################
223
+
224
+ ifdef CFG_ENABLE_FAST_MAKE
225
+ COMPRT_DEPS := $(S ) /.gitmodules
226
+ else
227
+ COMPRT_DEPS := $(wildcard \
228
+ $(S ) src/compiler-rt/* \
229
+ $(S ) src/compiler-rt/* /* \
230
+ $(S ) src/compiler-rt/* /* /* \
231
+ $(S ) src/compiler-rt/* /* /* /* )
232
+ endif
233
+
234
+ COMPRT_NAME_$(1 ) := $$(call CFG_STATIC_LIB_NAME_$(1 ) ,compiler-rt)
235
+ COMPRT_LIB_$(1 ) := $$(RT_OUTPUT_DIR_$(1 ) ) /$$(COMPRT_NAME_$(1 ) )
236
+ COMPRT_BUILD_DIR_$(1 ) := $$(RT_OUTPUT_DIR_$(1 ) ) /compiler-rt
237
+
238
+ $$(COMPRT_LIB_$(1 ) ) : $$(COMPRT_DEPS )
239
+ @$$(call E, make: compiler-rt)
240
+ $$(Q )$$(MAKE ) -C "$(S ) src/compiler-rt" \
241
+ ProjSrcRoot="$(S ) src/compiler-rt" \
242
+ ProjObjRoot="$$(abspath $$(COMPRT_BUILD_DIR_$(1 ) ) ) " \
243
+ CC="$$(CC_$(1 ) ) " \
244
+ AR="$$(AR_$(1 ) ) " \
245
+ RANLIB="$$(AR_$(1 ) ) s" \
246
+ CFLAGS="$$(CFG_GCCISH_CFLAGS_$(1 ) ) " \
247
+ TargetTriple=$(1 ) \
248
+ triple-runtime
249
+ $$(Q ) cp $$(COMPRT_BUILD_DIR_$(1 ) ) /triple/runtime/libcompiler_rt.a $$(COMPRT_LIB_$(1 ) )
250
+
220
251
endef
221
252
222
253
# Instantiate template for all stages/targets
Original file line number Diff line number Diff line change @@ -138,6 +138,12 @@ $$(TBIN$(1)_T_$(2)_H_$(3))/:
138
138
$$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /:
139
139
mkdir -p $$@
140
140
141
+ $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /libcompiler-rt.a: \
142
+ $$(RT_OUTPUT_DIR_$(2 ) ) /$$(call CFG_STATIC_LIB_NAME_$(2 ) ,compiler-rt) \
143
+ | $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) / $$(SNAPSHOT_RUSTC_POST_CLEANUP )
144
+ @$$(call E, cp: $$@ )
145
+ $$(Q ) cp $$< $$@
146
+
141
147
$$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /libmorestack.a: \
142
148
$$(RT_OUTPUT_DIR_$(2 ) ) /$$(call CFG_STATIC_LIB_NAME_$(2 ) ,morestack) \
143
149
| $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) / $$(SNAPSHOT_RUSTC_POST_CLEANUP )
Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ tidy:
262
262
| grep ' ^$(S)src/gyp' -v \
263
263
| grep ' ^$(S)src/etc' -v \
264
264
| grep ' ^$(S)src/doc' -v \
265
+ | grep ' ^$(S)src/compiler-rt' -v \
265
266
| xargs $(CFG_PYTHON ) $(S ) src/etc/check-binaries.py
266
267
267
268
endif
Original file line number Diff line number Diff line change
1
+ Subproject commit d4606f1818dd8dfeaa3e509cd1cbac4482c3513e
You can’t perform that action at this time.
0 commit comments