Skip to content

Commit f226ed3

Browse files
committed
codegen: Use --print all-target-specs-json
1 parent 4491dd0 commit f226ed3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/target_spec.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ utils_file="src/gen/utils.rs"
1717
mkdir -p "$(dirname "${utils_file}")"
1818

1919
known_64_bit_arch=()
20-
for target in $(rustc --print target-list); do
21-
target_spec=$(rustc --print target-spec-json -Z unstable-options --target "${target}")
20+
for target_spec in $(rustc -Z unstable-options --print all-target-specs-json | jq -c '. | to_entries | .[].value'); do
2221
arch="$(jq <<<"${target_spec}" -r '.arch')"
2322
if [[ "$(jq <<<"${target_spec}" -r '."target-pointer-width"')" == "64" ]]; then
2423
known_64_bit_arch+=("${arch}")

0 commit comments

Comments
 (0)