Skip to content

Commit 3b94f44

Browse files
committed
Revert "cargo install will ignore the target triple specified in a project directory"
This reverts commit 1bad991.
1 parent 9e4845e commit 3b94f44

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

src/bin/cargo/commands/install.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ continuous integration systems.",
7474
pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult {
7575
let mut compile_opts = args.compile_options(config, CompileMode::Build)?;
7676
compile_opts.build_config.release = !args.is_present("debug");
77-
// We override target architecture to host architecture since it may be
78-
// set to some other architecture in .cargo/config.
79-
compile_opts.build_config.requested_target = None;
8077

8178
let krates = args.values_of("crate")
8279
.unwrap_or_default()

tests/testsuite/install.rs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,35 +1606,3 @@ fn git_repo_replace() {
16061606
.contains(&format!("{}", new_rev))
16071607
);
16081608
}
1609-
1610-
#[test]
1611-
fn install_with_non_existent_target() {
1612-
pkg("bar", "0.0.1");
1613-
1614-
let p = project("foo")
1615-
.file(
1616-
"Cargo.toml",
1617-
r#"
1618-
[package]
1619-
name = "foo"
1620-
version = "0.1.0"
1621-
authors = []
1622-
"#,
1623-
)
1624-
.file(
1625-
".cargo/config",
1626-
r#"
1627-
[build]
1628-
target = "non-existing-target"
1629-
"#,
1630-
)
1631-
.file("src/main.rs", "fn main() {}")
1632-
.build();
1633-
1634-
assert_that(
1635-
cargo_process("install").arg("bar").cwd(p.root()),
1636-
execs().with_status(0),
1637-
);
1638-
assert_that(cargo_home(), has_installed_exe("bar"));
1639-
}
1640-

0 commit comments

Comments
 (0)