File tree 2 files changed +25
-4
lines changed
2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,8 @@ sparc64-unknown-linux-gnu \
95
95
sparcv9-sun-solaris \
96
96
wasm32-unknown-emscripten \
97
97
wasm32-unknown-unknown \
98
+ wasm32-wasip1 \
99
+ wasm32-wasip2 \
98
100
x86_64-linux-android \
99
101
x86_64-unknown-freebsd \
100
102
x86_64-unknown-linux-gnu \
@@ -227,12 +229,29 @@ else
227
229
no_dist_targets=" "
228
230
fi
229
231
232
+ case " $rust " in
233
+ " stable" ) supports_wasi_pn=1 ;;
234
+ " beta" ) supports_wasi_pn=1 ;;
235
+ " nightly" ) supports_wasi_pn=1 ;;
236
+ * ) supports_wasi_pn=0 ;;
237
+ esac
238
+
230
239
for target in $targets ; do
231
240
if echo " $target " | grep -q " $filter " ; then
232
241
if [ " $os " = " windows" ]; then
233
242
TARGET=" $target " ./ci/install-rust.sh
234
243
test_target " $target "
235
244
else
245
+ # `wasm32-wasip1` was renamed from `wasm32-wasi`
246
+ if [ " $target " = " wasm32-wasip1" ] && [ " $supports_wasi_pn " = " 0" ]; then
247
+ target=" wasm32-wasi"
248
+ fi
249
+
250
+ # `wasm32-wasip2` only exists in recent versions of Rust
251
+ if [ " $target " = " wasm32-wasip2" ] && [ " $supports_wasi_pn " = " 0" ]; then
252
+ continue
253
+ fi
254
+
236
255
test_target " $target "
237
256
fi
238
257
Original file line number Diff line number Diff line change @@ -384,15 +384,17 @@ cfg_if! {
384
384
} else {
385
385
// unsafe code here is required in the stable, but not in nightly
386
386
#[ allow( unused_unsafe) ]
387
- pub static CLOCK_MONOTONIC : clockid_t = clockid_t( core:: ptr:: addr_of!( _CLOCK_MONOTONIC) ) ;
387
+ pub static CLOCK_MONOTONIC : clockid_t =
388
+ unsafe { clockid_t( core:: ptr:: addr_of!( _CLOCK_MONOTONIC) ) } ;
388
389
#[ allow( unused_unsafe) ]
389
390
pub static CLOCK_PROCESS_CPUTIME_ID : clockid_t =
390
- clockid_t( core:: ptr:: addr_of!( _CLOCK_PROCESS_CPUTIME_ID) ) ;
391
+ unsafe { clockid_t( core:: ptr:: addr_of!( _CLOCK_PROCESS_CPUTIME_ID) ) } ;
391
392
#[ allow( unused_unsafe) ]
392
- pub static CLOCK_REALTIME : clockid_t = clockid_t( core:: ptr:: addr_of!( _CLOCK_REALTIME) ) ;
393
+ pub static CLOCK_REALTIME : clockid_t =
394
+ unsafe { clockid_t( core:: ptr:: addr_of!( _CLOCK_REALTIME) ) } ;
393
395
#[ allow( unused_unsafe) ]
394
396
pub static CLOCK_THREAD_CPUTIME_ID : clockid_t =
395
- clockid_t( core:: ptr:: addr_of!( _CLOCK_THREAD_CPUTIME_ID) ) ;
397
+ unsafe { clockid_t( core:: ptr:: addr_of!( _CLOCK_THREAD_CPUTIME_ID) ) } ;
396
398
}
397
399
}
398
400
You can’t perform that action at this time.
0 commit comments