mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Moved RUSTC_LINKER test into its own fn
This commit is contained in:
parent
4628011e79
commit
3ebdc722c6
@ -151,8 +151,11 @@ fn custom_build_env_vars() {
|
|||||||
p.cargo("build").arg("--features").arg("bar_feat"),
|
p.cargo("build").arg("--features").arg("bar_feat"),
|
||||||
execs().with_status(0),
|
execs().with_status(0),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Test passing linker from .cargo/config to env var
|
|
||||||
|
#[test]
|
||||||
|
fn custom_build_env_var_rustc_linker() {
|
||||||
if cross_compile::disabled() { return; }
|
if cross_compile::disabled() { return; }
|
||||||
let target = cross_compile::alternate();
|
let target = cross_compile::alternate();
|
||||||
let p = project("foo")
|
let p = project("foo")
|
||||||
@ -181,7 +184,8 @@ fn custom_build_env_vars() {
|
|||||||
fn main() {
|
fn main() {
|
||||||
assert!(env::var("RUSTC_LINKER").unwrap().ends_with("/path/to/linker"));
|
assert!(env::var("RUSTC_LINKER").unwrap().ends_with("/path/to/linker"));
|
||||||
}
|
}
|
||||||
"#)
|
"#
|
||||||
|
)
|
||||||
.file("src/lib.rs", "")
|
.file("src/lib.rs", "")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user