@@ -223,7 +223,11 @@ fn main() {
223
223
ts. push ( "features" , features) ;
224
224
ts. push ( "llvm-target" , "x86_64-linux-gnu" ) ;
225
225
ts. push ( "supported-sanitizers" , [ "kcfi" , "kernel-address" ] ) ;
226
- ts. push ( "target-pointer-width" , "64" ) ;
226
+ if cfg. rustc_version_atleast ( 1 , 91 , 0 ) {
227
+ ts. push ( "target-pointer-width" , 64 ) ;
228
+ } else {
229
+ ts. push ( "target-pointer-width" , "64" ) ;
230
+ }
227
231
} else if cfg. has ( "X86_32" ) {
228
232
// This only works on UML, as i386 otherwise needs regparm support in rustc
229
233
if !cfg. has ( "UML" ) {
@@ -243,7 +247,11 @@ fn main() {
243
247
}
244
248
ts. push ( "features" , features) ;
245
249
ts. push ( "llvm-target" , "i386-unknown-linux-gnu" ) ;
246
- ts. push ( "target-pointer-width" , "32" ) ;
250
+ if cfg. rustc_version_atleast ( 1 , 91 , 0 ) {
251
+ ts. push ( "target-pointer-width" , 32 ) ;
252
+ } else {
253
+ ts. push ( "target-pointer-width" , "32" ) ;
254
+ }
247
255
} else if cfg. has ( "LOONGARCH" ) {
248
256
panic ! ( "loongarch uses the builtin rustc loongarch64-unknown-none-softfloat target" ) ;
249
257
} else {
0 commit comments