Repository navigation
Conversation
CMake gives swiftc no -target, and swiftc links katago, so the binary's minimum macOS was the build machine's version instead of 13.0.
This branch has not been deployed
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.
I bundle a Metal build of KataGo in a small macOS app and noticed the binary needed macOS 26, the version of my build Mac, even though CMakeLists.txt sets
CMAKE_OSX_DEPLOYMENT_TARGETto 13.0.The C++ files do get
-mmacosx-version-min=13.0, but CMake passes nothing to swiftc, and swiftc is what linkskatago, so it falls back to the host's version. Passing-DCMAKE_OSX_DEPLOYMENT_TARGET=13.0on the command line doesn't help either.This adds
-target <arch>-apple-macosx13.0to the Swift flags, unless a-targetis already inCMAKE_Swift_FLAGS.Tested on Apple Silicon only (M2 Max, macOS 26.6.2, Xcode 27.0, CMake 4.4.3), checking
minoswithotool -l katago:-DCMAKE_Swift_FLAGS="-target arm64-apple-macosx14.0": 14.0The 13.0 build runs fine (
katago versionreports the Metal backend, andkatago benchmarkworks).