Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
577d0dbc
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,发现更多精彩内容 >>
提交
577d0dbc
编写于
1月 09, 2015
作者:
V
Valerii Hiora
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
iOS: preliminary 64-bit archs support
上级
3fbbc6ea
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
161 addition
and
9 deletion
+161
-9
mk/cfg/aarch64-apple-ios.mk
mk/cfg/aarch64-apple-ios.mk
+36
-0
mk/cfg/x86_64-apple-ios.mk
mk/cfg/x86_64-apple-ios.mk
+36
-0
src/liblibc/lib.rs
src/liblibc/lib.rs
+1
-1
src/librustc_back/target/aarch64_apple_ios.rs
src/librustc_back/target/aarch64_apple_ios.rs
+31
-0
src/librustc_back/target/mod.rs
src/librustc_back/target/mod.rs
+4
-0
src/librustc_back/target/x86_64_apple_ios.rs
src/librustc_back/target/x86_64_apple_ios.rs
+26
-0
src/libstd/sys/unix/sync.rs
src/libstd/sys/unix/sync.rs
+6
-3
src/rt/arch/aarch64/morestack.S
src/rt/arch/aarch64/morestack.S
+21
-5
未找到文件。
mk/cfg/aarch64-apple-ios.mk
0 → 100644
浏览文件 @
577d0dbc
# aarch64-apple-ios configuration
CFG_SDK_NAME_aarch64-apple-ios
:=
iphoneos
CFG_SDK_ARCHS_aarch64-apple-ios
:=
arm64
ifneq
($(findstring darwin,$(CFG_OSTYPE)),)
CFG_IOS_SDK_aarch64-apple-ios
:=
$(
shell
xcrun
--show-sdk-path
-sdk
iphoneos 2>/dev/null
)
CFG_IOS_SDK_FLAGS_aarch64-apple-ios
:=
-target
aarch64-apple-darwin
-isysroot
$
(
CFG_IOS_SDK_aarch64-apple-ios
)
-mios-version-min
=
7.0
-arch
arm64
CC_aarch64-apple-ios
=
$(
shell
xcrun
-find
-sdk
iphoneos clang
)
CXX_aarch64-apple-ios
=
$(
shell
xcrun
-find
-sdk
iphoneos clang++
)
CPP_aarch64-apple-ios
=
$(
shell
xcrun
-find
-sdk
iphoneos clang++
)
AR_aarch64-apple-ios
=
$(
shell
xcrun
-find
-sdk
iphoneos ar
)
endif
CFG_LIB_NAME_aarch64-apple-ios
=
lib
$(1)
.a
CFG_LIB_GLOB_aarch64-apple-ios
=
lib
$(1)
-
*
.a
CFG_LIB_SKIP_INSTALL_aarch64-apple-ios
=
1
#lib
$(1)
-
*
.a
CFG_STATIC_LIB_NAME_aarch64-apple-ios
=
lib
$(1)
.a
CFG_LIB_DSYM_GLOB_aarch64-apple-ios
=
lib
$(1)
-
*
.a.dSYM
CFG_CFLAGS_aarch64-apple-ios
:=
$
(
CFG_IOS_SDK_FLAGS_aarch64-apple-ios
)
CFG_JEMALLOC_CFLAGS_aarch64-apple-ios
:=
$
(
CFG_IOS_SDK_FLAGS_aarch64-apple-ios
)
CFG_GCCISH_CFLAGS_aarch64-apple-ios
:=
-Wall
-Werror
-fPIC
$
(
CFG_IOS_SDK_FLAGS_aarch64-apple-ios
)
CFG_GCCISH_CXXFLAGS_aarch64-apple-ios
:=
-fno-rtti
$
(
CFG_IOS_SDK_FLAGS_aarch64-apple-ios
)
-I
$
(
CFG_IOS_SDK_aarch64-apple-ios
)
/usr/include/c++/4.2.1
CFG_GCCISH_LINK_FLAGS_aarch64-apple-ios
:=
-lpthread
-syslibroot
$
(
CFG_IOS_SDK_aarch64-apple-ios
)
-Wl
,-no_compact_unwind
CFG_GCCISH_DEF_FLAG_aarch64-apple-ios
:=
-Wl
,-exported_symbols_list,
CFG_GCCISH_PRE_LIB_FLAGS_aarch64-apple-ios
:=
CFG_GCCISH_POST_LIB_FLAGS_aarch64-apple-ios
:=
CFG_DEF_SUFFIX_aarch64-apple-ios
:=
.darwin.def
CFG_LLC_FLAGS_aarch64-apple-ios
:=
-mattr
=
+neon,+cyclone,+fp-armv8
CFG_INSTALL_NAME_aarch64-apple-ios
=
-Wl
,-install_name,@rpath/
$(1)
CFG_LIBUV_LINK_FLAGS_aarch64-apple-ios
=
CFG_EXE_SUFFIX_aarch64-apple-ios
:=
CFG_WINDOWSY_aarch64-apple-ios
:=
CFG_UNIXY_aarch64-apple-ios
:=
1
CFG_PATH_MUNGE_aarch64-apple-ios
:=
true
CFG_LDPATH_aarch64-apple-ios
:=
CFG_RUN_aarch64-apple-ios
=
$(2)
CFG_RUN_TARG_aarch64-apple-ios
=
$(
call
CFG_RUN_aarch64-apple-ios,,
$(2)
)
CFG_GNU_TRIPLE_aarch64-apple-ios
:=
aarch64-apple-ios
mk/cfg/x86_64-apple-ios.mk
0 → 100644
浏览文件 @
577d0dbc
# x86_64-apple-ios configuration
CFG_SDK_NAME_x86_64-apple-ios
:=
iphonesimulator
CFG_SDK_ARCHS_x86_64-apple-ios
:=
x86_64
ifneq
($(findstring darwin,$(CFG_OSTYPE)),)
CFG_IOSSIM_SDK_x86_64-apple-ios
:=
$(
shell
xcrun
--show-sdk-path
-sdk
iphonesimulator 2>/dev/null
)
CFG_IOSSIM_FLAGS_x86_64-apple-ios
:=
-m64
-target
x86_64-apple-ios
-isysroot
$
(
CFG_IOSSIM_SDK_x86_64-apple-ios
)
-mios-simulator-version-min
=
7.0
CC_x86_64-apple-ios
=
$(
shell
xcrun
-find
-sdk
iphonesimulator clang
)
CXX_x86_64-apple-ios
=
$(
shell
xcrun
-find
-sdk
iphonesimulator clang++
)
CPP_x86_64-apple-ios
=
$(
shell
xcrun
-find
-sdk
iphonesimulator clang++
)
AR_x86_64-apple-ios
=
$(
shell
xcrun
-find
-sdk
iphonesimulator ar
)
endif
CFG_LIB_NAME_x86_64-apple-ios
=
lib
$(1)
.a
CFG_LIB_GLOB_x86_64-apple-ios
=
lib
$(1)
-
*
.a
CFG_LIB_SKIP_INSTALL_x86_64-apple-ios
=
1
#lib
$(1)
-
*
.a
CFG_STATIC_LIB_NAME_x86_64-apple-ios
=
lib
$(1)
.a
CFG_LIB_DSYM_GLOB_x86_64-apple-ios
=
lib
$(1)
-
*
.a.dSYM
CFG_CFLAGS_x86_64-apple-ios
:=
$
(
CFG_IOSSIM_FLAGS_x86_64-apple-ios
)
CFG_JEMALLOC_CFLAGS_x86_64-apple-ios
:=
$
(
CFG_IOSSIM_FLAGS_x86_64-apple-ios
)
CFG_GCCISH_CFLAGS_x86_64-apple-ios
:=
-Wall
-Werror
-fPIC
$
(
CFG_IOSSIM_FLAGS_x86_64-apple-ios
)
CFG_GCCISH_CXXFLAGS_x86_64-apple-ios
:=
-fno-rtti
$
(
CFG_IOSSIM_FLAGS_x86_64-apple-ios
)
-I
$
(
CFG_IOSSIM_SDK_x86_64-apple-ios
)
/usr/include/c++/4.2.1
CFG_GCCISH_LINK_FLAGS_x86_64-apple-ios
:=
-lpthread
-Wl
,-no_compact_unwind
-m64
-Wl
,-syslibroot
$
(
CFG_IOSSIM_SDK_x86_64-apple-ios
)
CFG_GCCISH_DEF_FLAG_x86_64-apple-ios
:=
-Wl
,-exported_symbols_list,
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-apple-ios
:=
CFG_GCCISH_POST_LIB_FLAGS_x86_64-apple-ios
:=
CFG_DEF_SUFFIX_x86_64-apple-ios
:=
.darwin.def
CFG_LLC_FLAGS_x86_64-apple-ios
:=
CFG_INSTALL_NAME_x86_64-apple-ios
=
-Wl
,-install_name,@rpath/
$(1)
CFG_LIBUV_LINK_FLAGS_x86_64-apple-ios
:=
CFG_EXE_SUFFIX_x86_64-apple-ios
:=
CFG_WINDOWSY_x86_64-apple-ios
:=
CFG_UNIXY_x86_64-apple-ios
:=
1
CFG_PATH_MUNGE_x86_64-apple-ios
:=
true
CFG_LDPATH_x86_64-apple-ios
:=
CFG_RUN_x86_64-apple-ios
=
$(2)
CFG_RUN_TARG_x86_64-apple-ios
=
$(
call
CFG_RUN_x86_64-apple-ios,,
$(2)
)
CFG_GNU_TRIPLE_i386-apple-ios
:=
x86_64-apple-ios
src/liblibc/lib.rs
浏览文件 @
577d0dbc
...
...
@@ -1968,7 +1968,7 @@ pub mod extra {
}
}
#[cfg(
target_arch
=
"x86_64"
)]
#[cfg(
any(target_arch
=
"x86_64"
,
target_arch
=
"aarch64"
)
)]
pub
mod
arch
{
pub
mod
c95
{
pub
type
c_char
=
i8
;
...
...
src/librustc_back/target/aarch64_apple_ios.rs
0 → 100644
浏览文件 @
577d0dbc
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use
target
::{
Target
,
TargetOptions
};
use
super
::
apple_ios_base
::{
opts
,
Arch
};
pub
fn
target
()
->
Target
{
Target
{
// reference layout: e-m:o-i64:64-i128:128-n32:64-S128
data_layout
:
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-
\
i128:128-f32:32:32-f64:64:64-v64:64:64-v128:128:128-
\
a:0:64-n32:64-S128"
.to_string
(),
llvm_target
:
"arm64-apple-ios"
.to_string
(),
target_endian
:
"little"
.to_string
(),
target_pointer_width
:
"64"
.to_string
(),
arch
:
"aarch64"
.to_string
(),
target_os
:
"ios"
.to_string
(),
options
:
TargetOptions
{
features
:
"+neon,+fp-armv8,+cyclone"
.to_string
(),
eliminate_frame_pointer
:
false
,
..
opts
(
Arch
::
Arm64
)
},
}
}
src/librustc_back/target/mod.rs
浏览文件 @
577d0dbc
...
...
@@ -64,6 +64,7 @@
mod
arm_linux_androideabi
;
mod
arm_unknown_linux_gnueabi
;
mod
arm_unknown_linux_gnueabihf
;
mod
aarch64_apple_ios
;
mod
aarch64_unknown_linux_gnu
;
mod
i686_apple_darwin
;
mod
i686_pc_windows_gnu
;
...
...
@@ -72,6 +73,7 @@
mod
mips_unknown_linux_gnu
;
mod
mipsel_unknown_linux_gnu
;
mod
x86_64_apple_darwin
;
mod
x86_64_apple_ios
;
mod
x86_64_pc_windows_gnu
;
mod
x86_64_unknown_freebsd
;
mod
x86_64_unknown_dragonfly
;
...
...
@@ -351,6 +353,8 @@ fn load_file(path: &Path) -> Result<Target, String> {
i686_apple_darwin
,
i386_apple_ios
,
x86_64_apple_ios
,
aarch64_apple_ios
,
armv7_apple_ios
,
armv7s_apple_ios
,
...
...
src/librustc_back/target/x86_64_apple_ios.rs
0 → 100644
浏览文件 @
577d0dbc
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use
target
::
Target
;
use
super
::
apple_ios_base
::{
opts
,
Arch
};
pub
fn
target
()
->
Target
{
Target
{
data_layout
:
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-
\
f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-
\
s0:64:64-f80:128:128-n8:16:32:64"
.to_string
(),
llvm_target
:
"x86_64-apple-ios"
.to_string
(),
target_endian
:
"little"
.to_string
(),
target_pointer_width
:
"64"
.to_string
(),
arch
:
"x86_64"
.to_string
(),
target_os
:
"ios"
.to_string
(),
options
:
opts
(
Arch
::
X86_64
)
}
}
src/libstd/sys/unix/sync.rs
浏览文件 @
577d0dbc
...
...
@@ -61,19 +61,22 @@ mod os {
mod
os
{
use
libc
;
#[cfg(target_arch
=
"x86_64"
)]
#[cfg(any(target_arch
=
"x86_64"
,
target_arch
=
"aarch64"
))]
const
__
PTHREAD_MUTEX_SIZE__
:
uint
=
56
;
#[cfg(any(target_arch
=
"x86"
,
target_arch
=
"arm"
))]
const
__
PTHREAD_MUTEX_SIZE__
:
uint
=
40
;
#[cfg(target_arch
=
"x86_64"
)]
#[cfg(any(target_arch
=
"x86_64"
,
target_arch
=
"aarch64"
))]
const
__
PTHREAD_COND_SIZE__
:
uint
=
40
;
#[cfg(any(target_arch
=
"x86"
,
target_arch
=
"arm"
))]
const
__
PTHREAD_COND_SIZE__
:
uint
=
24
;
#[cfg(target_arch
=
"x86_64"
)]
#[cfg(any(target_arch
=
"x86_64"
,
target_arch
=
"aarch64"
))]
const
__
PTHREAD_RWLOCK_SIZE__
:
uint
=
192
;
#[cfg(any(target_arch
=
"x86"
,
target_arch
=
"arm"
))]
...
...
src/rt/arch/aarch64/morestack.S
浏览文件 @
577d0dbc
...
...
@@ -7,13 +7,29 @@
/*
See
i386
/
morestack
.
S
for
the
lengthy
,
general
explanation
.
*/
.
global
rust_stack_exhausted
#if defined(__APPLE__)
#define MORESTACK ___morestack
#define STACK_EXHAUSTED _rust_stack_exhausted
#else
#define MORESTACK __morestack
#define STACK_EXHAUSTED rust_stack_exhausted
#endif
.
global
STACK_EXHAUSTED
#if defined(__APPLE__)
.
private_extern
MORESTACK
#else
.
hidden
MORESTACK
#endif
#if !defined(__APPLE__)
.
type
MORESTACK
,%
function
#endif
//
FIXME
(
AARCH64
):
this
might
not
be
perfectly
right
but
works
for
now
func
__morestack
MORESTACK
:
.
cfi_startproc
bl
rust_stack_exhausted
bl
STACK_EXHAUSTED
@
plt
//
the
above
function
ensures
that
it
never
returns
.
cfi_endproc
endfunc
__morestack
.
hidden
__morestack
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录