Skip to content

Commit c1eccfe

Browse files
committed
tools: --check-cfg has been stabilized
rust-lang/rust#123501
1 parent 9fc9a49 commit c1eccfe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/build.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,13 @@ nightly=''
194194
if [[ "${rustc_version}" == *"nightly"* ]] || [[ "${rustc_version}" == *"dev"* ]]; then
195195
nightly=1
196196
rustup ${pre_args[@]+"${pre_args[@]}"} component add rust-src &>/dev/null
197-
# The latest syntax of -Z check-cfg requires 1.75.0-nightly.
197+
# The latest syntax of cargo -Z check-cfg requires 1.75.0-nightly.
198+
# rustc --check-cfg has been stabilized in 1.79.
198199
# We only check this on the recent nightly to avoid old clippy bugs.
199200
# shellcheck disable=SC2207
200201
if [[ "${rustc_minor_version}" -ge 79 ]]; then
201202
build_scripts=(build.rs)
202-
check_cfg='-Z unstable-options --check-cfg=cfg(target_pointer_width,values("128")) --check-cfg=cfg(target_arch,values("xtensa")) --check-cfg=cfg(target_feature,values("x87","lse2","lse128","rcpc3","v8m","partword-atomics","quadword-atomics","fast-serialization"))'
203+
check_cfg='--check-cfg=cfg(target_pointer_width,values("128")) --check-cfg=cfg(target_arch,values("xtensa")) --check-cfg=cfg(target_feature,values("x87","lse2","lse128","rcpc3","v8m","partword-atomics","quadword-atomics","fast-serialization"))'
203204
known_cfgs+=($(grep -E 'cargo:rustc-cfg=' "${build_scripts[@]}" | sed -E 's/^.*cargo:rustc-cfg=//; s/(=\\)?".*$//' | LC_ALL=C sort -u))
204205
# TODO: handle multi-line target_feature_if
205206
known_target_feature_values+=($(grep -E 'target_feature_if\("' "${build_scripts[@]}" | sed -E 's/^.*target_feature_if\(//; s/",.*$/"/' | LC_ALL=C sort -u))

0 commit comments

Comments
 (0)