Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
743af95d
R
Rust
项目概览
int
/
Rust
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
743af95d
编写于
6月 27, 2017
作者:
M
Mark Simulacrum
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update a few comments.
上级
6766abbf
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
18 deletion
+11
-18
src/bootstrap/bin/rustc.rs
src/bootstrap/bin/rustc.rs
+5
-10
src/bootstrap/lib.rs
src/bootstrap/lib.rs
+6
-8
未找到文件。
src/bootstrap/bin/rustc.rs
浏览文件 @
743af95d
...
...
@@ -75,16 +75,11 @@ fn main() {
Err
(
_
)
=>
0
,
};
// Build scripts always use the snapshot compiler which is guaranteed to be
// able to produce an executable, whereas intermediate compilers may not
// have the standard library built yet and may not be able to produce an
// executable. Otherwise we just use the standard compiler we're
// bootstrapping with.
//
// Also note that cargo will detect the version of the compiler to trigger
// a rebuild when the compiler changes. If this happens, we want to make
// sure to use the actual compiler instead of the snapshot compiler becase
// that's the one that's actually changing.
// Use a different compiler for build scripts, since there may not yet be a
// libstd for the real compiler to use. However, if Cargo is attempting to
// determine the version of the compiler, the real compiler needs to be
// used. Currently, these two states are differentiated based on whether
// --target and -vV is/isn't passed.
let
(
rustc
,
libdir
)
=
if
target
.is_none
()
&&
version
.is_none
()
{
(
"RUSTC_SNAPSHOT"
,
"RUSTC_SNAPSHOT_LIBDIR"
)
}
else
{
...
...
src/bootstrap/lib.rs
浏览文件 @
743af95d
...
...
@@ -175,7 +175,9 @@ pub struct Build {
lldb_python_dir
:
Option
<
String
>
,
// Runtime state filled in later on
// target -> (cc, ar)
cc
:
HashMap
<
String
,
(
gcc
::
Tool
,
Option
<
PathBuf
>
)
>
,
// host -> (cc, ar)
cxx
:
HashMap
<
String
,
gcc
::
Tool
>
,
crates
:
HashMap
<
String
,
Crate
>
,
is_sudo
:
bool
,
...
...
@@ -202,20 +204,16 @@ struct Crate {
/// build system, with each mod generating output in a different directory.
#[derive(Clone,
Copy,
PartialEq,
Eq)]
pub
enum
Mode
{
/// This cargo is going to build the standard library, placing output in the
/// "stageN-std" directory.
/// Build the standard library, placing output in the "stageN-std" directory.
Libstd
,
/// This cargo is going to build libtest, placing output in the
/// "stageN-test" directory.
/// Build libtest, placing output in the "stageN-test" directory.
Libtest
,
/// This cargo is going to build librustc and compiler libraries, placing
/// output in the "stageN-rustc" directory.
/// Build librustc and compiler libraries, placing output in the "stageN-rustc" directory.
Librustc
,
/// This cargo is going to build some tool, placing output in the
/// "stageN-tools" directory.
/// Build some tool, placing output in the "stageN-tools" directory.
Tool
,
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录