Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
802b6db0
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,发现更多精彩内容 >>
提交
802b6db0
编写于
6月 27, 2017
作者:
M
Mark Simulacrum
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cleanup dist
上级
c6ece966
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
21 deletion
+11
-21
src/bootstrap/dist.rs
src/bootstrap/dist.rs
+11
-21
未找到文件。
src/bootstrap/dist.rs
浏览文件 @
802b6db0
...
...
@@ -97,7 +97,7 @@ pub fn docs(build: &Build, stage: u32, host: &str) {
}
fn
find_files
(
files
:
&
[
&
str
],
path
:
&
[
PathBuf
])
->
Vec
<
PathBuf
>
{
let
mut
found
=
Vec
::
new
(
);
let
mut
found
=
Vec
::
with_capacity
(
files
.len
()
);
for
file
in
files
{
let
file_path
=
...
...
@@ -119,17 +119,9 @@ fn make_win_dist(rust_root: &Path, plat_root: &Path, target_triple: &str, build:
//Ask gcc where it keeps its stuff
let
mut
cmd
=
Command
::
new
(
build
.cc
(
target_triple
));
cmd
.arg
(
"-print-search-dirs"
);
build
.run_quiet
(
&
mut
cmd
);
let
gcc_out
=
String
::
from_utf8
(
cmd
.output
()
.expect
(
"failed to execute gcc"
)
.stdout
)
.expect
(
"gcc.exe output was not utf8"
);
let
mut
bin_path
:
Vec
<
_
>
=
env
::
split_paths
(
&
env
::
var_os
(
"PATH"
)
.unwrap_or_default
())
.collect
();
let
gcc_out
=
output
(
&
mut
cmd
);
let
mut
bin_path
:
Vec
<
_
>
=
env
::
split_paths
(
&
env
::
var_os
(
"PATH"
)
.unwrap_or_default
())
.collect
();
let
mut
lib_path
=
Vec
::
new
();
for
line
in
gcc_out
.lines
()
{
...
...
@@ -140,7 +132,7 @@ fn make_win_dist(rust_root: &Path, plat_root: &Path, target_triple: &str, build:
line
[(
idx
+
1
)
..
]
.trim_left_matches
(
trim_chars
)
.split
(
';'
)
.map
(
|
s
|
PathBuf
::
from
(
s
)
);
.map
(
PathBuf
::
from
);
if
key
==
"programs"
{
bin_path
.extend
(
value
);
...
...
@@ -149,7 +141,7 @@ fn make_win_dist(rust_root: &Path, plat_root: &Path, target_triple: &str, build:
}
}
let
target_tools
=
vec!
[
"gcc.exe"
,
"ld.exe"
,
"ar.exe"
,
"dlltool.exe"
,
"libwinpthread-1.dll"
];
let
target_tools
=
[
"gcc.exe"
,
"ld.exe"
,
"ar.exe"
,
"dlltool.exe"
,
"libwinpthread-1.dll"
];
let
mut
rustc_dlls
=
vec!
[
"libstdc++-6.dll"
,
"libwinpthread-1.dll"
];
if
target_triple
.starts_with
(
"i686-"
)
{
rustc_dlls
.push
(
"libgcc_s_dw2-1.dll"
);
...
...
@@ -157,7 +149,7 @@ fn make_win_dist(rust_root: &Path, plat_root: &Path, target_triple: &str, build:
rustc_dlls
.push
(
"libgcc_s_seh-1.dll"
);
}
let
target_libs
=
vec!
[
//MinGW libs
let
target_libs
=
[
//MinGW libs
"libgcc.a"
,
"libgcc_eh.a"
,
"libgcc_s.a"
,
...
...
@@ -203,7 +195,7 @@ fn make_win_dist(rust_root: &Path, plat_root: &Path, target_triple: &str, build:
let
target_libs
=
find_files
(
&
target_libs
,
&
lib_path
);
fn
copy_to_folder
(
src
:
&
Path
,
dest_folder
:
&
Path
)
{
let
file_name
=
src
.file_name
()
.unwrap
()
.to_os_string
()
;
let
file_name
=
src
.file_name
()
.unwrap
();
let
dest
=
dest_folder
.join
(
file_name
);
copy
(
src
,
&
dest
);
}
...
...
@@ -234,8 +226,6 @@ fn copy_to_folder(src: &Path, dest_folder: &Path) {
///
/// This contains all the bits and pieces to run the MinGW Windows targets
/// without any extra installed software (e.g. we bundle gcc, libraries, etc).
/// Currently just shells out to a python script, but that should be rewritten
/// in Rust.
pub
fn
mingw
(
build
:
&
Build
,
host
:
&
str
)
{
println!
(
"Dist mingw ({})"
,
host
);
let
name
=
pkgname
(
build
,
"rust-mingw"
);
...
...
@@ -366,9 +356,9 @@ fn prepare_image(build: &Build, stage: u32, host: &str, image: &Path) {
pub
fn
debugger_scripts
(
build
:
&
Build
,
sysroot
:
&
Path
,
host
:
&
str
)
{
let
dst
=
sysroot
.join
(
"lib/rustlib/etc"
);
t!
(
fs
::
create_dir_all
(
&
dst
));
let
cp_debugger_script
=
|
file
:
&
str
|
{
let
dst
=
sysroot
.join
(
"lib/rustlib/etc"
);
t!
(
fs
::
create_dir_all
(
&
dst
));
install
(
&
build
.src
.join
(
"src/etc/"
)
.join
(
file
),
&
dst
,
0o644
);
};
if
host
.contains
(
"windows-msvc"
)
{
...
...
@@ -595,7 +585,7 @@ pub fn rust_src(build: &Build) {
t!
(
fs
::
remove_dir_all
(
&
image
));
}
const
CARGO_VENDOR_VERSION
:
&
'static
str
=
"0.1.4"
;
const
CARGO_VENDOR_VERSION
:
&
str
=
"0.1.4"
;
/// Creates the plain source tarball
pub
fn
plain_source_tarball
(
build
:
&
Build
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录