Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
6766abbf
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,发现更多精彩内容 >>
提交
6766abbf
编写于
6月 27, 2017
作者:
M
Mark Simulacrum
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clippy lints
上级
802b6db0
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
37 addition
and
43 deletion
+37
-43
src/bootstrap/channel.rs
src/bootstrap/channel.rs
+1
-1
src/bootstrap/compile.rs
src/bootstrap/compile.rs
+9
-8
src/bootstrap/config.rs
src/bootstrap/config.rs
+1
-1
src/bootstrap/dist.rs
src/bootstrap/dist.rs
+5
-6
src/bootstrap/flags.rs
src/bootstrap/flags.rs
+2
-4
src/bootstrap/install.rs
src/bootstrap/install.rs
+1
-1
src/bootstrap/lib.rs
src/bootstrap/lib.rs
+7
-7
src/bootstrap/sanity.rs
src/bootstrap/sanity.rs
+7
-11
src/bootstrap/step.rs
src/bootstrap/step.rs
+4
-4
未找到文件。
src/bootstrap/channel.rs
浏览文件 @
6766abbf
...
@@ -99,6 +99,6 @@ pub fn version(&self, build: &Build, num: &str) -> String {
...
@@ -99,6 +99,6 @@ pub fn version(&self, build: &Build, num: &str) -> String {
version
.push_str
(
&
inner
.commit_date
);
version
.push_str
(
&
inner
.commit_date
);
version
.push_str
(
")"
);
version
.push_str
(
")"
);
}
}
return
version
version
}
}
}
}
src/bootstrap/compile.rs
浏览文件 @
6766abbf
...
@@ -559,23 +559,24 @@ fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) {
...
@@ -559,23 +559,24 @@ fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) {
// If this was an output file in the "host dir" we don't actually
// If this was an output file in the "host dir" we don't actually
// worry about it, it's not relevant for us.
// worry about it, it's not relevant for us.
if
filename
.starts_with
(
&
host_root_dir
)
{
if
filename
.starts_with
(
&
host_root_dir
)
{
continue
continue
;
}
// If this was output in the `deps` dir then this is a precise file
// If this was output in the `deps` dir then this is a precise file
// name (hash included) so we start tracking it.
// name (hash included) so we start tracking it.
}
else
if
filename
.starts_with
(
&
target_deps_dir
)
{
if
filename
.starts_with
(
&
target_deps_dir
)
{
deps
.push
(
filename
.to_path_buf
());
deps
.push
(
filename
.to_path_buf
());
continue
;
}
// Otherwise this was a "top level artifact" which right now doesn't
// Otherwise this was a "top level artifact" which right now doesn't
// have a hash in the name, but there's a version of this file in
// have a hash in the name, but there's a version of this file in
// the `deps` folder which *does* have a hash in the name. That's
// the `deps` folder which *does* have a hash in the name. That's
// the one we'll want to we'll probe for it later.
// the one we'll want to we'll probe for it later.
}
else
{
toplevel
.push
((
filename
.file_stem
()
.unwrap
()
toplevel
.push
((
filename
.file_stem
()
.unwrap
()
.to_str
()
.unwrap
()
.to_string
(),
.to_str
()
.unwrap
()
.to_string
(),
filename
.extension
()
.unwrap
()
.to_owned
()
filename
.extension
()
.unwrap
()
.to_owned
()
.to_str
()
.unwrap
()
.to_string
()));
.to_str
()
.unwrap
()
.to_string
()));
}
}
}
}
}
...
...
src/bootstrap/config.rs
浏览文件 @
6766abbf
...
@@ -417,7 +417,7 @@ pub fn parse(build: &str, file: Option<PathBuf>) -> Config {
...
@@ -417,7 +417,7 @@ pub fn parse(build: &str, file: Option<PathBuf>) -> Config {
config
.update_with_config_mk
();
config
.update_with_config_mk
();
}
}
return
config
config
}
}
/// "Temporary" routine to parse `config.mk` into this configuration.
/// "Temporary" routine to parse `config.mk` into this configuration.
...
...
src/bootstrap/dist.rs
浏览文件 @
6766abbf
...
@@ -488,12 +488,11 @@ fn filter_fn(exclude_dirs: &[&str], dir: &str, path: &Path) -> bool {
...
@@ -488,12 +488,11 @@ fn filter_fn(exclude_dirs: &[&str], dir: &str, path: &Path) -> bool {
if
spath
.ends_with
(
"~"
)
||
spath
.ends_with
(
".pyc"
)
{
if
spath
.ends_with
(
"~"
)
||
spath
.ends_with
(
".pyc"
)
{
return
false
return
false
}
}
if
spath
.contains
(
"llvm/test"
)
||
spath
.contains
(
"llvm
\\
test"
)
{
if
(
spath
.contains
(
"llvm/test"
)
||
spath
.contains
(
"llvm
\\
test"
))
&&
if
spath
.ends_with
(
".ll"
)
||
(
spath
.ends_with
(
".ll"
)
||
spath
.ends_with
(
".td"
)
||
spath
.ends_with
(
".td"
)
||
spath
.ends_with
(
".s"
)
{
spath
.ends_with
(
".s"
))
{
return
false
return
false
}
}
}
let
full_path
=
Path
::
new
(
dir
)
.join
(
path
);
let
full_path
=
Path
::
new
(
dir
)
.join
(
path
);
...
...
src/bootstrap/flags.rs
浏览文件 @
6766abbf
...
@@ -315,10 +315,8 @@ pub fn parse(args: &[String]) -> Flags {
...
@@ -315,10 +315,8 @@ pub fn parse(args: &[String]) -> Flags {
let
mut
stage
=
matches
.opt_str
(
"stage"
)
.map
(|
j
|
j
.parse
()
.unwrap
());
let
mut
stage
=
matches
.opt_str
(
"stage"
)
.map
(|
j
|
j
.parse
()
.unwrap
());
if
matches
.opt_present
(
"incremental"
)
{
if
matches
.opt_present
(
"incremental"
)
&&
stage
.is_none
()
{
if
stage
.is_none
()
{
stage
=
Some
(
1
);
stage
=
Some
(
1
);
}
}
}
Flags
{
Flags
{
...
...
src/bootstrap/install.rs
浏览文件 @
6766abbf
...
@@ -146,5 +146,5 @@ fn add_destdir(path: &Path, destdir: &Option<PathBuf>) -> PathBuf {
...
@@ -146,5 +146,5 @@ fn add_destdir(path: &Path, destdir: &Option<PathBuf>) -> PathBuf {
_
=>
{}
_
=>
{}
}
}
}
}
ret
urn
ret
ret
}
}
src/bootstrap/lib.rs
浏览文件 @
6766abbf
...
@@ -496,7 +496,7 @@ fn cargo(&self,
...
@@ -496,7 +496,7 @@ fn cargo(&self,
self
.ci_env
.force_coloring_in_ci
(
&
mut
cargo
);
self
.ci_env
.force_coloring_in_ci
(
&
mut
cargo
);
return
cargo
cargo
}
}
/// Get a path to the compiler specified.
/// Get a path to the compiler specified.
...
@@ -519,7 +519,7 @@ fn rustdoc(&self, compiler: &Compiler) -> PathBuf {
...
@@ -519,7 +519,7 @@ fn rustdoc(&self, compiler: &Compiler) -> PathBuf {
let
mut
rustdoc
=
self
.compiler_path
(
compiler
);
let
mut
rustdoc
=
self
.compiler_path
(
compiler
);
rustdoc
.pop
();
rustdoc
.pop
();
rustdoc
.push
(
exe
(
"rustdoc"
,
compiler
.host
));
rustdoc
.push
(
exe
(
"rustdoc"
,
compiler
.host
));
r
eturn
r
ustdoc
rustdoc
}
}
/// Get a `Command` which is ready to run `tool` in `stage` built for
/// Get a `Command` which is ready to run `tool` in `stage` built for
...
@@ -527,7 +527,7 @@ fn rustdoc(&self, compiler: &Compiler) -> PathBuf {
...
@@ -527,7 +527,7 @@ fn rustdoc(&self, compiler: &Compiler) -> PathBuf {
fn
tool_cmd
(
&
self
,
compiler
:
&
Compiler
,
tool
:
&
str
)
->
Command
{
fn
tool_cmd
(
&
self
,
compiler
:
&
Compiler
,
tool
:
&
str
)
->
Command
{
let
mut
cmd
=
Command
::
new
(
self
.tool
(
&
compiler
,
tool
));
let
mut
cmd
=
Command
::
new
(
self
.tool
(
&
compiler
,
tool
));
self
.prepare_tool_cmd
(
compiler
,
&
mut
cmd
);
self
.prepare_tool_cmd
(
compiler
,
&
mut
cmd
);
return
cmd
cmd
}
}
/// Prepares the `cmd` provided to be able to run the `compiler` provided.
/// Prepares the `cmd` provided to be able to run the `compiler` provided.
...
@@ -578,7 +578,7 @@ fn std_features(&self) -> String {
...
@@ -578,7 +578,7 @@ fn std_features(&self) -> String {
if
self
.config.profiler
{
if
self
.config.profiler
{
features
.push_str
(
" profiler"
);
features
.push_str
(
" profiler"
);
}
}
return
features
features
}
}
/// Get the space-separated set of activated features for the compiler.
/// Get the space-separated set of activated features for the compiler.
...
@@ -587,7 +587,7 @@ fn rustc_features(&self) -> String {
...
@@ -587,7 +587,7 @@ fn rustc_features(&self) -> String {
if
self
.config.use_jemalloc
{
if
self
.config.use_jemalloc
{
features
.push_str
(
" jemalloc"
);
features
.push_str
(
" jemalloc"
);
}
}
return
features
features
}
}
/// Component directory that Cargo will produce output into (e.g.
/// Component directory that Cargo will produce output into (e.g.
...
@@ -834,7 +834,7 @@ fn cflags(&self, target: &str) -> Vec<String> {
...
@@ -834,7 +834,7 @@ fn cflags(&self, target: &str) -> Vec<String> {
if
target
==
"i686-pc-windows-gnu"
{
if
target
==
"i686-pc-windows-gnu"
{
base
.push
(
"-fno-omit-frame-pointer"
.into
());
base
.push
(
"-fno-omit-frame-pointer"
.into
());
}
}
return
base
base
}
}
/// Returns the path to the `ar` archive utility for the target specified.
/// Returns the path to the `ar` archive utility for the target specified.
...
@@ -866,7 +866,7 @@ fn rustc_flags(&self, target: &str) -> Vec<String> {
...
@@ -866,7 +866,7 @@ fn rustc_flags(&self, target: &str) -> Vec<String> {
!
target
.contains
(
"emscripten"
)
{
!
target
.contains
(
"emscripten"
)
{
base
.push
(
format!
(
"-Clinker={}"
,
self
.cc
(
target
)
.display
()));
base
.push
(
format!
(
"-Clinker={}"
,
self
.cc
(
target
)
.display
()));
}
}
return
base
base
}
}
/// Returns the "musl root" for this `target`, if defined
/// Returns the "musl root" for this `target`, if defined
...
...
src/bootstrap/sanity.rs
浏览文件 @
6766abbf
...
@@ -56,7 +56,7 @@ fn maybe_have<S: AsRef<OsStr>>(&mut self, cmd: S) -> Option<PathBuf> {
...
@@ -56,7 +56,7 @@ fn maybe_have<S: AsRef<OsStr>>(&mut self, cmd: S) -> Option<PathBuf> {
return
Some
(
target
);
return
Some
(
target
);
}
}
}
}
return
None
;
None
})
.clone
()
})
.clone
()
}
}
...
@@ -73,10 +73,8 @@ pub fn check(build: &mut Build) {
...
@@ -73,10 +73,8 @@ pub fn check(build: &mut Build) {
// one is present as part of the PATH then that can lead to the system
// one is present as part of the PATH then that can lead to the system
// being unable to identify the files properly. See
// being unable to identify the files properly. See
// https://github.com/rust-lang/rust/issues/34959 for more details.
// https://github.com/rust-lang/rust/issues/34959 for more details.
if
cfg!
(
windows
)
{
if
cfg!
(
windows
)
&&
path
.to_string_lossy
()
.contains
(
"
\"
"
)
{
if
path
.to_string_lossy
()
.contains
(
"
\"
"
)
{
panic!
(
"PATH contains invalid character '
\"
'"
);
panic!
(
"PATH contains invalid character '
\"
'"
);
}
}
}
let
mut
cmd_finder
=
Finder
::
new
();
let
mut
cmd_finder
=
Finder
::
new
();
...
@@ -95,12 +93,10 @@ pub fn check(build: &mut Build) {
...
@@ -95,12 +93,10 @@ pub fn check(build: &mut Build) {
}
}
// Ninja is currently only used for LLVM itself.
// Ninja is currently only used for LLVM itself.
if
building_llvm
&&
build
.config.ninja
{
// Some Linux distros rename `ninja` to `ninja-build`.
// Some Linux distros rename `ninja` to `ninja-build`.
// CMake can work with either binary name.
// CMake can work with either binary name.
if
building_llvm
&&
build
.config.ninja
&&
cmd_finder
.maybe_have
(
"ninja-build"
)
.is_none
()
{
if
cmd_finder
.maybe_have
(
"ninja-build"
)
.is_none
()
{
cmd_finder
.must_have
(
"ninja"
);
cmd_finder
.must_have
(
"ninja"
);
}
}
}
build
.config.python
=
build
.config.python
.take
()
.map
(|
p
|
cmd_finder
.must_have
(
p
))
build
.config.python
=
build
.config.python
.take
()
.map
(|
p
|
cmd_finder
.must_have
(
p
))
...
...
src/bootstrap/step.rs
浏览文件 @
6766abbf
...
@@ -148,7 +148,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
...
@@ -148,7 +148,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
}
}
}
}
}
}
ret
urn
ret
ret
};
};
// ========================================================================
// ========================================================================
...
@@ -237,7 +237,7 @@ fn crate_rule<'a, 'b>(build: &'a Build,
...
@@ -237,7 +237,7 @@ fn crate_rule<'a, 'b>(build: &'a Build,
s
.target
)
s
.target
)
}
}
});
});
r
eturn
r
ule
rule
}
}
// Similar to the `libstd`, `libtest`, and `librustc` rules above, except
// Similar to the `libstd`, `libtest`, and `librustc` rules above, except
...
@@ -1326,7 +1326,7 @@ fn expand(&self, steps: &[Step<'a>]) -> Vec<Step<'a>> {
...
@@ -1326,7 +1326,7 @@ fn expand(&self, steps: &[Step<'a>]) -> Vec<Step<'a>> {
for
idx
in
0
..
nodes
.len
()
{
for
idx
in
0
..
nodes
.len
()
{
self
.topo_sort
(
idx
,
&
idx_to_node
,
&
edges
,
&
mut
visited
,
&
mut
order
);
self
.topo_sort
(
idx
,
&
idx_to_node
,
&
edges
,
&
mut
visited
,
&
mut
order
);
}
}
return
order
order
}
}
/// Builds the dependency graph rooted at `step`.
/// Builds the dependency graph rooted at `step`.
...
@@ -1365,7 +1365,7 @@ fn build_graph(&self,
...
@@ -1365,7 +1365,7 @@ fn build_graph(&self,
}
}
edges
.entry
(
idx
)
.or_insert
(
HashSet
::
new
())
.extend
(
deps
);
edges
.entry
(
idx
)
.or_insert
(
HashSet
::
new
())
.extend
(
deps
);
return
idx
idx
}
}
/// Given a dependency graph with a finished list of `nodes`, fill out more
/// Given a dependency graph with a finished list of `nodes`, fill out more
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录