Skip to content

Commit

Permalink
CI: mk/check-symbol-prefixes.sh: Use llvm-tools-preview llvm-nm.
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed Jan 14, 2024
1 parent 47eef65 commit 32b186d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,16 @@ jobs:
# Unknown attribute kind (528)
# (Producer: 'LLVM12.0.0-rust-1.54.0-nightly'
# Reader: 'LLVM APPLE_1_1200.0.32.29_0')

- if: ${{ matrix.target != 'aarch64-apple-ios' &&
!contains(matrix.host_os, 'windows') &&
(!contains(matrix.host_os, 'macos') || matrix.mode != '--release') }}
- run: rustup toolchain install --component=llvm-tools-preview ${{ matrix.rust_channel }}

- if: ${{ matrix.target != 'aarch64-apple-ios' &&
!contains(matrix.host_os, 'windows') &&
(!contains(matrix.host_os, 'macos') || matrix.mode != '--release') }}
run: mk/check-symbol-prefixes.sh --target=${{ matrix.target }}
run: mk/check-symbol-prefixes.sh +${{ matrix.rust_channel }} --target=${{ matrix.target }}

test-bench:
# Don't run duplicate `push` jobs for the repo owner's PRs.
Expand Down Expand Up @@ -464,7 +470,8 @@ jobs:
# Check that all the needed symbol renaming was done.
# TODO: Do this check on Windows too.
- run: mk/check-symbol-prefixes.sh --target=${{ matrix.target }}
- run: rustup toolchain install --component=llvm-tools-preview ${{ matrix.rust_channel }}
- run: mk/check-symbol-prefixes.sh +${{ matrix.rust_channel }} --target=${{ matrix.target }}

coverage:
# Don't run duplicate `push` jobs for the repo owner's PRs.
Expand Down
14 changes: 5 additions & 9 deletions mk/check-symbol-prefixes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,16 @@ for arg in $*; do
--target=*)
target=${arg#*=}
;;
+*)
toolchain=${arg#*+}
;;
*)
;;
esac
done

case "$OSTYPE" in
darwin*)
nm_exe=nm
;;
*)
llvm_version=16
nm_exe=llvm-nm-$llvm_version
;;
esac
# Use the host target-libdir, not the target target-libdir.
nm_exe=$(rustc +${toolchain} --print target-libdir)/../bin/llvm-nm

# TODO: This should only look in one target directory.
# TODO: This isn't as strict as it should be.
Expand Down

0 comments on commit 32b186d

Please sign in to comment.