Skip to content

Commit e3b8f2d

Browse files
committed
[Frontend] NFC: Add a flag to explicitly disable DynamicActorIsolation feature
(cherry picked from commit d366c0c)
1 parent f0aa891 commit e3b8f2d

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,9 @@ namespace swift {
593593
/// type-checking, SIL verification, and IR emission,
594594
bool BypassResilienceChecks = false;
595595

596+
/// Disables `DynamicActorIsolation` feature.
597+
bool DisableDynamicActorIsolation = false;
598+
596599
/// Whether or not to allow experimental features that are only available
597600
/// in "production".
598601
#ifdef NDEBUG

include/swift/Option/Options.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,11 @@ def disable_actor_data_race_checks :
817817
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
818818
HelpText<"Disable runtime checks for actor data races">;
819819

820+
def disable_dynamic_actor_isolation :
821+
Flag<["-"], "disable-dynamic-actor-isolation">,
822+
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
823+
HelpText<"Disable dynamic actor isolation checks">;
824+
820825
def enable_bare_slash_regex : Flag<["-"], "enable-bare-slash-regex">,
821826
Flags<[FrontendOption, ModuleInterfaceOption]>,
822827
HelpText<"Enable the use of forward slash regular-expression literal syntax">;

lib/Driver/ToolChains.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ void ToolChain::addCommonFrontendArgs(const OutputInfo &OI,
264264
inputArgs.AddLastArg(arguments,
265265
options::OPT_enable_actor_data_race_checks,
266266
options::OPT_disable_actor_data_race_checks);
267+
inputArgs.AddLastArg(arguments, options::OPT_disable_dynamic_actor_isolation);
267268
inputArgs.AddLastArg(arguments, options::OPT_warn_concurrency);
268269
inputArgs.AddLastArg(arguments, options::OPT_strict_concurrency);
269270
inputArgs.AddAllArgs(arguments, options::OPT_enable_experimental_feature);

lib/Frontend/CompilerInvocation.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,6 +1517,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
15171517
if (Opts.hasFeature(Feature::DebugDescriptionMacro))
15181518
Opts.enableFeature(Feature::SymbolLinkageMarkers);
15191519

1520+
Opts.DisableDynamicActorIsolation |=
1521+
Args.hasArg(OPT_disable_dynamic_actor_isolation);
1522+
15201523
#if SWIFT_ENABLE_EXPERIMENTAL_PARSER_VALIDATION
15211524
/// Enable round trip parsing via the new swift parser unless it is disabled
15221525
/// explicitly. The new Swift parser can have mismatches with C++ parser -

0 commit comments

Comments
 (0)