File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " aya-rustc-llvm-proxy"
3
- version = " 0.9.1 "
3
+ version = " 0.9.2 "
4
4
authors = [
" Alessandro Decina <[email protected] >" ]
5
5
description = " Dynamically proxy LLVM calls into Rust own shared library"
6
6
license = " MIT"
@@ -24,4 +24,5 @@ anyhow = "1.0.72"
24
24
cargo_metadata = " 0.18.0"
25
25
prettyplease = " 0.2.10"
26
26
quote = " 1.0.29"
27
+ rustversion = " 1.0"
27
28
syn = { version = " 2.0.26" , features = [" full" ] }
Original file line number Diff line number Diff line change @@ -59,6 +59,14 @@ mod llvm {
59
59
60
60
impl Generator {
61
61
pub fn parse_llvm_sys_crate ( & mut self ) -> Result < & mut Self , Error > {
62
+ // See https://github.com/rust-lang/cargo/pull/12783.
63
+
64
+ #[ rustversion:: before( 1.79 ) ]
65
+ const LLVM_SYS_CRATE_TARGET : & str = "llvm-sys" ;
66
+
67
+ #[ rustversion:: since( 1.79 ) ]
68
+ const LLVM_SYS_CRATE_TARGET : & str = "llvm_sys" ;
69
+
62
70
let metadata = MetadataCommand :: new ( )
63
71
. exec ( )
64
72
. context ( "Unable to get crate metadata" ) ?;
@@ -72,7 +80,7 @@ mod llvm {
72
80
targets
73
81
. into_iter ( )
74
82
. find_map ( |Target { name, src_path, .. } | {
75
- ( name == "llvm-sys" ) . then_some ( src_path)
83
+ ( name == LLVM_SYS_CRATE_TARGET ) . then_some ( src_path)
76
84
} )
77
85
} )
78
86
. flatten ( )
You can’t perform that action at this time.
0 commit comments