Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
c615bed3
R
Rust
项目概览
int
/
Rust
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
c615bed3
编写于
2月 16, 2021
作者:
J
Jakub Kulik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change default Solaris x86 target to x86_64-pc-solaris
上级
d2731d8e
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
28 addition
and
24 deletion
+28
-24
compiler/rustc_session/src/config.rs
compiler/rustc_session/src/config.rs
+1
-1
compiler/rustc_target/src/spec/mod.rs
compiler/rustc_target/src/spec/mod.rs
+2
-21
compiler/rustc_target/src/spec/solaris_base.rs
compiler/rustc_target/src/spec/solaris_base.rs
+0
-1
compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs
compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs
+1
-0
compiler/rustc_target/src/spec/x86_64_pc_solaris.rs
compiler/rustc_target/src/spec/x86_64_pc_solaris.rs
+19
-0
compiler/rustc_target/src/spec/x86_64_sun_solaris.rs
compiler/rustc_target/src/spec/x86_64_sun_solaris.rs
+1
-0
src/bootstrap/bootstrap.py
src/bootstrap/bootstrap.py
+4
-1
未找到文件。
compiler/rustc_session/src/config.rs
浏览文件 @
c615bed3
...
...
@@ -1536,7 +1536,7 @@ fn parse_target_triple(matches: &getopts::Matches, error_format: ErrorOutputType
early_error
(
error_format
,
&
format!
(
"target file {:?} does not exist"
,
path
))
})
}
Some
(
target
)
=>
TargetTriple
::
from_alias
(
target
),
Some
(
target
)
=>
TargetTriple
::
TargetTriple
(
target
),
_
=>
TargetTriple
::
from_triple
(
host_triple
()),
}
}
...
...
compiler/rustc_target/src/spec/mod.rs
浏览文件 @
c615bed3
...
...
@@ -736,9 +736,8 @@ fn to_json(&self) -> Json {
(
"armv7r-none-eabi"
,
armv7r_none_eabi
),
(
"armv7r-none-eabihf"
,
armv7r_none_eabihf
),
// `x86_64-pc-solaris` is an alias for `x86_64_sun_solaris` for backwards compatibility reasons.
// (See <https://github.com/rust-lang/rust/issues/40531>.)
(
"x86_64-sun-solaris"
,
"x86_64-pc-solaris"
,
x86_64_sun_solaris
),
(
"x86_64-pc-solaris"
,
x86_64_pc_solaris
),
(
"x86_64-sun-solaris"
,
x86_64_sun_solaris
),
(
"sparcv9-sun-solaris"
,
sparcv9_sun_solaris
),
(
"x86_64-unknown-illumos"
,
x86_64_unknown_illumos
),
...
...
@@ -1986,24 +1985,6 @@ pub fn from_path(path: &Path) -> Result<Self, io::Error> {
Ok
(
TargetTriple
::
TargetPath
(
canonicalized_path
))
}
/// Creates a target triple from its alias
pub
fn
from_alias
(
triple
:
String
)
->
Self
{
macro_rules!
target_aliases
{
(
$
((
$alias:literal
,
$target:literal
),)
+
)
=>
{
match
triple
.as_str
()
{
$
(
$alias
=>
TargetTriple
::
from_triple
(
$target
),
)
+
_
=>
TargetTriple
::
TargetTriple
(
triple
),
}
}
}
target_aliases!
{
// `x86_64-pc-solaris` is an alias for `x86_64_sun_solaris` for backwards compatibility reasons.
// (See <https://github.com/rust-lang/rust/issues/40531>.)
(
"x86_64-pc-solaris"
,
"x86_64-sun-solaris"
),
}
}
/// Returns a string triple for this target.
///
/// If this target is a path, the file name (without extension) is returned.
...
...
compiler/rustc_target/src/spec/solaris_base.rs
浏览文件 @
c615bed3
...
...
@@ -3,7 +3,6 @@
pub
fn
opts
()
->
TargetOptions
{
TargetOptions
{
os
:
"solaris"
.to_string
(),
vendor
:
"sun"
.to_string
(),
dynamic_linking
:
true
,
executables
:
true
,
has_rpath
:
true
,
...
...
compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs
浏览文件 @
c615bed3
...
...
@@ -7,6 +7,7 @@ pub fn target() -> Target {
base
.pre_link_args
.insert
(
LinkerFlavor
::
Gcc
,
vec!
[
"-m64"
.to_string
()]);
// llvm calls this "v9"
base
.cpu
=
"v9"
.to_string
();
base
.vendor
=
"sun"
.to_string
();
base
.max_atomic_width
=
Some
(
64
);
Target
{
...
...
compiler/rustc_target/src/spec/x86_64_pc_solaris.rs
0 → 100644
浏览文件 @
c615bed3
use
crate
::
spec
::{
LinkerFlavor
,
StackProbeType
,
Target
};
pub
fn
target
()
->
Target
{
let
mut
base
=
super
::
solaris_base
::
opts
();
base
.pre_link_args
.insert
(
LinkerFlavor
::
Gcc
,
vec!
[
"-m64"
.to_string
()]);
base
.cpu
=
"x86-64"
.to_string
();
base
.vendor
=
"pc"
.to_string
();
base
.max_atomic_width
=
Some
(
64
);
base
.stack_probes
=
StackProbeType
::
InlineOrCall
{
min_llvm_version_for_inline
:
(
11
,
0
,
1
)
};
Target
{
llvm_target
:
"x86_64-pc-solaris"
.to_string
(),
pointer_width
:
64
,
data_layout
:
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
.to_string
(),
arch
:
"x86_64"
.to_string
(),
options
:
base
,
}
}
compiler/rustc_target/src/spec/x86_64_sun_solaris.rs
浏览文件 @
c615bed3
...
...
@@ -4,6 +4,7 @@ pub fn target() -> Target {
let
mut
base
=
super
::
solaris_base
::
opts
();
base
.pre_link_args
.insert
(
LinkerFlavor
::
Gcc
,
vec!
[
"-m64"
.to_string
()]);
base
.cpu
=
"x86-64"
.to_string
();
base
.vendor
=
"sun"
.to_string
();
base
.max_atomic_width
=
Some
(
64
);
base
.stack_probes
=
StackProbeType
::
InlineOrCall
{
min_llvm_version_for_inline
:
(
11
,
0
,
1
)
};
...
...
src/bootstrap/bootstrap.py
浏览文件 @
c615bed3
...
...
@@ -240,13 +240,16 @@ def default_build_triple(verbose):
else
:
ostype
=
'unknown-linux-gnu'
elif
ostype
==
'SunOS'
:
ostype
=
'
sun
-solaris'
ostype
=
'
pc
-solaris'
# On Solaris, uname -m will return a machine classification instead
# of a cpu type, so uname -p is recommended instead. However, the
# output from that option is too generic for our purposes (it will
# always emit 'i386' on x86/amd64 systems). As such, isainfo -k
# must be used instead.
cputype
=
require
([
'isainfo'
,
'-k'
]).
decode
(
default_encoding
)
# sparc cpus have sun as a target vendor
if
'sparc'
in
cputype
:
ostype
=
'sun-solaris'
elif
ostype
.
startswith
(
'MINGW'
):
# msys' `uname` does not print gcc configuration, but prints msys
# configuration. so we cannot believe `uname -m`:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录