mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[embedded] Disable Objective-C interop in embedded Swift
This commit is contained in:
@@ -1095,7 +1095,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
|
||||
Opts.EnableObjCInterop =
|
||||
Args.hasFlag(OPT_enable_objc_interop, OPT_disable_objc_interop,
|
||||
Target.isOSDarwin());
|
||||
Target.isOSDarwin() && !Opts.hasFeature(Feature::Embedded));
|
||||
|
||||
Opts.CForeignReferenceTypes =
|
||||
Args.hasArg(OPT_experimental_c_foreign_reference_types);
|
||||
@@ -1334,6 +1334,11 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
Diags.diagnose(SourceLoc(), diag::wmo_with_embedded);
|
||||
HadError = true;
|
||||
}
|
||||
|
||||
if (Opts.EnableObjCInterop) {
|
||||
Diags.diagnose(SourceLoc(), diag::objc_with_embedded);
|
||||
HadError = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (auto A = Args.getLastArg(OPT_checked_async_objc_bridging)) {
|
||||
|
||||
Reference in New Issue
Block a user