Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
1dbc0442
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,发现更多精彩内容 >>
提交
1dbc0442
编写于
6月 17, 2011
作者:
R
Rafael Ávila de Espíndola
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Automatically add a -L to the directory the binary is in.
上级
982f51aa
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
7 deletion
+8
-7
Makefile.in
Makefile.in
+3
-3
src/comp/driver/rustc.rs
src/comp/driver/rustc.rs
+5
-4
未找到文件。
Makefile.in
浏览文件 @
1dbc0442
...
...
@@ -109,13 +109,13 @@ STAGE0 := $(Q)$(call CFG_RUN_TARG,stage0,\
stage0/rustc
$(X)
$(CFG_RUSTC_FLAGS)
-L
stage0
)
STAGE1
:=
$(Q)
$(
call
CFG_RUN_TARG,stage0,
\
$(CFG_VALGRIND_COMPILE)
stage1/rustc
$(X)
\
$(CFG_RUSTC_FLAGS)
-L
stage1
)
$(CFG_RUSTC_FLAGS)
)
STAGE2
:=
$(Q)
$(
call
CFG_RUN_TARG,stage1,
\
$(CFG_VALGRIND_COMPILE)
stage2/rustc
$(X)
\
$(CFG_RUSTC_FLAGS)
-L
stage2
)
$(CFG_RUSTC_FLAGS)
)
STAGE3
:=
$(Q)
$(
call
CFG_RUN_TARG,stage2,
\
$(CFG_VALGRIND_COMPILE)
stage3/rustc
$(X)
\
$(CFG_RUSTC_FLAGS)
-L
stage3
)
$(CFG_RUSTC_FLAGS)
)
# "Source" files we generate in builddir along the way.
GENERATED
:=
...
...
src/comp/driver/rustc.rs
浏览文件 @
1dbc0442
...
...
@@ -202,10 +202,11 @@ fn build_target_config() -> @session::config {
ret
target_cfg
;
}
fn
build_session_options
(
str
binary
,
getopts
::
match
match
)
->
fn
build_session_options
(
str
binary
,
getopts
::
match
match
,
str
binary_dir
)
->
@
session
::
options
{
auto
shared
=
opt_present
(
match
,
"shared"
);
auto
library_search_paths
=
getopts
::
opt_strs
(
match
,
"L"
);
auto
library_search_paths
=
[
binary_dir
];
library_search_paths
+=
getopts
::
opt_strs
(
match
,
"L"
);
auto
output_type
=
if
(
opt_present
(
match
,
"parse-only"
))
{
link
::
output_type_none
...
...
@@ -297,6 +298,7 @@ fn main(vec[str] args) {
optflag
(
"time-llvm-passes"
),
optflag
(
"no-typestate"
),
optflag
(
"noverify"
)];
auto
binary
=
vec
::
shift
[
str
](
args
);
auto
binary_dir
=
fs
::
dirname
(
binary
);
auto
match
=
alt
(
getopts
::
getopts
(
args
,
opts
))
{
case
(
getopts
::
success
(
?
m
))
{
m
}
...
...
@@ -313,7 +315,7 @@ fn main(vec[str] args) {
version
(
binary
);
ret
;
}
auto
sopts
=
build_session_options
(
binary
,
match
);
auto
sopts
=
build_session_options
(
binary
,
match
,
binary_dir
);
auto
sess
=
build_session
(
sopts
);
auto
n_inputs
=
vec
::
len
[
str
](
match
.free
);
auto
output_file
=
getopts
::
opt_maybe_str
(
match
,
"o"
);
...
...
@@ -391,7 +393,6 @@ fn main(vec[str] args) {
//
// TODO: Factor this out of main.
if
(
sopts
.output_type
==
link
::
output_type_exe
)
{
auto
binary_dir
=
fs
::
dirname
(
binary
);
let
str
glu
=
binary_dir
+
"/glue.o"
;
let
str
main
=
"rt/main.o"
;
let
str
stage
=
"-L"
+
binary_dir
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录