bpo-43052: Make dyld search work with SYSTEM_VERSION_COMPAT=1 by isuruf · Pull Request #24324 · python/cpython

I don't know. I only saw https://eclecticlight.co/2020/08/13/macos-version-numbering-isnt-so-simple/

Consider the following program A,

int main() {
  if (__builtin_available(macos 11.0)) {
    return 1;
  } else {
    return 0;
  }
}

and program B,

int main() {
  if (__builtin_available(macos 10.16)) {
    return 1;
  } else {
    return 0;
  }
}

compile A with clang -arch x86_64 -mmacosx-version-min=11.0 and run it, it will return 1.
compile A with clang -arch x86_64 -mmacosx-version-min=10.9 and run it, it will return 0.
compile B with clang -arch x86_64 -mmacosx-version-min=11.0 and run it, it will return 1.
compile B with clang -arch x86_64 -mmacosx-version-min=10.9 and run it, it will return 1.

For macOS 12, I have no idea how it will work. (probably, it'll be 10.17, but that's pure speculation on my part)