Skip to content

Commit c5a7aad

Browse files
Merge #128
128: correctly take unstable-features r=adamgreig a=Emilgardis fixes #127 Co-authored-by: Emil Gardström <[email protected]>
2 parents 3610273 + 03abbf3 commit c5a7aad

File tree

7 files changed

+36
-28
lines changed

7 files changed

+36
-28
lines changed

.github/bors.toml

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
block_labels = ["needs-decision"]
22
delete_merged_branches = true
33
required_approvals = 1
4-
status = [
5-
"ci (1.46.0, ubuntu-latest, false)",
6-
"ci (1.46.0, macos-latest, false)",
7-
"ci (1.46.0, windows-latest, false)",
8-
"ci (stable, ubuntu-latest, false)",
9-
"ci (stable, macos-latest, false)",
10-
"ci (stable, windows-latest, false)",
11-
]
4+
status = ["conclusion"]

.github/workflows/ci.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
rust:
15+
rust:
1616
# MSRV
17-
- 1.46.0
17+
- 1.60.0
1818
- stable
1919
os: [ubuntu-latest, macos-latest, windows-latest]
2020
experimental: [false]
@@ -69,3 +69,9 @@ jobs:
6969
with:
7070
command: strip
7171
args: --bin cargo-strip -v
72+
conclusion:
73+
runs-on: ubuntu-latest
74+
needs: ci
75+
steps:
76+
- name: Result
77+
run: exit 0

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- MSRV Changed to 1.60
13+
- Bump `rust-cfg` to 0.5 and `cargo_metadata` to 0.15
14+
15+
### Fixed
16+
17+
- Fixed incorrect parsing of `-Z` flags causing them to not be considered (#128)
18+
1019
## [v0.3.6] - 2022-06-20
1120

1221
### Added

Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ repository = "https://github.com/rust-embedded/cargo-binutils/"
1515
version = "0.3.6"
1616

1717
[dependencies]
18-
cargo_metadata = "0.14"
19-
clap = "2.33"
20-
regex = "1.5.5"
21-
rustc-cfg = "0.4"
18+
cargo_metadata = "0.15"
19+
clap = "2.34"
20+
regex = "1.5"
21+
rustc-cfg = "0.5"
2222
rustc-demangle = "0.1"
2323
rustc_version = "0.4"
2424
serde = "1.0"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ linker = "rust-lld"
209209

210210
## Minimum Supported Rust Version (MSRV)
211211

212-
This crate is guaranteed to compile on stable Rust 1.46.0 and up. It *might*
212+
This crate is guaranteed to compile on stable Rust 1.60.0 and up. It *might*
213213
compile with older versions but that may change in any new patch release.
214214

215215
## License

src/lib.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl Context {
100100
}
101101

102102
fn from_target_name(target_name: &str) -> Result<Self> {
103-
let cfg = Cfg::of(target_name).map_err(|e| e.compat())?;
103+
let cfg = Cfg::of(target_name)?;
104104

105105
Ok(Context {
106106
cfg,
@@ -324,7 +324,7 @@ pub fn run(tool: Tool, matches: ArgMatches) -> Result<i32> {
324324
if arch_name == "thumb" {
325325
// `-arch-name=thumb` doesn't produce the right output so instead we pass
326326
// `-triple=$target`, which contains more information about the target
327-
lltool.args(&["--triple", &ctxt.target]);
327+
lltool.args(["--triple", &ctxt.target]);
328328
} else {
329329
lltool.args(&[format!("--arch-name={}", arch_name)]);
330330
}
@@ -391,7 +391,7 @@ pub fn run(tool: Tool, matches: ArgMatches) -> Result<i32> {
391391
Tool::Size => postprocess::size(&output.stdout),
392392
};
393393

394-
stdout.write_all(&*processed_output)?;
394+
stdout.write_all(&processed_output)?;
395395

396396
if output.status.success() {
397397
Ok(0)
@@ -474,19 +474,19 @@ fn cargo_build_args<'a>(matches: &'a ArgMatches<'a>, cargo: &mut Command) -> (Bu
474474
}
475475

476476
let build_type = if matches.is_present("lib") {
477-
cargo.args(&["--lib"]);
477+
cargo.args(["--lib"]);
478478
BuildType::Lib
479479
} else if let Some(bin_name) = matches.value_of("bin") {
480-
cargo.args(&["--bin", bin_name]);
480+
cargo.args(["--bin", bin_name]);
481481
BuildType::Bin(bin_name)
482482
} else if let Some(example_name) = matches.value_of("example") {
483-
cargo.args(&["--example", example_name]);
483+
cargo.args(["--example", example_name]);
484484
BuildType::Example(example_name)
485485
} else if let Some(test_name) = matches.value_of("test") {
486-
cargo.args(&["--test", test_name]);
486+
cargo.args(["--test", test_name]);
487487
BuildType::Test(test_name)
488488
} else if let Some(bench_name) = matches.value_of("bench") {
489-
cargo.args(&["--bench", bench_name]);
489+
cargo.args(["--bench", bench_name]);
490490
BuildType::Bench(bench_name)
491491
} else {
492492
BuildType::Any
@@ -503,7 +503,7 @@ fn cargo_build_args<'a>(matches: &'a ArgMatches<'a>, cargo: &mut Command) -> (Bu
503503

504504
if let Some(features) = matches.values_of("features") {
505505
for feature in features {
506-
cargo.args(&["--features", feature]);
506+
cargo.args(["--features", feature]);
507507
}
508508
}
509509
if matches.is_present("no-default-features") {
@@ -516,7 +516,7 @@ fn cargo_build_args<'a>(matches: &'a ArgMatches<'a>, cargo: &mut Command) -> (Bu
516516
// NOTE we do *not* use `project.target()` here because Cargo will figure things out on
517517
// its own (i.e. it will search and parse .cargo/config, etc.)
518518
if let Some(target) = matches.value_of("target") {
519-
cargo.args(&["--target", target]);
519+
cargo.args(["--target", target]);
520520
}
521521

522522
let verbose = matches.occurrences_of("verbose");
@@ -541,9 +541,9 @@ fn cargo_build_args<'a>(matches: &'a ArgMatches<'a>, cargo: &mut Command) -> (Bu
541541
cargo.arg("--offline");
542542
}
543543

544-
if let Some(unstable_features) = matches.values_of("Z") {
544+
if let Some(unstable_features) = matches.values_of("unstable-features") {
545545
for unstable_feature in unstable_features {
546-
cargo.args(&["-Z", unstable_feature]);
546+
cargo.args(["-Z", unstable_feature]);
547547
}
548548
}
549549

src/tool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use anyhow::Result;
77

88
use crate::rustc::rustlib;
99

10-
#[derive(Clone, Copy, PartialEq)]
10+
#[derive(Clone, Copy, PartialEq, Eq)]
1111
pub enum Tool {
1212
Ar,
1313
Cov,

0 commit comments

Comments
 (0)