Skip to content

Commit 92fe0b2

Browse files
committed
Update comments
1 parent 776c163 commit 92fe0b2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

build.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ fn main() {
249249
// (Since Rust 1.78, Windows (except Windows 7) targets also enable CMPXCHG16B, but
250250
// this branch is only used on pre-1.69 that cmpxchg16b_target_feature is unstable.)
251251
// Script to get builtin targets that support CMPXCHG16B by default:
252-
// $ (for target in $(rustc --print target-list | grep -E '^x86_64'); do rustc --print cfg --target "${target}" | grep -Fq '"cmpxchg16b"' && printf '%s\n' "${target}"; done)
252+
// $ (for target in $(rustc -Z unstable-options --print all-target-specs-json | jq -r '. | to_entries[] | if .value.arch == "x86_64" then .key else empty end'); do rustc --print cfg --target "${target}" | grep -Fq '"cmpxchg16b"' && printf '%s\n' "${target}"; done)
253253
let is_apple = env::var("CARGO_CFG_TARGET_VENDOR").unwrap_or_default() == "apple";
254254
let cmpxchg16b = is_apple;
255255
// LLVM recognizes this also as cx16 target feature: https://godbolt.org/z/KM3jz616j
@@ -271,8 +271,8 @@ fn main() {
271271
// https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/AArch64/AArch64Processors.td#L1203
272272
// https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/AArch64/AArch64Processors.td#L865
273273
// Script to get builtin targets that support FEAT_LSE/FEAT_LSE2 by default:
274-
// $ (for target in $(rustc --print target-list | grep -E '^aarch64|^arm64'); do rustc --print cfg --target "${target}" | grep -Fq '"lse"' && printf '%s\n' "${target}"; done)
275-
// $ (for target in $(rustc --print target-list | grep -E '^aarch64|^arm64'); do rustc --print cfg --target "${target}" | grep -Fq '"lse2"' && printf '%s\n' "${target}"; done)
274+
// $ (for target in $(rustc -Z unstable-options --print all-target-specs-json | jq -r '. | to_entries[] | if .value.arch == "aarch64" or .value.arch == "arm64ec" then .key else empty end'); do rustc --print cfg --target "${target}" | grep -Fq '"lse"' && printf '%s\n' "${target}"; done)
275+
// $ (for target in $(rustc -Z unstable-options --print all-target-specs-json | jq -r '. | to_entries[] | if .value.arch == "aarch64" or .value.arch == "arm64ec" then .key else empty end'); do rustc --print cfg --target "${target}" | grep -Fq '"lse2"' && printf '%s\n' "${target}"; done)
276276
let is_macos = target_os == "macos";
277277
let mut lse = is_macos;
278278
target_feature_fallback("lse2", is_macos);

tools/no-std.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cd -- "$(dirname -- "$0")"/..
99
# USAGE:
1010
# ./tools/no-std.sh [+toolchain] [target]...
1111

12+
# rustc -Z unstable-options --print all-target-specs-json | jq -r '. | to_entries[] | if .value.os then empty else .key end'
1213
default_targets=(
1314
# arm
1415
# v4T

0 commit comments

Comments
 (0)