Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
dd7f00de
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,发现更多精彩内容 >>
提交
dd7f00de
编写于
10月 02, 2014
作者:
B
bors
浏览文件
操作
浏览文件
下载
差异文件
auto merge of #17681 : jgallagher/rust/dep-info-escape-spaces, r=alexcrichton
cc #17627
上级
07b2c1be
2883b768
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
82 addition
and
7 deletion
+82
-7
mk/tests.mk
mk/tests.mk
+7
-6
src/librustc/driver/driver.rs
src/librustc/driver/driver.rs
+7
-1
src/test/run-make/dep-info-spaces/Makefile
src/test/run-make/dep-info-spaces/Makefile
+25
-0
src/test/run-make/dep-info-spaces/Makefile.foo
src/test/run-make/dep-info-spaces/Makefile.foo
+7
-0
src/test/run-make/dep-info-spaces/bar.rs
src/test/run-make/dep-info-spaces/bar.rs
+11
-0
src/test/run-make/dep-info-spaces/foo foo.rs
src/test/run-make/dep-info-spaces/foo foo.rs
+11
-0
src/test/run-make/dep-info-spaces/lib.rs
src/test/run-make/dep-info-spaces/lib.rs
+14
-0
未找到文件。
mk/tests.mk
浏览文件 @
dd7f00de
...
...
@@ -261,12 +261,13 @@ ALL_HS := $(filter-out $(S)src/rt/valgrind/valgrind.h \
tidy
:
@
$(
call
E, check: formatting
)
$(Q)
find
$(S)
src
-name
'*.r[sc]'
\
|
grep
'^
$(S)
src/jemalloc'
-v
\
|
grep
'^
$(S)
src/libuv'
-v
\
|
grep
'^
$(S)
src/llvm'
-v
\
|
grep
'^
$(S)
src/gyp'
-v
\
|
grep
'^
$(S)
src/libbacktrace'
-v
\
| xargs
-n
10
$(CFG_PYTHON)
$(S)
src/etc/tidy.py
-and
-not
-regex
'^
$(S)
src/jemalloc.*'
\
-and
-not
-regex
'^
$(S)
src/libuv.*'
\
-and
-not
-regex
'^
$(S)
src/llvm.*'
\
-and
-not
-regex
'^
$(S)
src/gyp.*'
\
-and
-not
-regex
'^
$(S)
src/libbacktrace.*'
\
-print0
\
| xargs
-0
-n
10
$(CFG_PYTHON)
$(S)
src/etc/tidy.py
$(Q)
find
$(S)
src/etc
-name
'*.py'
\
| xargs
-n
10
$(CFG_PYTHON)
$(S)
src/etc/tidy.py
$(Q)
find
$(S)
src/doc
-name
'*.js'
\
...
...
src/librustc/driver/driver.rs
浏览文件 @
dd7f00de
...
...
@@ -616,6 +616,12 @@ pub fn stop_after_phase_5(sess: &Session) -> bool {
return
false
;
}
fn
escape_dep_filename
(
filename
:
&
str
)
->
String
{
// Apparently clang and gcc *only* escape spaces:
// http://llvm.org/klaus/clang/commit/9d50634cfc268ecc9a7250226dd5ca0e945240d4
filename
.replace
(
" "
,
"
\\
"
)
}
fn
write_out_deps
(
sess
:
&
Session
,
input
:
&
Input
,
outputs
:
&
OutputFilenames
,
...
...
@@ -659,7 +665,7 @@ fn write_out_deps(sess: &Session,
// write Makefile-compatible dependency rules
let
files
:
Vec
<
String
>
=
sess
.codemap
()
.files
.borrow
()
.iter
()
.filter
(|
fmap
|
fmap
.is_real_file
())
.map
(|
fmap
|
fmap
.name
.to_string
(
))
.map
(|
fmap
|
escape_dep_filename
(
fmap
.name
.as_slice
()
))
.collect
();
let
mut
file
=
try!
(
io
::
File
::
create
(
&
deps_filename
));
for
path
in
out_filenames
.iter
()
{
...
...
src/test/run-make/dep-info-spaces/Makefile
0 → 100644
浏览文件 @
dd7f00de
-include
../tools.mk
# FIXME: ignore freebsd/windows
# (windows: see `../dep-info/Makefile`)
ifneq
($(shell uname),FreeBSD)
ifndef
IS_WINDOWS
all
:
$(RUSTC)
--dep-info
$(TMPDIR)
/custom-deps-file.d
--crate-type
=
lib lib.rs
sleep
1
touch
'foo foo.rs'
-
rm
-f
$(TMPDIR)
/done
$(MAKE)
-drf
Makefile.foo
rm
$(TMPDIR)
/done
pwd
$(MAKE)
-drf
Makefile.foo
rm
$(TMPDIR)
/done
&&
exit
1
||
exit
0
else
all
:
endif
else
all
:
endif
src/test/run-make/dep-info-spaces/Makefile.foo
0 → 100644
浏览文件 @
dd7f00de
LIB
:=
$(
shell
$(RUSTC)
--print-file-name
--crate-type
=
lib lib.rs
)
$(TMPDIR)/$(LIB)
:
$(RUSTC)
--dep-info
$(TMPDIR)
/custom-deps-file.d
--crate-type
=
lib lib.rs
touch
$(TMPDIR)
/done
-include
$(TMPDIR)/custom-deps-file.d
src/test/run-make/dep-info-spaces/bar.rs
0 → 100644
浏览文件 @
dd7f00de
// 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.
pub
fn
bar
()
{}
src/test/run-make/dep-info-spaces/foo foo.rs
0 → 100644
浏览文件 @
dd7f00de
// 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.
pub
fn
foo
()
{}
src/test/run-make/dep-info-spaces/lib.rs
0 → 100644
浏览文件 @
dd7f00de
// 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.
#[path=
"foo foo.rs"
]
pub
mod
foo
;
pub
mod
bar
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录