Skip to content

Commit 20815b5

Browse files
committed
Support configurations with the specific Rust version
1 parent abbad02 commit 20815b5

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rustc-llvm-proxy"
3-
version = "0.1.7"
3+
version = "0.1.8"
44
authors = ["Denys Zariaiev <[email protected]>"]
55
license = "MIT"
66

build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ fn main() {
2222
}
2323

2424
println!("cargo:rerun-if-changed=build.rs");
25-
println!("cargo:rerun-if-changed={}/llvm_gen.rs", out_dir);
2625

2726
llvm::Generator::default()
2827
.parse_llvm_sys_crate()

src/path.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,15 @@ fn collect_possible_paths() -> Result<Vec<PathBuf>, Error> {
123123
}
124124

125125
fn extract_arch(toolchain: &str) -> String {
126-
toolchain.split('-').skip(1).collect::<Vec<_>>().join("-")
126+
toolchain
127+
.split('-')
128+
// Skip `nightly` rust version prefix.
129+
.skip(1)
130+
// Also skip rust version specification if exists.
131+
.skip_while(|item| match item.chars().next() {
132+
None | Some('0'...'9') => true,
133+
_ => false,
134+
})
135+
.collect::<Vec<_>>()
136+
.join("-")
127137
}

0 commit comments

Comments
 (0)