Not only does this seem to be the more correct behaviour when targeting Darwin, but if you use -isysroot, Clangs Darwin driver will infer the deployment target from the SDK and use other SDK info when parsing arguments to the linker. In the case of -platform_version, which is added if the linker is new enough, the version tuple is constructed from the SDKInfo, and SDKInfo, as far as I can tell, only exists when -isysroot has been passed, see parseSDKSettings
As a result, the SDK version field in the LC_BUILD_VERSION command is filled out.
This, from what I understand, will fix the issue we are having with Qt deciding wether or not to enable features like "Dark mode" on macOS
This is a backport of core#21793