[clang][modules] Built-in modules are not correctly enabled for Mac Catalyst (#104872)
authorIan Anderson <iana@apple.com>
Tue, 20 Aug 2024 10:29:11 +0000 (03:29 -0700)
committerTobias Hieta <tobias@hieta.se>
Mon, 26 Aug 2024 07:08:34 +0000 (09:08 +0200)
commit9dc4bdf9fd1e4be051fe19998d64230d999b777d
treedf558fac349744dba991cb2b27a31756399c4f7c
parent9301cd5b57c09214256edf19753e2e047a5b5f91
[clang][modules] Built-in modules are not correctly enabled for Mac Catalyst (#104872)

Mac Catalyst is the iOS platform, but it builds against the macOS SDK
and so it needs to be checking the macOS SDK version instead of the iOS
one. Add tests against a greater-than SDK version just to make sure this
works beyond the initially supporting SDKs.

(cherry picked from commit b9864387d9d00e1d4888181460d05dbc92364d75)
clang/lib/Driver/ToolChains/Darwin.cpp
clang/test/Driver/Inputs/MacOSX15.0.sdk/SDKSettings.json
clang/test/Driver/Inputs/MacOSX15.1.sdk/SDKSettings.json [new file with mode: 0644]
clang/test/Driver/darwin-builtin-modules.c