@@ -47,9 +47,9 @@ def DoesNotAffectIncrementalBuild : OptionFlag;
47
47
// current working directory.
48
48
def ArgumentIsPath : OptionFlag;
49
49
50
- // The option should be written into a .swiftinterface parseable interface file,
50
+ // The option should be written into a .swiftinterface module interface file,
51
51
// and read/parsed from there when reconstituting a .swiftmodule from it.
52
- def ParseableInterfaceOption : OptionFlag;
52
+ def ModuleInterfaceOption : OptionFlag;
53
53
54
54
/////////
55
55
// Options
@@ -183,12 +183,12 @@ def j : JoinedOrSeparate<["-"], "j">, Flags<[DoesNotAffectIncrementalBuild]>,
183
183
def sdk : Separate<["-"], "sdk">, Flags<[FrontendOption, ArgumentIsPath]>,
184
184
HelpText<"Compile against <sdk>">, MetaVarName<"<sdk>">;
185
185
186
- def swift_version : Separate<["-"], "swift-version">, Flags<[FrontendOption, ParseableInterfaceOption ]>,
186
+ def swift_version : Separate<["-"], "swift-version">, Flags<[FrontendOption, ModuleInterfaceOption ]>,
187
187
HelpText<"Interpret input according to a specific Swift language version number">,
188
188
MetaVarName<"<vers>">;
189
189
190
190
def package_description_version: Separate<["-"], "package-description-version">,
191
- Flags<[FrontendOption, HelpHidden, ParseableInterfaceOption ]>,
191
+ Flags<[FrontendOption, HelpHidden, ModuleInterfaceOption ]>,
192
192
HelpText<"The version number to be applied on the input for the PackageDescription availability kind">,
193
193
MetaVarName<"<vers>">;
194
194
@@ -306,17 +306,17 @@ def module_cache_path : Separate<["-"], "module-cache-path">,
306
306
HelpText<"Specifies the Clang module cache path">;
307
307
308
308
def enable_library_evolution : Flag<["-"], "enable-library-evolution">,
309
- Flags<[FrontendOption, ParseableInterfaceOption ]>,
309
+ Flags<[FrontendOption, ModuleInterfaceOption ]>,
310
310
HelpText<"Build the module to allow binary-compatible library evolution">;
311
311
312
312
def module_name : Separate<["-"], "module-name">,
313
- Flags<[FrontendOption, ParseableInterfaceOption ]>,
313
+ Flags<[FrontendOption, ModuleInterfaceOption ]>,
314
314
HelpText<"Name of the module to build">;
315
315
def module_name_EQ : Joined<["-"], "module-name=">, Flags<[FrontendOption]>,
316
316
Alias<module_name>;
317
317
318
318
def module_link_name : Separate<["-"], "module-link-name">,
319
- Flags<[FrontendOption, ParseableInterfaceOption ]>,
319
+ Flags<[FrontendOption, ModuleInterfaceOption ]>,
320
320
HelpText<"Library to link against when using this module">;
321
321
def module_link_name_EQ : Joined<["-"], "module-link-name=">,
322
322
Flags<[FrontendOption]>, Alias<module_link_name>;
@@ -337,15 +337,25 @@ def emit_module_path_EQ : Joined<["-"], "emit-module-path=">,
337
337
ArgumentIsPath]>,
338
338
Alias<emit_module_path>;
339
339
340
+ def emit_module_interface :
341
+ Flag<["-"], "emit-module-interface">,
342
+ Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
343
+ HelpText<"Output module interface file">;
344
+ def emit_module_interface_path :
345
+ Separate<["-"], "emit-module-interface-path">,
346
+ Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
347
+ ArgumentIsPath]>,
348
+ MetaVarName<"<path>">, HelpText<"Output module interface file to <path>">;
349
+
340
350
def emit_parseable_module_interface :
341
351
Flag<["-"], "emit-parseable-module-interface">,
342
- Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild] >,
343
- HelpText<"Output parseable interface file" >;
352
+ Alias<emit_module_interface >,
353
+ Flags<[NoInteractiveOption, HelpHidden, DoesNotAffectIncrementalBuild] >;
344
354
def emit_parseable_module_interface_path :
345
355
Separate<["-"], "emit-parseable-module-interface-path">,
356
+ Alias<emit_module_interface_path>,
346
357
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
347
- ArgumentIsPath]>,
348
- MetaVarName<"<path>">, HelpText<"Output parseable interface file to <path>">;
358
+ HelpHidden, ArgumentIsPath]>;
349
359
350
360
def emit_objc_header : Flag<["-"], "emit-objc-header">,
351
361
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
@@ -492,19 +502,19 @@ def Xlinker : Separate<["-"], "Xlinker">,
492
502
def O_Group : OptionGroup<"<optimization level options>">;
493
503
494
504
def Onone : Flag<["-"], "Onone">, Group<O_Group>,
495
- Flags<[FrontendOption, ParseableInterfaceOption ]>,
505
+ Flags<[FrontendOption, ModuleInterfaceOption ]>,
496
506
HelpText<"Compile without any optimization">;
497
507
def O : Flag<["-"], "O">, Group<O_Group>,
498
- Flags<[FrontendOption, ParseableInterfaceOption ]>,
508
+ Flags<[FrontendOption, ModuleInterfaceOption ]>,
499
509
HelpText<"Compile with optimizations">;
500
510
def Osize : Flag<["-"], "Osize">, Group<O_Group>,
501
- Flags<[FrontendOption, ParseableInterfaceOption ]>,
511
+ Flags<[FrontendOption, ModuleInterfaceOption ]>,
502
512
HelpText<"Compile with optimizations and target small code size">;
503
513
def Ounchecked : Flag<["-"], "Ounchecked">, Group<O_Group>,
504
- Flags<[FrontendOption, ParseableInterfaceOption ]>,
514
+ Flags<[FrontendOption, ModuleInterfaceOption ]>,
505
515
HelpText<"Compile with optimizations and remove runtime safety checks">;
506
516
def Oplayground : Flag<["-"], "Oplayground">, Group<O_Group>,
507
- Flags<[HelpHidden, FrontendOption, ParseableInterfaceOption ]>,
517
+ Flags<[HelpHidden, FrontendOption, ModuleInterfaceOption ]>,
508
518
HelpText<"Compile with optimizations appropriate for a playground">;
509
519
510
520
def RemoveRuntimeAsserts : Flag<["-"], "remove-runtime-asserts">,
@@ -650,7 +660,7 @@ def parse_sil : Flag<["-"], "parse-sil">,
650
660
Flags<[FrontendOption, NoInteractiveOption]>,
651
661
HelpText<"Parse the input file as SIL code, not Swift source">;
652
662
def parse_stdlib : Flag<["-"], "parse-stdlib">,
653
- Flags<[FrontendOption, HelpHidden, ParseableInterfaceOption ]>,
663
+ Flags<[FrontendOption, HelpHidden, ModuleInterfaceOption ]>,
654
664
HelpText<"Parse the input file(s) as the Swift standard library">;
655
665
656
666
def modes_Group : OptionGroup<"<mode options>">, HelpText<"MODES">;
@@ -791,12 +801,12 @@ def resource_dir : Separate<["-"], "resource-dir">,
791
801
HelpText<"The directory that holds the compiler resource files">;
792
802
793
803
def target : Separate<["-"], "target">,
794
- Flags<[FrontendOption, ModuleWrapOption, ParseableInterfaceOption ]>,
804
+ Flags<[FrontendOption, ModuleWrapOption, ModuleInterfaceOption ]>,
795
805
HelpText<"Generate code for the given target">;
796
806
def target_legacy_spelling : Joined<["--"], "target=">,
797
807
Flags<[FrontendOption]>, Alias<target>;
798
808
799
- def target_cpu : Separate<["-"], "target-cpu">, Flags<[FrontendOption, ParseableInterfaceOption ]>,
809
+ def target_cpu : Separate<["-"], "target-cpu">, Flags<[FrontendOption, ModuleInterfaceOption ]>,
800
810
HelpText<"Generate code for a particular CPU variant">;
801
811
802
812
def profile_generate : Flag<["-"], "profile-generate">,
@@ -855,7 +865,7 @@ def index_ignore_system_modules : Flag<["-"], "index-ignore-system-modules">,
855
865
HelpText<"Avoid indexing system modules">;
856
866
857
867
def enforce_exclusivity_EQ : Joined<["-"], "enforce-exclusivity=">,
858
- Flags<[FrontendOption, ParseableInterfaceOption ]>,
868
+ Flags<[FrontendOption, ModuleInterfaceOption ]>,
859
869
MetaVarName<"<enforcement>">,
860
870
HelpText<"Enforce law of exclusivity">;
861
871
0 commit comments