Note I also posted this on the runner-images
GitHub repo discussion forum.
I changed my GitHub Actions workflow, which runs on macOS 13, to specify Xcode 15.2. When I build my project locally I don’t get any changes in my Xcode project file. But when I run on GitHub Actions I always get the follow diffs in my project file.
- OTHER_LDFLAGS = "$(inherited)";
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-Wl",
+ "-ld_classic",
+ );
These seem to be related to a known issue with Xcode 15: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes — though I don’t see anything there suggesting it would modify the project file automatically.
Binaries using symbols with a weak definition crash at runtime on iOS 14/macOS 12 or older. This impacts primarily C++ projects due to their extensive use of weak symbols. (114813650) (FB13097713)
Workaround: Bump the minimum deployment target to iOS 15, macOS 12, watchOS 8 or tvOS 15, or add -Wl,-ld_classic to the OTHER_LDFLAGS build setting.
So I bumped the minimum deployment to iOS 16 and ran again, but it’s still making this change.
Of course, I don’t want any local changes to my repo when running a build, and I check to make sure the git repo is clean before running the build with Fastlane.
I don’t see anything specific about this in the Xcode 15.2 release notes
Does anyone know how to prevent this? Why is it only happening on GitHub Actions?
I don’t know if this problem is also occurring on GitHub Actions with Xcode 15.3 but that version of Xcode only runs on Sonoma and we’re not quite ready to make the switch yet.