File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ impl std::error::Error for WasiLibc377Bug {}
5555fn parse_clang_version ( ver : & str ) -> Option < ( u16 , u16 , u16 ) > {
5656 // Strip optional trailing detail after space
5757 let ver = ver. split ( ' ' ) . next ( ) . unwrap ( ) ;
58+ // Strip optional -wasi-sdk suffix
59+ let ver = ver. strip_suffix ( "-wasi-sdk" ) . unwrap_or ( ver) ;
5860 let mut parts = ver. split ( '.' ) ;
5961 let major = parts. next ( ) ?. parse ( ) . ok ( ) ?;
6062 let minor = parts. next ( ) ?. parse ( ) . ok ( ) ?;
@@ -82,6 +84,10 @@ mod tests {
8284 r#"(module (@producers (processed-by "clang" "15.0.7")))"# ,
8385 true ,
8486 ) ,
87+ (
88+ r#"(module (@producers (processed-by "clang" "18.1.2-wasi-sdk (https://github.com/llvm/llvm-project 26a1d6601d727a96f4301d0d8647b5a42760ae0c)")))"# ,
89+ true ,
90+ ) ,
8591 (
8692 r#"(module (@producers (processed-by "clang" "15.0.6")))"# ,
8793 false ,
You can’t perform that action at this time.
0 commit comments