Skip to content

Commit 5c762b1

Browse files
committed
Frontend: Migrate several options to no longer be ignored in swiftinterfaces.
Frontend options should only be printed under `swift-module-flags-ignored:` temporarily to prevent condfails for older development compilers that are still in use (as a rule of thumb, swiftinterfaces should be compatible with compilers that are up to 6 months old). None of the frontend flags that are currently categorized as "ignorable" need to be ignorable anymore.
1 parent 774ba28 commit 5c762b1

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

include/swift/Option/Options.td

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def package_name : Separate<["-"], "package-name">,
532532
Flags<[FrontendOption, ModuleInterfaceOptionIgnorablePrivate]>,
533533
HelpText<"Name of the package the module belongs to">;
534534
def export_as : Separate<["-"], "export-as">,
535-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable]>,
535+
Flags<[FrontendOption, ModuleInterfaceOption]>,
536536
HelpText<"Module name to use when referenced in clients module interfaces">;
537537

538538
def emit_module : Flag<["-"], "emit-module">,
@@ -762,7 +762,7 @@ def disable_actor_data_race_checks :
762762
HelpText<"Disable runtime checks for actor data races">;
763763

764764
def enable_bare_slash_regex : Flag<["-"], "enable-bare-slash-regex">,
765-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable]>,
765+
Flags<[FrontendOption, ModuleInterfaceOption]>,
766766
HelpText<"Enable the use of forward slash regular-expression literal syntax">;
767767

768768
def warn_implicit_overrides :
@@ -794,11 +794,11 @@ def strict_concurrency : Joined<["-"], "strict-concurrency=">,
794794

795795
def enable_experimental_feature :
796796
Separate<["-"], "enable-experimental-feature">,
797-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable]>,
797+
Flags<[FrontendOption, ModuleInterfaceOption]>,
798798
HelpText<"Enable an experimental feature">;
799799

800800
def enable_upcoming_feature : Separate<["-"], "enable-upcoming-feature">,
801-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable]>,
801+
Flags<[FrontendOption, ModuleInterfaceOption]>,
802802
HelpText<"Enable a feature that will be introduced in an upcoming language "
803803
"version">;
804804

@@ -1286,7 +1286,7 @@ def explain_module_dependency : Separate<["-"], "explain-module-dependency">,
12861286
HelpText<"Emit remark/notes describing why compilaiton may depend on a module with a given name.">;
12871287

12881288
def min_inlining_target_version : Separate<["-"], "target-min-inlining-version">,
1289-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable]>,
1289+
Flags<[FrontendOption, ModuleInterfaceOption]>,
12901290
HelpText<"Require inlinable code with no '@available' attribute to back-deploy "
12911291
"to this version of the '-target' OS">;
12921292

@@ -1405,12 +1405,12 @@ def working_directory_EQ : Joined<["-"], "working-directory=">,
14051405
Alias<working_directory>;
14061406

14071407
def user_module_version : Separate<["-"], "user-module-version">,
1408-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable, NewDriverOnlyOption]>,
1408+
Flags<[FrontendOption, ModuleInterfaceOption, NewDriverOnlyOption]>,
14091409
HelpText<"Module version specified from Swift module authors">,
14101410
MetaVarName<"<vers>">;
14111411

14121412
def allowable_client : Separate<["-"], "allowable-client">,
1413-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable, NewDriverOnlyOption]>,
1413+
Flags<[FrontendOption, ModuleInterfaceOption, NewDriverOnlyOption]>,
14141414
HelpText<"Module names that are allowed to import this module">,
14151415
MetaVarName<"<vers>">;
14161416
// VFS

test/ModuleInterface/allowable-client.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// RUN: %FileCheck %s --check-prefix=INTERFACE-FLAG < %t/textual/Foo.swiftinterface
99

10-
// INTERFACE-FLAG: swift-module-flags-ignorable:
10+
// INTERFACE-FLAG: swift-module-flags:
1111
// INTERFACE-FLAG: -allowable-client FooFriend1 -allowable-client FooFriend2 -allowable-client FooFriend3
1212

1313

test/ModuleInterface/option-filtering.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//
66
// CHECK-SWIFTINTERFACE-NOT: -enable-experimental-feature LayoutStringValueWitnesses
77
// CHECK-SWIFTINTERFACE-NOT: -enable-experimental-feature LayoutStringValueWitnessesInstantiation
8-
// CHECK-SWIFTINTERFACE: swift-module-flags-ignorable:
8+
// CHECK-SWIFTINTERFACE: swift-module-flags:
99
// CHECK-SWIFTINTERFACE-SAME: -enable-experimental-feature MoveOnlyClasses
1010
// CHECK-SWIFTINTERFACE-SAME: -enable-experimental-feature NoImplicitCopy
1111

test/ModuleInterface/option-preservation.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
//
66
// CHECK-SWIFTINTERFACE: swift-module-flags:
77
// CHECK-SWIFTINTERFACE-SAME: -enable-library-evolution
8+
// CHECK-SWIFTINTERFACE-SAME: -target-min-inlining-version 42
89
// CHECK-SWIFTINTERFACE-SAME: -Onone
910
// CHECK-SWIFTINTERFACE-SAME: -enforce-exclusivity=unchecked
1011
// CHECK-SWIFTINTERFACE-SAME: -autolink-force-load
11-
// CHECK-SWIFTINTERFACE: swift-module-flags-ignorable:
12-
// CHECK-SWIFTINTERFACE-SAME: -target-min-inlining-version 42
1312
// CHECK-SWIFTINTERFACE-SAME: -enable-bare-slash-regex
1413

1514
// Make sure flags show up when filelists are enabled

0 commit comments

Comments
 (0)