Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
83b68125
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,发现更多精彩内容 >>
提交
83b68125
编写于
8月 03, 2017
作者:
M
Mark Simulacrum
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make the message for building rustdoc slightly nicer
上级
40dea65e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
48 addition
and
32 deletion
+48
-32
src/bootstrap/tool.rs
src/bootstrap/tool.rs
+48
-32
未找到文件。
src/bootstrap/tool.rs
浏览文件 @
83b68125
...
...
@@ -93,36 +93,46 @@ fn run(self, builder: &Builder) -> PathBuf {
let
_
folder
=
build
.fold_output
(||
format!
(
"stage{}-{}"
,
compiler
.stage
,
tool
));
println!
(
"Building stage{} tool {} ({})"
,
compiler
.stage
,
tool
,
target
);
let
mut
cargo
=
builder
.cargo
(
compiler
,
Mode
::
Tool
,
target
,
"build"
);
let
dir
=
build
.src
.join
(
"src/tools"
)
.join
(
tool
);
cargo
.arg
(
"--manifest-path"
)
.arg
(
dir
.join
(
"Cargo.toml"
));
// We don't want to build tools dynamically as they'll be running across
// stages and such and it's just easier if they're not dynamically linked.
cargo
.env
(
"RUSTC_NO_PREFER_DYNAMIC"
,
"1"
);
if
let
Some
(
dir
)
=
build
.openssl_install_dir
(
target
)
{
cargo
.env
(
"OPENSSL_STATIC"
,
"1"
);
cargo
.env
(
"OPENSSL_DIR"
,
dir
);
cargo
.env
(
"LIBZ_SYS_STATIC"
,
"1"
);
}
let
mut
cargo
=
prepare_tool_cargo
(
builder
,
compiler
,
target
,
tool
);
build
.run
(
&
mut
cargo
);
build
.cargo_out
(
compiler
,
Mode
::
Tool
,
target
)
.join
(
exe
(
tool
,
&
compiler
.host
))
}
}
cargo
.env
(
"CFG_RELEASE_CHANNEL"
,
&
build
.config.channel
);
fn
prepare_tool_cargo
(
builder
:
&
Builder
,
compiler
:
Compiler
,
target
:
Interned
<
String
>
,
tool
:
&
'static
str
,
)
->
Command
{
let
build
=
builder
.build
;
let
mut
cargo
=
builder
.cargo
(
compiler
,
Mode
::
Tool
,
target
,
"build"
);
let
dir
=
build
.src
.join
(
"src/tools"
)
.join
(
tool
);
cargo
.arg
(
"--manifest-path"
)
.arg
(
dir
.join
(
"Cargo.toml"
));
// We don't want to build tools dynamically as they'll be running across
// stages and such and it's just easier if they're not dynamically linked.
cargo
.env
(
"RUSTC_NO_PREFER_DYNAMIC"
,
"1"
);
if
let
Some
(
dir
)
=
build
.openssl_install_dir
(
target
)
{
cargo
.env
(
"OPENSSL_STATIC"
,
"1"
);
cargo
.env
(
"OPENSSL_DIR"
,
dir
);
cargo
.env
(
"LIBZ_SYS_STATIC"
,
"1"
);
}
let
info
=
GitInfo
::
new
(
&
build
.config
,
&
dir
);
if
let
Some
(
sha
)
=
info
.sha
()
{
cargo
.env
(
"CFG_COMMIT_HASH"
,
sha
);
}
if
let
Some
(
sha_short
)
=
info
.sha_short
()
{
cargo
.env
(
"CFG_SHORT_COMMIT_HASH"
,
sha_short
);
}
if
let
Some
(
date
)
=
info
.commit_date
()
{
cargo
.env
(
"CFG_COMMIT_DATE"
,
date
);
}
cargo
.env
(
"CFG_RELEASE_CHANNEL"
,
&
build
.config.channel
);
build
.run
(
&
mut
cargo
);
build
.cargo_out
(
compiler
,
Mode
::
Tool
,
target
)
.join
(
exe
(
tool
,
&
compiler
.host
))
let
info
=
GitInfo
::
new
(
&
build
.config
,
&
dir
);
if
let
Some
(
sha
)
=
info
.sha
()
{
cargo
.env
(
"CFG_COMMIT_HASH"
,
sha
);
}
if
let
Some
(
sha_short
)
=
info
.sha_short
()
{
cargo
.env
(
"CFG_SHORT_COMMIT_HASH"
,
sha_short
);
}
if
let
Some
(
date
)
=
info
.commit_date
()
{
cargo
.env
(
"CFG_COMMIT_DATE"
,
date
);
}
cargo
}
macro_rules!
tool
{
...
...
@@ -245,7 +255,9 @@ fn make_run(run: RunConfig) {
}
fn
run
(
self
,
builder
:
&
Builder
)
->
PathBuf
{
let
build
=
builder
.build
;
let
target_compiler
=
self
.target_compiler
;
let
target
=
target_compiler
.host
;
let
build_compiler
=
if
target_compiler
.stage
==
0
{
builder
.compiler
(
0
,
builder
.build.build
)
}
else
{
...
...
@@ -255,12 +267,16 @@ fn run(self, builder: &Builder) -> PathBuf {
builder
.compiler
(
target_compiler
.stage
-
1
,
builder
.build.build
)
};
let
tool_rustdoc
=
builder
.ensure
(
ToolBuild
{
compiler
:
build_compiler
,
target
:
target_compiler
.host
,
tool
:
"rustdoc"
,
mode
:
Mode
::
Librustc
,
});
builder
.ensure
(
CleanTools
{
compiler
:
build_compiler
,
target
,
mode
:
Mode
::
Librustc
});
builder
.ensure
(
compile
::
Rustc
{
compiler
:
build_compiler
,
target
});
let
_
folder
=
build
.fold_output
(||
format!
(
"stage{}-rustdoc"
,
target_compiler
.stage
));
println!
(
"Building rustdoc for stage{} ({})"
,
target_compiler
.stage
,
target_compiler
.host
);
let
mut
cargo
=
prepare_tool_cargo
(
builder
,
build_compiler
,
target
,
"rustdoc"
);
build
.run
(
&
mut
cargo
);
let
tool_rustdoc
=
build
.cargo_out
(
build_compiler
,
Mode
::
Tool
,
target
)
.join
(
exe
(
"rustdoc"
,
&
target_compiler
.host
));
// don't create a stage0-sysroot/bin directory.
if
target_compiler
.stage
>
0
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录