Skip to content

Commit 830c90f

Browse files
authored
Merge pull request swiftlang#30217 from nkcsgexi/zippered
TBDGen: pass-down target variant when generating textual interface stubs
2 parents 15c7e3a + 6dde0e6 commit 830c90f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

lib/TBDGen/TBDGen.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,11 @@ GenerateTBDRequest::evaluate(Evaluator &evaluator,
978978

979979
llvm::MachO::Target target(triple);
980980
file.addTarget(target);
981-
981+
// Add target variant
982+
if (ctx.LangOpts.TargetVariant.hasValue()) {
983+
llvm::MachO::Target targetVar(*ctx.LangOpts.TargetVariant);
984+
file.addTarget(targetVar);
985+
}
982986
StringSet symbols;
983987
auto *clang = static_cast<ClangImporter *>(ctx.getClangModuleLoader());
984988
TBDGenVisitor visitor(file, {target}, &symbols,

test/TBD/app-extension.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@
88

99
// EXTENSIONSAFE-NOT: not_app_extension_safe
1010
// NOTEXTENSIONSAFE: not_app_extension_safe
11+
12+
// RUN: %target-swift-frontend -target-variant x86_64-apple-ios13.0-macabi -typecheck %s -application-extension -emit-tbd -emit-tbd-path %t/target-variant.tbd
13+
// RUN: %FileCheck %s --check-prefix ZIPPERED < %t/target-variant.tbd
14+
15+
// ZIPPERED: platform: zippered

0 commit comments

Comments
 (0)