Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
e304fb43
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,发现更多精彩内容 >>
提交
e304fb43
编写于
1月 02, 2016
作者:
A
Amanieu d'Antras
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace no_elf_tls with target_thread_local
上级
54461393
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
5 addition
and
45 deletion
+5
-45
mk/crates.mk
mk/crates.mk
+0
-4
src/librustc_back/target/aarch64_unknown_linux_gnu.rs
src/librustc_back/target/aarch64_unknown_linux_gnu.rs
+1
-2
src/librustc_back/target/android_base.rs
src/librustc_back/target/android_base.rs
+1
-0
src/librustc_back/target/arm_linux_androideabi.rs
src/librustc_back/target/arm_linux_androideabi.rs
+0
-1
src/libstd/thread/scoped_tls.rs
src/libstd/thread/scoped_tls.rs
+3
-38
未找到文件。
mk/crates.mk
浏览文件 @
e304fb43
...
...
@@ -175,9 +175,5 @@ endef
$(foreach
crate,$(TOOLS),$(eval
$(call
RUST_TOOL,$(crate))))
ifdef
CFG_DISABLE_ELF_TLS
RUSTFLAGS_std
:=
--cfg
no_elf_tls
endif
CRATEFILE_libc
:=
$(SREL)
src/liblibc/src/lib.rs
RUSTFLAGS_libc
:=
--cfg
stdbuild
src/librustc_back/target/aarch64_unknown_linux_gnu.rs
浏览文件 @
e304fb43
...
...
@@ -11,8 +11,7 @@
use
target
::
Target
;
pub
fn
target
()
->
Target
{
let
mut
base
=
super
::
linux_base
::
opts
();
base
.has_elf_tls
=
false
;
let
base
=
super
::
linux_base
::
opts
();
Target
{
llvm_target
:
"aarch64-unknown-linux-gnu"
.to_string
(),
target_endian
:
"little"
.to_string
(),
...
...
src/librustc_back/target/android_base.rs
浏览文件 @
e304fb43
...
...
@@ -17,5 +17,6 @@ pub fn opts() -> TargetOptions {
base
.pre_link_args
.push
(
"-Wl,--allow-multiple-definition"
.to_string
());
base
.is_like_android
=
true
;
base
.position_independent_executables
=
true
;
base
.has_elf_tls
=
false
;
base
}
src/librustc_back/target/arm_linux_androideabi.rs
浏览文件 @
e304fb43
...
...
@@ -13,7 +13,6 @@
pub
fn
target
()
->
Target
{
let
mut
base
=
super
::
android_base
::
opts
();
base
.features
=
"+v7"
.to_string
();
base
.has_elf_tls
=
false
;
Target
{
llvm_target
:
"arm-linux-androideabi"
.to_string
(),
...
...
src/libstd/thread/scoped_tls.rs
浏览文件 @
e304fb43
...
...
@@ -87,32 +87,9 @@ pub struct ScopedKey<T:'static> { inner: fn() -> &'static imp::KeyInner<T> }
issue
=
"0"
)]
#[macro_export]
#[allow_internal_unstable]
#[cfg(no_elf_tls)]
macro_rules!
__
scoped_thread_local_inner
{
(
$t:ty
)
=>
{{
static
_
KEY
:
$crate
::
thread
::
__
ScopedKeyInner
<
$t
>
=
$crate
::
thread
::
__
ScopedKeyInner
::
new
();
fn
_
getit
()
->
&
'static
$crate
::
thread
::
__
ScopedKeyInner
<
$t
>
{
&
_
KEY
}
$crate
::
thread
::
ScopedKey
::
new
(
_
getit
)
}}
}
#[doc(hidden)]
#[unstable(feature
=
"thread_local_internals"
,
reason
=
"should not be necessary"
,
issue
=
"0"
)]
#[macro_export]
#[allow_internal_unstable]
#[cfg(not(no_elf_tls))]
macro_rules!
__
scoped_thread_local_inner
{
(
$t:ty
)
=>
{{
#[cfg_attr(not(any(windows,
target_os
=
"android"
,
target_os
=
"ios"
,
target_os
=
"netbsd"
,
target_os
=
"openbsd"
,
target_arch
=
"aarch64"
)),
thread_local)]
#[cfg_attr(target_thread_local,
thread_local)]
static
_
KEY
:
$crate
::
thread
::
__
ScopedKeyInner
<
$t
>
=
$crate
::
thread
::
__
ScopedKeyInner
::
new
();
fn
_
getit
()
->
&
'static
$crate
::
thread
::
__
ScopedKeyInner
<
$t
>
{
&
_
KEY
}
...
...
@@ -221,13 +198,7 @@ pub fn is_set(&'static self) -> bool {
}
}
#[cfg(not(any(windows,
target_os
=
"android"
,
target_os
=
"ios"
,
target_os
=
"netbsd"
,
target_os
=
"openbsd"
,
target_arch
=
"aarch64"
,
no_elf_tls)))]
#[cfg(target_thread_local)]
#[doc(hidden)]
mod
imp
{
use
cell
::
Cell
;
...
...
@@ -246,13 +217,7 @@ pub unsafe fn get(&self) -> *mut T { self.inner.get() }
}
}
#[cfg(any(windows,
target_os
=
"android"
,
target_os
=
"ios"
,
target_os
=
"netbsd"
,
target_os
=
"openbsd"
,
target_arch
=
"aarch64"
,
no_elf_tls))]
#[cfg(not(target_thread_local))]
#[doc(hidden)]
mod
imp
{
use
cell
::
Cell
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录