Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
1c7d368e
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,发现更多精彩内容 >>
提交
1c7d368e
编写于
3月 02, 2019
作者:
B
bjorn3
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bootstrap] Remove llvm.enabled config
上级
ca2ff089
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
9 addition
and
21 deletion
+9
-21
config.toml.example
config.toml.example
+0
-4
src/bootstrap/builder.rs
src/bootstrap/builder.rs
+1
-4
src/bootstrap/config.rs
src/bootstrap/config.rs
+5
-4
src/bootstrap/test.rs
src/bootstrap/test.rs
+1
-7
src/bootstrap/tool.rs
src/bootstrap/tool.rs
+2
-2
未找到文件。
config.toml.example
浏览文件 @
1c7d368e
...
...
@@ -14,10 +14,6 @@
# =============================================================================
[llvm]
# Indicates whether rustc will support compilation with LLVM
# note: rustc does not compile without LLVM at the moment
#enabled = true
# Indicates whether the LLVM build is a Release or Debug build
#optimize = true
...
...
src/bootstrap/builder.rs
浏览文件 @
1c7d368e
...
...
@@ -996,10 +996,7 @@ pub fn cargo(
// For other crates, however, we know that we've already got a standard
// library up and running, so we can use the normal compiler to compile
// build scripts in that situation.
//
// If LLVM support is disabled we need to use the snapshot compiler to compile
// build scripts, as the new compiler doesn't support executables.
if
mode
==
Mode
::
Std
||
!
self
.config.llvm_enabled
{
if
mode
==
Mode
::
Std
{
cargo
.env
(
"RUSTC_SNAPSHOT"
,
&
self
.initial_rustc
)
.env
(
"RUSTC_SNAPSHOT_LIBDIR"
,
self
.rustc_snapshot_libdir
());
...
...
src/bootstrap/config.rs
浏览文件 @
1c7d368e
...
...
@@ -64,7 +64,6 @@ pub struct Config {
pub
backtrace_on_ice
:
bool
,
// llvm codegen options
pub
llvm_enabled
:
bool
,
pub
llvm_assertions
:
bool
,
pub
llvm_optimize
:
bool
,
pub
llvm_thin_lto
:
bool
,
...
...
@@ -244,7 +243,6 @@ struct Install {
#[derive(Deserialize,
Default)]
#[serde(deny_unknown_fields,
rename_all
=
"kebab-case"
)]
struct
Llvm
{
enabled
:
Option
<
bool
>
,
ccache
:
Option
<
StringOrBool
>
,
ninja
:
Option
<
bool
>
,
assertions
:
Option
<
bool
>
,
...
...
@@ -360,7 +358,6 @@ fn path_from_python(var_key: &str) -> PathBuf {
pub
fn
default_opts
()
->
Config
{
let
mut
config
=
Config
::
default
();
config
.llvm_enabled
=
true
;
config
.llvm_optimize
=
true
;
config
.llvm_version_check
=
true
;
config
.backtrace
=
true
;
...
...
@@ -512,7 +509,6 @@ pub fn parse(args: &[String]) -> Config {
Some
(
StringOrBool
::
Bool
(
false
))
|
None
=>
{}
}
set
(
&
mut
config
.ninja
,
llvm
.ninja
);
set
(
&
mut
config
.llvm_enabled
,
llvm
.enabled
);
llvm_assertions
=
llvm
.assertions
;
set
(
&
mut
config
.llvm_optimize
,
llvm
.optimize
);
set
(
&
mut
config
.llvm_thin_lto
,
llvm
.thin_lto
);
...
...
@@ -671,6 +667,11 @@ pub fn verbose(&self) -> bool {
pub
fn
very_verbose
(
&
self
)
->
bool
{
self
.verbose
>
1
}
pub
fn
llvm_enabled
(
&
self
)
->
bool
{
self
.rust_codegen_backends
.contains
(
&
INTERNER
.intern_str
(
"llvm"
))
||
self
.rust_codegen_backends
.contains
(
&
INTERNER
.intern_str
(
"emscripten"
))
}
}
fn
set
<
T
>
(
field
:
&
mut
T
,
val
:
Option
<
T
>
)
{
...
...
src/bootstrap/test.rs
浏览文件 @
1c7d368e
...
...
@@ -1194,7 +1194,7 @@ fn run(self, builder: &Builder<'_>) {
cmd
.arg
(
"--quiet"
);
}
if
builder
.config.llvm_enabled
{
if
builder
.config
.llvm_enabled
()
{
let
llvm_config
=
builder
.ensure
(
native
::
Llvm
{
target
:
builder
.config.build
,
emscripten
:
false
,
...
...
@@ -1227,12 +1227,6 @@ fn run(self, builder: &Builder<'_>) {
}
}
}
if
suite
==
"run-make-fulldeps"
&&
!
builder
.config.llvm_enabled
{
builder
.info
(
"Ignoring run-make test suite as they generally don't work without LLVM"
);
return
;
}
if
suite
!=
"run-make-fulldeps"
{
cmd
.arg
(
"--cc"
)
...
...
src/bootstrap/tool.rs
浏览文件 @
1c7d368e
...
...
@@ -699,8 +699,8 @@ fn prepare_tool_cmd(&self, compiler: Compiler, tool: Tool, cmd: &mut Command) {
add_lib_path
(
lib_paths
,
cmd
);
}
fn
llvm_bin_path
(
&
self
)
->
Option
<
PathBuf
>
{
if
self
.config.llvm_enabled
{
fn
llvm_bin_path
(
&
self
)
->
Option
<
PathBuf
>
{
if
self
.config
.llvm_enabled
()
{
let
llvm_config
=
self
.ensure
(
native
::
Llvm
{
target
:
self
.config.build
,
emscripten
:
false
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录