Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
56a07539
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,发现更多精彩内容 >>
提交
56a07539
编写于
8月 10, 2017
作者:
A
Aidan Hobson Sayers
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix cross-crate global allocators on windows
上级
458ba7ae
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
20 addition
and
4 deletion
+20
-4
src/librustc_trans/back/symbol_export.rs
src/librustc_trans/back/symbol_export.rs
+9
-0
src/libstd/lib.rs
src/libstd/lib.rs
+10
-4
src/tools/tidy/src/pal.rs
src/tools/tidy/src/pal.rs
+1
-0
未找到文件。
src/librustc_trans/back/symbol_export.rs
浏览文件 @
56a07539
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
use
rustc
::
hir
::
def_id
::{
DefId
,
CrateNum
,
LOCAL_CRATE
,
INVALID_CRATE
,
CRATE_DEF_INDEX
};
use
rustc
::
hir
::
def_id
::{
DefId
,
CrateNum
,
LOCAL_CRATE
,
INVALID_CRATE
,
CRATE_DEF_INDEX
};
use
rustc
::
session
::
config
;
use
rustc
::
session
::
config
;
use
rustc
::
ty
::
TyCtxt
;
use
rustc
::
ty
::
TyCtxt
;
use
rustc_allocator
::
ALLOCATOR_METHODS
;
use
syntax
::
attr
;
use
syntax
::
attr
;
/// The SymbolExportLevel of a symbols specifies from which kinds of crates
/// The SymbolExportLevel of a symbols specifies from which kinds of crates
...
@@ -83,6 +84,14 @@ pub fn compute<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
...
@@ -83,6 +84,14 @@ pub fn compute<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
SymbolExportLevel
::
C
));
SymbolExportLevel
::
C
));
}
}
if
tcx
.sess.allocator_kind
.get
()
.is_some
()
{
for
method
in
ALLOCATOR_METHODS
{
local_crate
.push
((
format!
(
"__rust_{}"
,
method
.name
),
INVALID_DEF_ID
,
SymbolExportLevel
::
Rust
));
}
}
if
let
Some
(
id
)
=
tcx
.sess.derive_registrar_fn
.get
()
{
if
let
Some
(
id
)
=
tcx
.sess.derive_registrar_fn
.get
()
{
let
def_id
=
tcx
.hir
.local_def_id
(
id
);
let
def_id
=
tcx
.hir
.local_def_id
(
id
);
let
idx
=
def_id
.index
;
let
idx
=
def_id
.index
;
...
...
src/libstd/lib.rs
浏览文件 @
56a07539
...
@@ -319,12 +319,18 @@
...
@@ -319,12 +319,18 @@
#![default_lib_allocator]
#![default_lib_allocator]
// Always use alloc_system during stage0 since we don't know if the alloc_*
// Always use alloc_system during stage0 since we don't know if the alloc_*
// crate the stage0 compiler will pick by default is
available (most
// crate the stage0 compiler will pick by default is
enabled (e.g.
//
obviously,
if the user has disabled jemalloc in `./configure`).
// if the user has disabled jemalloc in `./configure`).
// `force_alloc_system` is *only* intended as a workaround for local rebuilds
// `force_alloc_system` is *only* intended as a workaround for local rebuilds
// with a rustc without jemalloc.
// with a rustc without jemalloc.
#![cfg_attr(any(stage0,
feature
=
"force_alloc_system"
),
feature(global_allocator))]
// The not(stage0+msvc) gates will only last until the next stage0 bump
#[cfg(any(stage0,
feature
=
"force_alloc_system"
))]
#![cfg_attr(all(
not(all(stage0,
target_env
=
"msvc"
)),
any(stage0,
feature
=
"force_alloc_system"
)),
feature(global_allocator))]
#[cfg(all(
not(all(stage0,
target_env
=
"msvc"
)),
any(stage0,
feature
=
"force_alloc_system"
)))]
#[global_allocator]
#[global_allocator]
static
ALLOC
:
alloc_system
::
System
=
alloc_system
::
System
;
static
ALLOC
:
alloc_system
::
System
=
alloc_system
::
System
;
...
...
src/tools/tidy/src/pal.rs
浏览文件 @
56a07539
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
"src/libstd/path.rs"
,
"src/libstd/path.rs"
,
"src/libstd/f32.rs"
,
"src/libstd/f32.rs"
,
"src/libstd/f64.rs"
,
"src/libstd/f64.rs"
,
"src/libstd/lib.rs"
,
// Until next stage0 snapshot bump
"src/libstd/sys_common/mod.rs"
,
"src/libstd/sys_common/mod.rs"
,
"src/libstd/sys_common/net.rs"
,
"src/libstd/sys_common/net.rs"
,
"src/libterm"
,
// Not sure how to make this crate portable, but test needs it
"src/libterm"
,
// Not sure how to make this crate portable, but test needs it
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录