Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
e6e5589d
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,发现更多精彩内容 >>
提交
e6e5589d
编写于
12月 19, 2017
作者:
M
Michael Woerister
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
incr.comp.: Use an IndexVec instead of a hashmap for storing result hashes.
上级
b39c4bc1
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
124 addition
and
66 deletion
+124
-66
src/librustc/dep_graph/graph.rs
src/librustc/dep_graph/graph.rs
+73
-37
src/librustc/dep_graph/prev.rs
src/librustc/dep_graph/prev.rs
+4
-0
src/librustc/hir/map/collector.rs
src/librustc/hir/map/collector.rs
+20
-14
src/librustc/hir/map/mod.rs
src/librustc/hir/map/mod.rs
+6
-1
src/librustc/ty/maps/plumbing.rs
src/librustc/ty/maps/plumbing.rs
+2
-2
src/librustc/ty/mod.rs
src/librustc/ty/mod.rs
+9
-0
src/librustc_incremental/persist/dirty_clean.rs
src/librustc_incremental/persist/dirty_clean.rs
+4
-2
src/librustc_trans/base.rs
src/librustc_trans/base.rs
+2
-3
src/librustc_trans_utils/link.rs
src/librustc_trans_utils/link.rs
+2
-3
src/librustc_trans_utils/trans_crate.rs
src/librustc_trans_utils/trans_crate.rs
+2
-4
未找到文件。
src/librustc/dep_graph/graph.rs
浏览文件 @
e6e5589d
...
...
@@ -34,14 +34,11 @@
pub
struct
DepGraph
{
data
:
Option
<
Rc
<
DepGraphData
>>
,
// At the moment we are using DepNode as key here. In the future it might
// be possible to use an IndexVec<DepNodeIndex, _> here. At the moment there
// are a few problems with that:
// - Some fingerprints are needed even if incr. comp. is disabled -- yet
// we need to have a dep-graph to generate DepNodeIndices.
// - The architecture is still in flux and it's not clear what how to best
// implement things.
fingerprints
:
Rc
<
RefCell
<
FxHashMap
<
DepNode
,
Fingerprint
>>>
// A vector mapping depnodes from the current graph to their associated
// result value fingerprints. Do not rely on the length of this vector
// being the same as the number of nodes in the graph. The vector can
// contain an arbitrary number of zero-entries at the end.
fingerprints
:
Rc
<
RefCell
<
IndexVec
<
DepNodeIndex
,
Fingerprint
>>>
}
...
...
@@ -97,6 +94,11 @@ struct DepGraphData {
impl
DepGraph
{
pub
fn
new
(
prev_graph
:
PreviousDepGraph
)
->
DepGraph
{
// Pre-allocate the fingerprints array. We over-allocate a little so
// that we hopefully don't have to re-allocate during this compilation
// session.
let
fingerprints
=
IndexVec
::
from_elem_n
(
Fingerprint
::
zero
(),
(
prev_graph
.node_count
()
*
115
)
/
100
);
DepGraph
{
data
:
Some
(
Rc
::
new
(
DepGraphData
{
previous_work_products
:
RefCell
::
new
(
FxHashMap
()),
...
...
@@ -107,14 +109,14 @@ pub fn new(prev_graph: PreviousDepGraph) -> DepGraph {
colors
:
RefCell
::
new
(
FxHashMap
()),
loaded_from_cache
:
RefCell
::
new
(
FxHashMap
()),
})),
fingerprints
:
Rc
::
new
(
RefCell
::
new
(
FxHashMap
()
)),
fingerprints
:
Rc
::
new
(
RefCell
::
new
(
fingerprints
)),
}
}
pub
fn
new_disabled
()
->
DepGraph
{
DepGraph
{
data
:
None
,
fingerprints
:
Rc
::
new
(
RefCell
::
new
(
FxHashMap
())),
fingerprints
:
Rc
::
new
(
RefCell
::
new
(
IndexVec
::
new
())),
}
}
...
...
@@ -231,12 +233,16 @@ fn with_task_impl<C, A, R, HCX>(&self,
// Store the current fingerprint
{
let
old_value
=
self
.fingerprints
.borrow_mut
()
.insert
(
key
,
current_fingerprint
);
debug_assert!
(
old_value
.is_none
(),
let
mut
fingerprints
=
self
.fingerprints
.borrow_mut
();
if
dep_node_index
.index
()
>=
fingerprints
.len
()
{
fingerprints
.resize
(
dep_node_index
.index
()
+
1
,
Fingerprint
::
zero
());
}
debug_assert!
(
fingerprints
[
dep_node_index
]
==
Fingerprint
::
zero
(),
"DepGraph::with_task() - Duplicate fingerprint
\
insertion for {:?}"
,
key
);
fingerprints
[
dep_node_index
]
=
current_fingerprint
;
}
// Determine the color of the new DepNode.
...
...
@@ -262,13 +268,15 @@ fn with_task_impl<C, A, R, HCX>(&self,
let
result
=
task
(
cx
,
arg
);
let
mut
stable_hasher
=
StableHasher
::
new
();
result
.hash_stable
(
&
mut
hcx
,
&
mut
stable_hasher
);
let
old_value
=
self
.fingerprints
.borrow_mut
()
.insert
(
key
,
stable_hasher
.finish
());
debug_assert!
(
old_value
.is_none
(),
"DepGraph::with_task() - Duplicate fingerprint
\
insertion for {:?}"
,
key
);
(
result
,
DepNodeIndex
::
INVALID
)
let
fingerprint
=
stable_hasher
.finish
();
let
mut
fingerprints
=
self
.fingerprints
.borrow_mut
();
let
dep_node_index
=
DepNodeIndex
::
new
(
fingerprints
.len
());
fingerprints
.push
(
fingerprint
);
debug_assert!
(
fingerprints
[
dep_node_index
]
==
fingerprint
,
"DepGraph::with_task() - Assigned fingerprint to
\
unexpected index for {:?}"
,
key
);
(
result
,
dep_node_index
)
}
else
{
(
task
(
cx
,
arg
),
DepNodeIndex
::
INVALID
)
}
...
...
@@ -328,11 +336,29 @@ pub fn read_index(&self, dep_node_index: DepNodeIndex) {
}
#[inline]
pub
fn
fingerprint_of
(
&
self
,
dep_node
:
&
DepNode
)
->
Fingerprint
{
match
self
.fingerprints
.borrow
()
.get
(
dep_node
)
{
pub
fn
dep_node_index_of
(
&
self
,
dep_node
:
&
DepNode
)
->
DepNodeIndex
{
self
.data
.as_ref
()
.unwrap
()
.current
.borrow_mut
()
.node_to_node_index
.get
(
dep_node
)
.cloned
()
.unwrap
()
}
#[inline]
pub
fn
fingerprint_of
(
&
self
,
dep_node_index
:
DepNodeIndex
)
->
Fingerprint
{
match
self
.fingerprints
.borrow
()
.get
(
dep_node_index
)
{
Some
(
&
fingerprint
)
=>
fingerprint
,
None
=>
{
bug!
(
"Could not find current fingerprint for {:?}"
,
dep_node
)
if
let
Some
(
ref
data
)
=
self
.data
{
let
dep_node
=
data
.current
.borrow
()
.nodes
[
dep_node_index
];
bug!
(
"Could not find current fingerprint for {:?}"
,
dep_node
)
}
else
{
bug!
(
"Could not find current fingerprint for {:?}"
,
dep_node_index
)
}
}
}
}
...
...
@@ -420,14 +446,17 @@ pub fn edge_deduplication_data(&self) -> (u64, u64) {
}
pub
fn
serialize
(
&
self
)
->
SerializedDepGraph
{
let
fingerprints
=
self
.fingerprints
.borrow
();
let
mut
fingerprints
=
self
.fingerprints
.borrow_mut
();
let
current_dep_graph
=
self
.data
.as_ref
()
.unwrap
()
.current
.borrow
();
let
nodes
:
IndexVec
<
_
,
_
>
=
current_dep_graph
.nodes
.iter
()
.map
(|
dep_node
|
{
let
fingerprint
=
fingerprints
.get
(
dep_node
)
.cloned
()
.unwrap_or
(
Fingerprint
::
zero
());
(
*
dep_node
,
fingerprint
)
// Make sure we don't run out of bounds below.
if
current_dep_graph
.nodes
.len
()
>
fingerprints
.len
()
{
fingerprints
.resize
(
current_dep_graph
.nodes
.len
(),
Fingerprint
::
zero
());
}
let
nodes
:
IndexVec
<
_
,
(
DepNode
,
Fingerprint
)
>
=
current_dep_graph
.nodes
.iter_enumerated
()
.map
(|(
idx
,
&
dep_node
)|
{
(
dep_node
,
fingerprints
[
idx
])
})
.collect
();
let
total_edge_count
:
usize
=
current_dep_graph
.edges
.iter
()
...
...
@@ -610,13 +639,20 @@ pub fn try_mark_green<'tcx>(&self,
// ... copying the fingerprint from the previous graph too, so we don't
// have to recompute it ...
let
fingerprint
=
data
.previous
.fingerprint_by_index
(
prev_dep_node_index
);
let
old_fingerprint
=
self
.fingerprints
.borrow_mut
()
.insert
(
*
dep_node
,
fingerprint
);
debug_assert!
(
old_fingerprint
.is_none
(),
"DepGraph::try_mark_green() - Duplicate fingerprint
\
insertion for {:?}"
,
dep_node
);
{
let
fingerprint
=
data
.previous
.fingerprint_by_index
(
prev_dep_node_index
);
let
mut
fingerprints
=
self
.fingerprints
.borrow_mut
();
if
dep_node_index
.index
()
>=
fingerprints
.len
()
{
fingerprints
.resize
(
dep_node_index
.index
()
+
1
,
Fingerprint
::
zero
());
}
debug_assert!
(
fingerprints
[
dep_node_index
]
==
Fingerprint
::
zero
(),
"DepGraph::try_mark_green() - Duplicate fingerprint
\
insertion for {:?}"
,
dep_node
);
fingerprints
[
dep_node_index
]
=
fingerprint
;
}
// ... emitting any stored diagnostic ...
{
...
...
src/librustc/dep_graph/prev.rs
浏览文件 @
e6e5589d
...
...
@@ -62,4 +62,8 @@ pub fn fingerprint_by_index(&self,
->
Fingerprint
{
self
.data.nodes
[
dep_node_index
]
.1
}
pub
fn
node_count
(
&
self
)
->
usize
{
self
.index
.len
()
}
}
src/librustc/hir/map/collector.rs
浏览文件 @
e6e5589d
...
...
@@ -12,6 +12,7 @@
use
dep_graph
::{
DepGraph
,
DepKind
,
DepNodeIndex
};
use
hir
::
intravisit
::{
Visitor
,
NestedVisitorMap
};
use
hir
::
svh
::
Svh
;
use
middle
::
cstore
::
CrateStore
;
use
session
::
CrateDisambiguator
;
use
std
::
iter
::
repeat
;
...
...
@@ -44,7 +45,7 @@ pub(super) struct NodeCollector<'a, 'hir> {
// We are collecting DepNode::HirBody hashes here so we can compute the
// crate hash from then later on.
hir_body_nodes
:
Vec
<
DefPathHash
>
,
hir_body_nodes
:
Vec
<
(
DefPathHash
,
DepNodeIndex
)
>
,
}
impl
<
'a
,
'hir
>
NodeCollector
<
'a
,
'hir
>
{
...
...
@@ -99,7 +100,7 @@ pub(super) fn root(krate: &'hir Crate,
);
}
let
hir_body_nodes
=
vec!
[
root_mod_def_path_hash
];
let
hir_body_nodes
=
vec!
[
(
root_mod_def_path_hash
,
root_mod_full_dep_index
)
];
let
mut
collector
=
NodeCollector
{
krate
,
...
...
@@ -123,13 +124,12 @@ pub(super) fn finalize_and_compute_crate_hash(self,
crate_disambiguator
:
CrateDisambiguator
,
cstore
:
&
CrateStore
,
commandline_args_hash
:
u64
)
->
Vec
<
MapEntry
<
'hir
>>
{
->
(
Vec
<
MapEntry
<
'hir
>>
,
Svh
)
{
let
mut
node_hashes
:
Vec
<
_
>
=
self
.hir_body_nodes
.iter
()
.map
(|
&
def_path_hash
|
{
let
dep_node
=
def_path_hash
.to_dep_node
(
DepKind
::
HirBody
);
(
def_path_hash
,
self
.dep_graph
.fingerprint_of
(
&
dep_node
))
.map
(|
&
(
def_path_hash
,
dep_node_index
)|
{
(
def_path_hash
,
self
.dep_graph
.fingerprint_of
(
dep_node_index
))
})
.collect
();
...
...
@@ -147,13 +147,19 @@ pub(super) fn finalize_and_compute_crate_hash(self,
(
name1
,
dis1
)
.cmp
(
&
(
name2
,
dis2
))
});
self
.dep_graph
.with_task
(
DepNode
::
new_no_params
(
DepKind
::
Krate
),
&
self
.hcx
,
((
node_hashes
,
upstream_crates
),
(
commandline_args_hash
,
crate_disambiguator
.to_fingerprint
())),
identity_fn
);
self
.map
let
(
_
,
crate_dep_node_index
)
=
self
.dep_graph
.with_task
(
DepNode
::
new_no_params
(
DepKind
::
Krate
),
&
self
.hcx
,
((
node_hashes
,
upstream_crates
),
(
commandline_args_hash
,
crate_disambiguator
.to_fingerprint
())),
identity_fn
);
let
svh
=
Svh
::
new
(
self
.dep_graph
.fingerprint_of
(
crate_dep_node_index
)
.to_smaller_hash
());
(
self
.map
,
svh
)
}
fn
insert_entry
(
&
mut
self
,
id
:
NodeId
,
entry
:
MapEntry
<
'hir
>
)
{
...
...
@@ -255,7 +261,7 @@ fn with_dep_node_owner<T: HashStable<StableHashingContext<'a>>,
identity_fn
)
.1
;
self
.hir_body_nodes
.push
(
def_path_hash
);
self
.hir_body_nodes
.push
(
(
def_path_hash
,
self
.current_full_dep_index
)
);
self
.current_dep_node_owner
=
dep_node_owner
;
self
.currently_in_body
=
false
;
...
...
src/librustc/hir/map/mod.rs
浏览文件 @
e6e5589d
...
...
@@ -26,6 +26,7 @@
use
hir
::
*
;
use
hir
::
print
::
Nested
;
use
hir
::
svh
::
Svh
;
use
util
::
nodemap
::{
DefIdMap
,
FxHashMap
};
use
arena
::
TypedArena
;
...
...
@@ -241,6 +242,9 @@ pub struct Map<'hir> {
/// deref. This is a gratuitous micro-optimization.
pub
dep_graph
:
DepGraph
,
/// The SVH of the local crate.
pub
crate_hash
:
Svh
,
/// NodeIds are sequential integers from 0, so we can be
/// super-compact by storing them in a vector. Not everything with
/// a NodeId is in the map, but empirically the occupancy is about
...
...
@@ -1048,7 +1052,7 @@ pub fn map_crate<'hir>(sess: &::session::Session,
forest
:
&
'hir
mut
Forest
,
definitions
:
&
'hir
Definitions
)
->
Map
<
'hir
>
{
let
map
=
{
let
(
map
,
crate_hash
)
=
{
let
hcx
=
::
ich
::
StableHashingContext
::
new
(
sess
,
&
forest
.krate
,
definitions
,
cstore
);
let
mut
collector
=
NodeCollector
::
root
(
&
forest
.krate
,
...
...
@@ -1087,6 +1091,7 @@ pub fn map_crate<'hir>(sess: &::session::Session,
let
map
=
Map
{
forest
,
dep_graph
:
forest
.dep_graph
.clone
(),
crate_hash
,
map
,
hir_to_node_id
,
definitions
,
...
...
src/librustc/ty/maps/plumbing.rs
浏览文件 @
e6e5589d
...
...
@@ -438,7 +438,7 @@ fn load_from_disk_and_cache_in_memory(tcx: TyCtxt<'a, $tcx, 'lcx>,
use
rustc_data_structures
::
stable_hasher
::{
StableHasher
,
HashStable
};
use
ich
::
Fingerprint
;
assert!
(
Some
(
tcx
.dep_graph
.fingerprint_of
(
dep_node
))
==
assert!
(
Some
(
tcx
.dep_graph
.fingerprint_of
(
dep_node
_index
))
==
tcx
.dep_graph
.prev_fingerprint_of
(
dep_node
),
"Fingerprint for green query instance not loaded
\
from cache: {:?}"
,
dep_node
);
...
...
@@ -452,7 +452,7 @@ fn load_from_disk_and_cache_in_memory(tcx: TyCtxt<'a, $tcx, 'lcx>,
let
new_hash
:
Fingerprint
=
hasher
.finish
();
debug!
(
"END verify_ich({:?})"
,
dep_node
);
let
old_hash
=
tcx
.dep_graph
.fingerprint_of
(
dep_node
);
let
old_hash
=
tcx
.dep_graph
.fingerprint_of
(
dep_node
_index
);
assert!
(
new_hash
==
old_hash
,
"Found unstable fingerprints
\
for {:?}"
,
dep_node
);
...
...
src/librustc/ty/mod.rs
浏览文件 @
e6e5589d
...
...
@@ -19,6 +19,7 @@
use
hir
::
def
::{
Def
,
CtorKind
,
ExportMap
};
use
hir
::
def_id
::{
CrateNum
,
DefId
,
DefIndex
,
LocalDefId
,
CRATE_DEF_INDEX
,
LOCAL_CRATE
};
use
hir
::
map
::
DefPathData
;
use
hir
::
svh
::
Svh
;
use
ich
::
StableHashingContext
;
use
middle
::
const_val
::
ConstVal
;
use
middle
::
lang_items
::{
FnTraitLangItem
,
FnMutTraitLangItem
,
FnOnceTraitLangItem
};
...
...
@@ -2659,6 +2660,13 @@ fn original_crate_name<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
tcx
.crate_name
.clone
()
}
fn
crate_hash
<
'a
,
'tcx
>
(
tcx
:
TyCtxt
<
'a
,
'tcx
,
'tcx
>
,
crate_num
:
CrateNum
)
->
Svh
{
assert_eq!
(
crate_num
,
LOCAL_CRATE
);
tcx
.hir.crate_hash
}
pub
fn
provide
(
providers
:
&
mut
ty
::
maps
::
Providers
)
{
context
::
provide
(
providers
);
erase_regions
::
provide
(
providers
);
...
...
@@ -2674,6 +2682,7 @@ pub fn provide(providers: &mut ty::maps::Providers) {
trait_of_item
,
crate_disambiguator
,
original_crate_name
,
crate_hash
,
trait_impls_of
:
trait_def
::
trait_impls_of_provider
,
..*
providers
};
...
...
src/librustc_incremental/persist/dirty_clean.rs
浏览文件 @
e6e5589d
...
...
@@ -480,7 +480,8 @@ fn dep_node_str(&self, dep_node: &DepNode) -> String {
fn
assert_dirty
(
&
self
,
item_span
:
Span
,
dep_node
:
DepNode
)
{
debug!
(
"assert_dirty({:?})"
,
dep_node
);
let
current_fingerprint
=
self
.tcx.dep_graph
.fingerprint_of
(
&
dep_node
);
let
dep_node_index
=
self
.tcx.dep_graph
.dep_node_index_of
(
&
dep_node
);
let
current_fingerprint
=
self
.tcx.dep_graph
.fingerprint_of
(
dep_node_index
);
let
prev_fingerprint
=
self
.tcx.dep_graph
.prev_fingerprint_of
(
&
dep_node
);
if
Some
(
current_fingerprint
)
==
prev_fingerprint
{
...
...
@@ -494,7 +495,8 @@ fn assert_dirty(&self, item_span: Span, dep_node: DepNode) {
fn
assert_clean
(
&
self
,
item_span
:
Span
,
dep_node
:
DepNode
)
{
debug!
(
"assert_clean({:?})"
,
dep_node
);
let
current_fingerprint
=
self
.tcx.dep_graph
.fingerprint_of
(
&
dep_node
);
let
dep_node_index
=
self
.tcx.dep_graph
.dep_node_index_of
(
&
dep_node
);
let
current_fingerprint
=
self
.tcx.dep_graph
.fingerprint_of
(
dep_node_index
);
let
prev_fingerprint
=
self
.tcx.dep_graph
.prev_fingerprint_of
(
&
dep_node
);
if
Some
(
current_fingerprint
)
!=
prev_fingerprint
{
...
...
src/librustc_trans/base.rs
浏览文件 @
e6e5589d
...
...
@@ -43,7 +43,7 @@
use
rustc
::
ty
::{
self
,
Ty
,
TyCtxt
};
use
rustc
::
ty
::
layout
::{
self
,
Align
,
TyLayout
,
LayoutOf
};
use
rustc
::
ty
::
maps
::
Providers
;
use
rustc
::
dep_graph
::{
DepNode
,
Dep
Kind
,
Dep
Constructor
};
use
rustc
::
dep_graph
::{
DepNode
,
DepConstructor
};
use
rustc
::
middle
::
cstore
::{
self
,
LinkMeta
,
LinkagePreference
};
use
rustc
::
util
::
common
::{
time
,
print_time_passes_entry
};
use
rustc
::
session
::
config
::{
self
,
NoDebugInfo
};
...
...
@@ -709,8 +709,7 @@ pub fn trans_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
}
}
let
crate_hash
=
tcx
.dep_graph
.fingerprint_of
(
&
DepNode
::
new_no_params
(
DepKind
::
Krate
));
let
crate_hash
=
tcx
.crate_hash
(
LOCAL_CRATE
);
let
link_meta
=
link
::
build_link_meta
(
crate_hash
);
let
exported_symbol_node_ids
=
find_exported_symbols
(
tcx
);
...
...
src/librustc_trans_utils/link.rs
浏览文件 @
e6e5589d
...
...
@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use
rustc
::
ich
::
Fingerprint
;
use
rustc
::
session
::
config
::{
self
,
OutputFilenames
,
Input
,
OutputType
};
use
rustc
::
session
::
Session
;
use
rustc
::
middle
::
cstore
::{
self
,
LinkMeta
};
...
...
@@ -50,9 +49,9 @@ fn is_writeable(p: &Path) -> bool {
}
}
pub
fn
build_link_meta
(
crate_hash
:
Fingerprint
)
->
LinkMeta
{
pub
fn
build_link_meta
(
crate_hash
:
Svh
)
->
LinkMeta
{
let
r
=
LinkMeta
{
crate_hash
:
Svh
::
new
(
crate_hash
.to_smaller_hash
())
,
crate_hash
,
};
info!
(
"{:?}"
,
r
);
return
r
;
...
...
src/librustc_trans_utils/trans_crate.rs
浏览文件 @
e6e5589d
...
...
@@ -41,7 +41,7 @@
use
rustc
::
ty
::
maps
::
Providers
;
use
rustc
::
middle
::
cstore
::
EncodedMetadata
;
use
rustc
::
middle
::
cstore
::
MetadataLoader
as
MetadataLoaderTrait
;
use
rustc
::
dep_graph
::
{
DepGraph
,
DepNode
,
DepKind
}
;
use
rustc
::
dep_graph
::
DepGraph
;
use
rustc_back
::
target
::
Target
;
use
link
::{
build_link_meta
,
out_filename
};
...
...
@@ -197,9 +197,7 @@ fn trans_crate<'a, 'tcx>(
let
_
=
tcx
.native_libraries
(
LOCAL_CRATE
);
tcx
.sess
.abort_if_errors
();
let
crate_hash
=
tcx
.dep_graph
.fingerprint_of
(
&
DepNode
::
new_no_params
(
DepKind
::
Krate
));
let
link_meta
=
build_link_meta
(
crate_hash
);
let
link_meta
=
build_link_meta
(
tcx
.crate_hash
(
LOCAL_CRATE
));
let
exported_symbols
=
::
find_exported_symbols
(
tcx
);
let
metadata
=
tcx
.encode_metadata
(
&
link_meta
,
&
exported_symbols
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录