Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,19 @@ jobs:
archive: zip
runs-on: ${{ matrix.os }}
env:
# Cleared for the same reason `plan-mutants` clears it: the workflow-wide
# value is `-Clink-arg=-fuse-ld=mold`, and only the Linux jobs that
# install mold can honor it. Two of these three runners cannot have mold
# at all, and MSVC hands the flag to `link.exe`, which dies with LNK1117.
# Release builds happen once per push rather than once per mutant, so the
# linker that is present everywhere is the right trade.
RUSTFLAGS: ${{ matrix.target == 'x86_64-pc-windows-msvc' && '-C target-feature=+crt-static' || '' }}
# Override the workflow-wide Linux-only mold flag with the
# platform-specific flags required by each release target. Neither
# non-Linux runner can use mold, and MSVC hands -fuse-ld=mold to link.exe,
# which fails with LNK1117. Releases build once per push rather than once
# per mutant, so using the platform's default linker is the right trade.
#
# Even an empty RUSTFLAGS overrides .cargo/config.toml, so Apple targets
# must repeat -ObjC here or the linker omits WebRTC's NSString categories
# and the first room aborts.
RUSTFLAGS: >-

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing in this workflow proves the flag reached the linker. A build without -ObjC still links cleanly, so the next edit to this expression republishes a macOS binary that aborts at the first room, and the build job is skipped on pull requests (it ran as skipping here), so the regression surfaces in a user's download rather than in CI. Worth a follow-up next to the Linux floor checks that already guard that leg: a macOS-only step before packaging that greps otool -oV on the built binary for stringForAbslStringView:.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out. I added the check to the macOS build before packaging and tested it against both binaries.
The old binary still contains the selector reference, so a plain grep would pass it too. The check matches the method entry in otool output, which catches the old crashing release and lets the fixed one through.

${{ matrix.target == 'x86_64-pc-windows-msvc' && '-C target-feature=+crt-static'
|| contains(matrix.target, '-apple-') && '-Clink-arg=-ObjC'
|| '' }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -643,6 +649,18 @@ jobs:
--env CARGO_HOME=/cargo \
${{ matrix.image }} \
cargo build --release --locked --target ${{ matrix.target }}
# A successful link does not prove the Objective-C categories survived.
# The selector reference remains even when its implementation is absent,
# so match a method name entry rather than any occurrence of the selector.
- name: Verify macOS WebRTC linkage
if: runner.os == 'macOS'
shell: bash
run: |
binary=target/${{ matrix.target }}/release/codetrial
# Collect the output so grep cannot give otool SIGPIPE under pipefail.
objc=$(otool -oV "$binary")
grep -Eq '^[[:space:]]*name[[:space:]].*[[:space:]]stringForAbslStringView:$' <<< "$objc" \
|| { echo 'WebRTC NSString category is missing' >&2; exit 1; }
# Two libraries set the floor, not one. The C++ half of this build links
# libstdc++, so a newer compiler raises the GLIBCXX_ requirement whether
# or not it touches GLIBC_, and a binary refused for either reason is
Expand Down