Commit Graph

2 Commits

Author SHA1 Message Date
Artem Chikin
f461a817b5 Fix 'clang-target-clang-irgen.swift' test to build correctly against newer SDKs
Resolves rdar://138880276
2024-11-07 13:33:46 -08:00
Artem Chikin
0fbbba5154 [Explicit Module Builds] Initialize ClangImporter's 'CodeGenerator' using Swift compilation Target Triple.
As per #65930, the Clang importer's Clang instance may be configured with a different (higher) OS version than the compilation target itself in order to be able to load pre-compiled Clang modules that are aligned with the broader SDK, and match the SDK deployment target against which Swift modules are also built. Code-generation, however, must use the actual compilation target triple. This matches how Swift itself loads Swift module dependencies as well: dependency '.swiftinterface' files are type-checked against the availability epoch and code-generated against the actual compilation triple.

Resolves rdar://113712186
2024-10-21 14:12:23 -07:00