diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef9413b31d..0ca2224f85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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. @@ -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. diff --git a/mk/check-symbol-prefixes.sh b/mk/check-symbol-prefixes.sh index ad67d74ec5..469ebb9db4 100755 --- a/mk/check-symbol-prefixes.sh +++ b/mk/check-symbol-prefixes.sh @@ -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.