@@ -6,7 +6,6 @@ use std::str;
66// need to know all the possible cfgs that this script will set. If you need to set another cfg
77// make sure to add it to this list as well.
88const ALLOWED_CFGS : & ' static [ & ' static str ] = & [
9- "emscripten_new_stat_abi" ,
109 "espidf_time32" ,
1110 "freebsd10" ,
1211 "freebsd11" ,
@@ -67,12 +66,6 @@ fn main() {
6766 _ => set_cfg ( "freebsd15" ) ,
6867 }
6968
70- match emcc_version_code ( ) {
71- Some ( v) if ( v >= 30142 ) => set_cfg ( "emscripten_new_stat_abi" ) ,
72- // Non-Emscripten or version < 3.1.42.
73- Some ( _) | None => ( ) ,
74- }
75-
7669 // On CI: deny all warnings
7770 if libc_ci {
7871 set_cfg ( "libc_deny_warnings" ) ;
@@ -212,28 +205,6 @@ fn which_freebsd() -> Option<i32> {
212205 }
213206}
214207
215- fn emcc_version_code ( ) -> Option < u64 > {
216- let output = std:: process:: Command :: new ( "emcc" )
217- . arg ( "-dumpversion" )
218- . output ( )
219- . ok ( ) ?;
220- if !output. status . success ( ) {
221- return None ;
222- }
223-
224- let version = String :: from_utf8 ( output. stdout ) . ok ( ) ?;
225-
226- // Some Emscripten versions come with `-git` attached, so split the
227- // version string also on the `-` char.
228- let mut pieces = version. trim ( ) . split ( [ '.' , '-' ] ) ;
229-
230- let major = pieces. next ( ) . and_then ( |x| x. parse ( ) . ok ( ) ) . unwrap_or ( 0 ) ;
231- let minor = pieces. next ( ) . and_then ( |x| x. parse ( ) . ok ( ) ) . unwrap_or ( 0 ) ;
232- let patch = pieces. next ( ) . and_then ( |x| x. parse ( ) . ok ( ) ) . unwrap_or ( 0 ) ;
233-
234- Some ( major * 10000 + minor * 100 + patch)
235- }
236-
237208fn set_cfg ( cfg : & str ) {
238209 if !ALLOWED_CFGS . contains ( & cfg) {
239210 panic ! ( "trying to set cfg {}, but it is not in ALLOWED_CFGS" , cfg) ;
0 commit comments