Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
60ae018b
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
未验证
提交
60ae018b
编写于
10月 09, 2020
作者:
P
Pietro Albini
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bootstrap: add --include-default-paths to ./x.py
上级
2f387e9d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
21 deletion
+30
-21
src/bootstrap/builder.rs
src/bootstrap/builder.rs
+21
-21
src/bootstrap/config.rs
src/bootstrap/config.rs
+2
-0
src/bootstrap/flags.rs
src/bootstrap/flags.rs
+7
-0
未找到文件。
src/bootstrap/builder.rs
浏览文件 @
60ae018b
...
...
@@ -193,37 +193,37 @@ fn run(v: &[StepDescription], builder: &Builder<'_>, paths: &[PathBuf]) {
);
}
if
paths
.is_empty
()
{
for
(
desc
,
should_run
)
in
v
.iter
()
.zip
(
should_runs
)
{
if
paths
.is_empty
()
||
builder
.config.include_default_paths
{
for
(
desc
,
should_run
)
in
v
.iter
()
.zip
(
&
should_runs
)
{
if
desc
.default
&&
should_run
.is_really_default
{
for
pathset
in
&
should_run
.paths
{
desc
.maybe_run
(
builder
,
pathset
);
}
}
}
}
else
{
for
path
in
paths
{
// strip CurDir prefix if present
let
path
=
match
path
.strip_prefix
(
"."
)
{
Ok
(
p
)
=>
p
,
Err
(
_
)
=>
path
,
};
}
let
mut
attempted_run
=
false
;
for
(
desc
,
should_run
)
in
v
.iter
()
.zip
(
&
should_runs
)
{
if
let
Some
(
suite
)
=
should_run
.is_suite_path
(
path
)
{
attempted_run
=
true
;
desc
.maybe_run
(
builder
,
suite
);
}
else
if
let
Some
(
pathset
)
=
should_run
.pathset_for_path
(
path
)
{
attempted_run
=
true
;
desc
.maybe_run
(
builder
,
pathset
);
}
}
for
path
in
paths
{
// strip CurDir prefix if present
let
path
=
match
path
.strip_prefix
(
"."
)
{
Ok
(
p
)
=>
p
,
Err
(
_
)
=>
path
,
};
if
!
attempted_run
{
panic!
(
"error: no rules matched {}"
,
path
.display
());
let
mut
attempted_run
=
false
;
for
(
desc
,
should_run
)
in
v
.iter
()
.zip
(
&
should_runs
)
{
if
let
Some
(
suite
)
=
should_run
.is_suite_path
(
path
)
{
attempted_run
=
true
;
desc
.maybe_run
(
builder
,
suite
);
}
else
if
let
Some
(
pathset
)
=
should_run
.pathset_for_path
(
path
)
{
attempted_run
=
true
;
desc
.maybe_run
(
builder
,
pathset
);
}
}
if
!
attempted_run
{
panic!
(
"error: no rules matched {}"
,
path
.display
());
}
}
}
}
...
...
src/bootstrap/config.rs
浏览文件 @
60ae018b
...
...
@@ -61,6 +61,7 @@ pub struct Config {
pub
profiler
:
bool
,
pub
ignore_git
:
bool
,
pub
exclude
:
Vec
<
PathBuf
>
,
pub
include_default_paths
:
bool
,
pub
rustc_error_format
:
Option
<
String
>
,
pub
json_output
:
bool
,
pub
test_compare_mode
:
bool
,
...
...
@@ -532,6 +533,7 @@ pub fn parse(args: &[String]) -> Config {
let
mut
config
=
Config
::
default_opts
();
config
.exclude
=
flags
.exclude
;
config
.include_default_paths
=
flags
.include_default_paths
;
config
.rustc_error_format
=
flags
.rustc_error_format
;
config
.json_output
=
flags
.json_output
;
config
.on_fail
=
flags
.on_fail
;
...
...
src/bootstrap/flags.rs
浏览文件 @
60ae018b
...
...
@@ -30,6 +30,7 @@ pub struct Flags {
pub
cmd
:
Subcommand
,
pub
incremental
:
bool
,
pub
exclude
:
Vec
<
PathBuf
>
,
pub
include_default_paths
:
bool
,
pub
rustc_error_format
:
Option
<
String
>
,
pub
json_output
:
bool
,
pub
dry_run
:
bool
,
...
...
@@ -137,6 +138,11 @@ pub fn parse(args: &[String]) -> Flags {
opts
.optmulti
(
""
,
"host"
,
"host targets to build"
,
"HOST"
);
opts
.optmulti
(
""
,
"target"
,
"target targets to build"
,
"TARGET"
);
opts
.optmulti
(
""
,
"exclude"
,
"build paths to exclude"
,
"PATH"
);
opts
.optflag
(
""
,
"include-default-paths"
,
"include default paths in addition to the provided ones"
,
);
opts
.optopt
(
""
,
"on-fail"
,
"command to run on failure"
,
"CMD"
);
opts
.optflag
(
""
,
"dry-run"
,
"dry run; don't build anything"
);
opts
.optopt
(
...
...
@@ -618,6 +624,7 @@ pub fn parse(args: &[String]) -> Flags {
.into_iter
()
.map
(|
p
|
p
.into
())
.collect
::
<
Vec
<
_
>>
(),
include_default_paths
:
matches
.opt_present
(
"include-default-paths"
),
deny_warnings
:
parse_deny_warnings
(
&
matches
),
llvm_skip_rebuild
:
matches
.opt_str
(
"llvm-skip-rebuild"
)
.map
(|
s
|
s
.to_lowercase
())
.map
(
|
s
|
s
.parse
::
<
bool
>
()
.expect
(
"`llvm-skip-rebuild` should be either true or false"
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录