@@ -65,14 +65,21 @@ fn main() {
6565 //
6666 // On CI, we detect the actual FreeBSD version and match its ABI exactly,
6767 // running tests to ensure that the ABI is correct.
68- match which_freebsd ( ) {
69- Some ( 10 ) if libc_ci => set_cfg ( "freebsd10" ) ,
70- Some ( 11 ) if libc_ci => set_cfg ( "freebsd11" ) ,
71- Some ( 12 ) if libc_ci || rustc_dep_of_std => set_cfg ( "freebsd12" ) ,
72- Some ( 13 ) if libc_ci => set_cfg ( "freebsd13" ) ,
73- Some ( 14 ) if libc_ci => set_cfg ( "freebsd14" ) ,
74- Some ( 15 ) if libc_ci => set_cfg ( "freebsd15" ) ,
75- Some ( _) | None => set_cfg ( "freebsd11" ) ,
68+ let which_freebsd = if libc_ci {
69+ which_freebsd ( ) . unwrap_or ( 11 )
70+ } else if rustc_dep_of_std {
71+ 12
72+ } else {
73+ 11
74+ } ;
75+ match which_freebsd {
76+ x if x < 10 => panic ! ( "FreeBSD older than 10 is not supported" ) ,
77+ 10 => set_cfg ( "freebsd10" ) ,
78+ 11 => set_cfg ( "freebsd11" ) ,
79+ 12 => set_cfg ( "freebsd12" ) ,
80+ 13 => set_cfg ( "freebsd13" ) ,
81+ 14 => set_cfg ( "freebsd14" ) ,
82+ _ => set_cfg ( "freebsd15" ) ,
7683 }
7784
7885 match emcc_version_code ( ) {
0 commit comments