Closed
Description
The clang attribute reference says:
macos
:
Apple’s macOS operating system. The minimum deployment target is specified by the-mmacosx-version-min=*version*
command-line argument.macosx
is supported for backward-compatibility reasons, but it is deprecated.
So we learn that the attribute should be spelled with macos
, not macosx
:
__attribute__((availability(macos,introduced=10.14)))
however, the CLI-flag as documented still uses the "x":
-mmacosx-version-min=*version*
^
X
At the very least, this leads to confusion, as both forms are found in the current LLVM repo:
- search for
-mmacosx-version-min
- search for
-mmacos-version-min
I also believe it may lead to bugs, in the sense that -mmacosx-version-min=10.9
in newer clang ends up not setting MAC_OS_X_VERSION_MIN_REQUIRED
or __MAC_OS_X_VERSION_MIN_REQUIRED
?
I don't have a mac to test this hypothesis, but this is consistent with the failures I'm seeing.