ci/mac: don't apply werror to the linker for the oldest target - #18410
Open
feldgendler wants to merge 1 commit into
Open
ci/mac: don't apply werror to the linker for the oldest target#18410feldgendler wants to merge 1 commit into
feldgendler wants to merge 1 commit into
Conversation
Homebrew's libraries are built for the macOS version of the runner, so ld warns for every one of them when the oldest target job builds with a deployment target of 10.15. Those warnings have always been there, but meson 1.12 started passing -Wl,-fatal_warnings along with werror, which turns them into link errors and takes down the whole macOS matrix. Apply werror to the compilers only, which is what the job is after.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The macOS jobs have been failing since 13 August. In the
-target arm64-apple-macosx10.15job,libmpv.2.dylibandmpvboth fail to link withld: fatal warning(s) induced error (-fatal_warnings), and the matrix's fail-fast then cancels the other macOS jobs, so the whole build workflow is red on master.Two things combine. Homebrew's libraries are built for the macOS version of the runner, so everything under
/opt/homebrewcurrently hasminos 26.0, and building withMACOSX_DEPLOYMENT_TARGET=10.15(clang clamps it to 11.0 on arm64) makes ld warn once for every library it links against. That part is not new: the last green run printed 82 of those warnings and passed. What changed is meson 1.12, released three days before the first failure, which put the linker under werror:On Apple that is
-Wl,-fatal_warnings, so the warnings that were always there became errors. In 1.11.2 the linker only got werror under b_lto.ld offers no way to demote just this warning:
-whides the text but the warnings still count as fatal, and-no_fatal_warningsand-no_warn_platform_mismatchare not options in ld-1267. So this takes werror off the linker and passes-Werrorto the compilers by hand, which is what meson did before 1.12. Only the job that sets a deployment target is affected; the other four macOS jobs keep--werroras it is.Checked on macOS 26.6 with Xcode 26.6, meson 1.12.0 and current Homebrew, which is what the runner has: with the deployment target exported the build fails the same way CI does, and with this change it compiles, links and runs, with the binary still at minos 11.0 and the mismatch warnings printed but harmless. Feature detection is unaffected — the configure summary is identical apart from the option lines.
Dropping
MACOSX_DEPLOYMENT_TARGETfrom the matrix entry links cleanly as well, since the Swift target is a separate flag, but it stops building the C and ObjC code for the old target, which seemed the wrong half to give up.Written with AI assistance, and reviewed with AI tooling. I take full responsibility for the code: I understand what it changes and why, I have tested it myself, I will respond to review in my own words, and it can be submitted under the same license as the files it touches.