From 56397a1d3d86b1eeb2a0bfb56dabf48362c1aaff Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 28 Feb 2023 22:32:48 +0900 Subject: [PATCH] Handle min-atomic-width in no_atomic.sh --- ci/no_atomic.sh | 5 +++++ no_atomic.rs | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ci/no_atomic.sh b/ci/no_atomic.sh index 232140f63..186b8bcce 100755 --- a/ci/no_atomic.sh +++ b/ci/no_atomic.sh @@ -18,6 +18,7 @@ for target in $(rustc --print target-list); do res=$(jq <<<"${target_spec}" -r 'select(."atomic-cas" == false)') [[ -z "${res}" ]] || no_atomic_cas+=("${target}") max_atomic_width=$(jq <<<"${target_spec}" -r '."max-atomic-width"') + min_atomic_width=$(jq <<<"${target_spec}" -r '."min-atomic-width"') case "${max_atomic_width}" in # It is not clear exactly what `"max-atomic-width" == null` means, but they # actually seem to have the same max-atomic-width as the target-pointer-width. @@ -35,6 +36,10 @@ for target in $(rustc --print target-list); do # There is no `"max-atomic-width" == 16` or `"max-atomic-width" == 8` targets. *) exit 1 ;; esac + case "${min_atomic_width}" in + 8 | null) ;; + *) no_atomic+=("${target}") ;; + esac done cat >"${file}" <