Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
796264b6
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,发现更多精彩内容 >>
提交
796264b6
编写于
12月 15, 2017
作者:
M
Michael Woerister
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
incr.comp.: Add -Cincremental in addition to -Zincremental
上级
5a0dc2d0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
5 deletion
+25
-5
src/librustc/session/config.rs
src/librustc/session/config.rs
+23
-3
src/librustc_trans/base.rs
src/librustc_trans/base.rs
+1
-1
src/tools/compiletest/src/runtest.rs
src/tools/compiletest/src/runtest.rs
+1
-1
未找到文件。
src/librustc/session/config.rs
浏览文件 @
796264b6
...
...
@@ -1013,6 +1013,8 @@ fn parse_optimization_fuel(slot: &mut Option<(String, u64)>, v: Option<&str>) ->
"set the threshold for inlining a function (default: 225)"
),
panic
:
Option
<
PanicStrategy
>
=
(
None
,
parse_panic_strategy
,
[
TRACKED
],
"panic strategy to compile crate with"
),
incremental
:
Option
<
String
>
=
(
None
,
parse_opt_string
,
[
UNTRACKED
],
"enable incremental compilation"
),
}
options!
{
DebuggingOptions
,
DebuggingSetter
,
basic_debugging_options
,
...
...
@@ -1663,7 +1665,24 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
early_error
(
error_format
,
"Value for codegen units must be a positive nonzero integer"
);
}
if
cg
.lto
&&
debugging_opts
.incremental
.is_some
()
{
let
incremental
=
match
(
&
debugging_opts
.incremental
,
&
cg
.incremental
)
{
(
&
Some
(
ref
path1
),
&
Some
(
ref
path2
))
=>
{
if
path1
!=
path2
{
early_error
(
error_format
,
&
format!
(
"conflicting paths for `-Z incremental` and
\
`-C incremental` specified: {} versus {}"
,
path1
,
path2
));
}
else
{
Some
(
path1
)
}
}
(
&
Some
(
ref
path
),
&
None
)
=>
Some
(
path
),
(
&
None
,
&
Some
(
ref
path
))
=>
Some
(
path
),
(
&
None
,
&
None
)
=>
None
,
}
.map
(|
m
|
PathBuf
::
from
(
m
));
if
cg
.lto
&&
incremental
.is_some
()
{
early_error
(
error_format
,
"can't perform LTO when compiling incrementally"
);
}
...
...
@@ -1837,8 +1856,6 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
let
crate_name
=
matches
.opt_str
(
"crate-name"
);
let
incremental
=
debugging_opts
.incremental
.as_ref
()
.map
(|
m
|
PathBuf
::
from
(
m
));
(
Options
{
crate_types
,
optimize
:
opt_level
,
...
...
@@ -2581,6 +2598,9 @@ fn test_codegen_options_tracking_hash() {
opts
.cg.save_temps
=
true
;
assert_eq!
(
reference
.dep_tracking_hash
(),
opts
.dep_tracking_hash
());
opts
.cg.incremental
=
Some
(
String
::
from
(
"abc"
));
assert_eq!
(
reference
.dep_tracking_hash
(),
opts
.dep_tracking_hash
());
// Make sure changing a [TRACKED] option changes the hash
opts
=
reference
.clone
();
...
...
src/librustc_trans/base.rs
浏览文件 @
796264b6
...
...
@@ -1025,7 +1025,7 @@ fn collect_and_partition_translation_items<'a, 'tcx>(
assert_symbols_are_distinct
(
tcx
,
items
.iter
());
let
strategy
=
if
tcx
.sess.opts.
debugging_opts.
incremental
.is_some
()
{
let
strategy
=
if
tcx
.sess.opts.incremental
.is_some
()
{
PartitioningStrategy
::
PerModule
}
else
{
PartitioningStrategy
::
FixedUnitCount
(
tcx
.sess
.codegen_units
())
...
...
src/tools/compiletest/src/runtest.rs
浏览文件 @
796264b6
...
...
@@ -1506,7 +1506,7 @@ fn make_compile_args(&self, input_file: &Path, output_file: TargetLocation) -> C
if
let
Some
(
ref
incremental_dir
)
=
self
.props.incremental_dir
{
rustc
.args
(
&
[
"-
Z
"
,
"-
C
"
,
&
format!
(
"incremental={}"
,
incremental_dir
.display
()),
]);
rustc
.args
(
&
[
"-Z"
,
"incremental-verify-ich"
]);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录