Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
bdbac006
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bdbac006
编写于
7月 21, 2011
作者:
M
Michael Sullivan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Build the stage1 compiler against the newly built librustrt.
上级
c62a9fec
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
21 addition
and
29 deletion
+21
-29
mk/stage0.mk
mk/stage0.mk
+5
-12
mk/stageN.mk
mk/stageN.mk
+10
-8
src/etc/get-snapshot.py
src/etc/get-snapshot.py
+1
-1
src/etc/snapshot.py
src/etc/snapshot.py
+0
-8
src/snapshots.txt
src/snapshots.txt
+5
-0
未找到文件。
mk/stage0.mk
浏览文件 @
bdbac006
# FIXME: temporary hack: stdlib
comes in the lib/ directory, but we want it in
#
the base directory, so we move it
out.
# FIXME: temporary hack: stdlib
and rustrt come in the lib/ directory,
#
but we want them in the base directory, so we move them
out.
stage0/rustc$(X)
:
$(S)src/snapshots.txt $(S)src/etc/get-snapshot.py $(MKFILES)
@
$(
call
E, fetch:
$@
)
$(Q)$(S)
src/etc/get-snapshot.py
...
...
@@ -8,11 +8,8 @@ stage0/rustc$(X): $(S)src/snapshots.txt $(S)src/etc/get-snapshot.py $(MKFILES)
# Host libs will be made in the process of making rustc above.
# FIXME: temporary hack: the runtime is currently carried in
# lib/ directory only, so we copy it out.
stage0/$(CFG_RUNTIME)
:
stage0/lib/$(CFG_RUNTIME)
$(Q)
cp
$<
$@
stage0/$(CFG_RUNTIME)
:
stage0/rustc$(X)
$(Q)
touch
$@
stage0/$(CFG_STDLIB)
:
stage0/rustc$(X)
$(Q)
touch
$@
...
...
@@ -31,12 +28,8 @@ stage0/lib/glue.o: stage0/rustc$(X)
stage0/lib/main.o
:
rt/main.o
$(Q)
cp
$<
$@
stage0/lib/$(CFG_RUNTIME)
:
stage0/rustc$(X)
$(Q)
touch
$@
# Instantiate template (in stageN.mk) for building
# stage0/lib/$(CFG_STDLIB) and stage0/lib/libstd.rlib.
SREQpre
=
stage0/lib/main.o
$(MKFILES)
$(eval
$(call
STD
LIBGEN,pre,0))
$(eval
$(call
LIBGEN,pre,0))
mk/stageN.mk
浏览文件 @
bdbac006
...
...
@@ -3,10 +3,11 @@
# The easiest way to read this template is to assume we're building stage2
# using stage1, and mentally gloss $(1) as 1, $(2) as 2.
#
# STDLIBGEN is pulled out seperately because we need to specially invoke
# it to build stage0/lib/libstd using stage0/rustc.
# LIBGEN is pulled out seperately because we need to specially invoke
# it to build stage0/lib/libstd using stage0/rustc and to use the
# new rustrt in stage0/lib/.
define
STD
LIBGEN
define
LIBGEN
stage$(2)/lib/$$(CFG_STDLIB)
:
$$(STDLIB_CRATE) $$(STDLIB_INPUTS)
\
stage$(2)/rustc$$(X)
\
stage$(2)/$$(CFG_RUNTIME)
\
...
...
@@ -24,6 +25,11 @@ stage$(2)/lib/libstd.rlib: $$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
$$(SREQ$(1))
@
$
$(
call
E, compile_and_link:
$$
@
)
$$
(
STAGE
$(2)
)
--lib
--static
-o
$$
@
$$
<
stage$(2)/lib/$$(CFG_RUNTIME)
:
rt/$$(CFG_RUNTIME)
@
$
$(
call
E,
cp
:
$$
@
)
$
$(Q)
cp
$$
<
$$
@
endef
define
STAGEN
...
...
@@ -79,16 +85,12 @@ stage$(2)/lib/glue.o: stage$(2)/rustc$$(X) \
@
$
$(
call
E, generate:
$$
@
)
$$
(
STAGE
$(2)
)
-c
-o
$$
@
--glue
$(eval
$(call
STD
LIBGEN,$(1),$(2)))
$(eval
$(call
LIBGEN,$(1),$(2)))
stage$(2)/lib/main.o
:
rt/main.o
@
$
$(
call
E,
cp
:
$$
@
)
$
$(Q)
cp
$$
<
$$
@
stage$(2)/lib/$$(CFG_RUNTIME)
:
rt/$$(CFG_RUNTIME)
@
$
$(
call
E,
cp
:
$$
@
)
$
$(Q)
cp
$$
<
$$
@
stage$(2)/lib/$$(CFG_LIBRUSTC)
:
$$(COMPILER_CRATE) $$(COMPILER_INPUTS)
\
$$(SREQ$(2))
@
$
$(
call
E, compile_and_link:
$$
@
)
...
...
src/etc/get-snapshot.py
浏览文件 @
bdbac006
...
...
@@ -9,7 +9,7 @@ def unpack_snapshot(snap):
print
(
"opening snapshot "
+
dl_path
)
tar
=
tarfile
.
open
(
dl_path
)
kernel
=
get_kernel
()
for
name
in
old_
snapshot_files
[
kernel
]:
for
name
in
snapshot_files
[
kernel
]:
p
=
"rust-stage0/"
+
name
fp
=
os
.
path
.
join
(
"stage0"
,
name
)
print
(
"extracting "
+
fp
)
...
...
src/etc/snapshot.py
浏览文件 @
bdbac006
...
...
@@ -23,14 +23,6 @@ snapshot_files = {
"winnt"
:
[
"rustc.exe"
,
"lib/glue.o"
,
"lib/std.dll"
,
"rustrt.dll"
,
"rustllvm.dll"
,
"lib/intrinsics.bc"
]
}
old_snapshot_files
=
{
"linux"
:
[
"rustc"
,
"lib/glue.o"
,
"lib/libstd.so"
,
"lib/librustrt.so"
,
"librustllvm.so"
,
"lib/intrinsics.bc"
],
"macos"
:
[
"rustc"
,
"lib/glue.o"
,
"lib/libstd.dylib"
,
"lib/librustrt.dylib"
,
"librustllvm.dylib"
,
"lib/intrinsics.bc"
],
"winnt"
:
[
"rustc.exe"
,
"lib/glue.o"
,
"lib/std.dll"
,
"lib/rustrt.dll"
,
"rustllvm.dll"
,
"lib/intrinsics.bc"
]
}
def
parse_line
(
n
,
line
):
global
snapshotfile
...
...
src/snapshots.txt
浏览文件 @
bdbac006
S 2011-07-21 c62a9fe
linux-i386 3c8f658093adea1cb0e5b84150d3d342571013b4
macos-i386 1833b475fd1adec3df02ab3dd2fb7c6f280a33a5
winnt-i386 f6b6b42d00f25d82603b9466229d3229bfce3317
S 2011-07-20 8a7f2e0
linux-i386 c4881df0302a4a1e126a7ea847e1d7b4de49b943
macos-i386 d5d486af50fade251fd04a24062385d67cfff30a
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录