@@ -225,7 +225,11 @@ fn main() {
225
225
ts. push ( "features" , features) ;
226
226
ts. push ( "llvm-target" , "x86_64-linux-gnu" ) ;
227
227
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
+ }
229
233
} else if cfg. has ( "X86_32" ) {
230
234
// This only works on UML, as i386 otherwise needs regparm support in rustc
231
235
if !cfg. has ( "UML" ) {
@@ -245,7 +249,11 @@ fn main() {
245
249
}
246
250
ts. push ( "features" , features) ;
247
251
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
+ }
249
257
} else if cfg. has ( "LOONGARCH" ) {
250
258
panic ! ( "loongarch uses the builtin rustc loongarch64-unknown-none-softfloat target" ) ;
251
259
} else {
0 commit comments