@@ -225,7 +225,11 @@ fn main() {
225225 ts. push ( "features" , features) ;
226226 ts. push ( "llvm-target" , "x86_64-linux-gnu" ) ;
227227 ts. push ( "supported-sanitizers" , [ "kcfi" , "kernel-address" ] ) ;
228- ts. push ( "target-pointer-width" , "64" ) ;
228+ if cfg. rustc_version_atleast ( 1 , 91 , 0 ) {
229+ ts. push ( "target-pointer-width" , 64 ) ;
230+ } else {
231+ ts. push ( "target-pointer-width" , "64" ) ;
232+ }
229233 } else if cfg. has ( "X86_32" ) {
230234 // This only works on UML, as i386 otherwise needs regparm support in rustc
231235 if !cfg. has ( "UML" ) {
@@ -245,7 +249,11 @@ fn main() {
245249 }
246250 ts. push ( "features" , features) ;
247251 ts. push ( "llvm-target" , "i386-unknown-linux-gnu" ) ;
248- ts. push ( "target-pointer-width" , "32" ) ;
252+ if cfg. rustc_version_atleast ( 1 , 91 , 0 ) {
253+ ts. push ( "target-pointer-width" , 32 ) ;
254+ } else {
255+ ts. push ( "target-pointer-width" , "32" ) ;
256+ }
249257 } else if cfg. has ( "LOONGARCH" ) {
250258 panic ! ( "loongarch uses the builtin rustc loongarch64-unknown-none-softfloat target" ) ;
251259 } else {
0 commit comments