Created by: tjwio
Background
It seems like Xcode 11.4 linker doesn't allow -sdk_version
and -platform_version
or -<platform>_version_min
flags to be passed together or it throws this warning:
ld: warning: -sdk_version and -platform_version are not compatible, ignoring -sdk_version
Couple of things worth noting:
- same flags passed in Xcode 11.3 and below doesn't throw this warning
- normal
xcodebuild
command doesn't pass-sdk_version
at all and seemingly only relies on-isysroot
and-platform_version
- I couldn't find any references on llvm's or apple's llvm-project related to
-sdk_version
, but did see this change for Xcode 11, passing the newplatform_version
by default so it might make sense that they're deprecating-sdk_version
usage in 11.4 https://reviews.llvm.org/D71579
Changes
Remove -sdk_version
from linker flags. It's seemingly not being used anymore and causing warnings with -platform_version
.
Notes
Mostly opening this PR to start the discussion and get more info from people who are more knowledgable in this area. I couldn't find anything related to changes to using -sdk_version
flag in llvm from 11.3 to 11.4, but it's throwing warnings when using it now in 11.4 so something must've changed. Also, not an expert on the usage of the flag but I do know it's seemingly not being used in vanilla xcodebuilds, so I wanted to get more info on that flag and why it's being passed in the first place.