@@ -60,6 +60,9 @@ def SupplementaryOutput : OptionFlag;
6060// The option should be accepted by swift-symbolgraph-extract.
6161def SwiftSymbolGraphExtractOption : OptionFlag;
6262
63+ // The option should be accepted by swift-synthesize-interface.
64+ def SwiftSynthesizeInterfaceOption : OptionFlag;
65+
6366// The option should be accepted by swift-api-digester.
6467def SwiftAPIDigesterOption : OptionFlag;
6568
@@ -215,15 +218,17 @@ def driver_mode : Joined<["--"], "driver-mode=">, Flags<[HelpHidden]>,
215218
216219def help : Flag<["-", "--"], "help">,
217220 Flags<[FrontendOption, AutolinkExtractOption, ModuleWrapOption,
218- SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
221+ SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
222+ SwiftSynthesizeInterfaceOption]>,
219223 HelpText<"Display available options">;
220224def h : Flag<["-"], "h">, Alias<help>;
221225def help_hidden : Flag<["-", "--"], "help-hidden">,
222226 Flags<[HelpHidden, FrontendOption]>,
223227 HelpText<"Display available options, including hidden options">;
224228
225229def v : Flag<["-"], "v">,
226- Flags<[DoesNotAffectIncrementalBuild, SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
230+ Flags<[DoesNotAffectIncrementalBuild, SwiftSymbolGraphExtractOption,
231+ SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
227232 HelpText<"Show commands to run and use verbose output">;
228233def version : Flag<["-", "--"], "version">, Flags<[FrontendOption]>,
229234 HelpText<"Print version information and exit">;
@@ -236,26 +241,30 @@ def parseable_output : Flag<["-"], "parseable-output">,
236241
237242def windows_sdk_root : Separate<["-"], "windows-sdk-root">,
238243 Flags<[ArgumentIsPath, FrontendOption,
239- SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
244+ SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
245+ SwiftSynthesizeInterfaceOption]>,
240246 HelpText<"Windows SDK Root">, MetaVarName<"<root>">;
241247def windows_sdk_version : Separate<["-"], "windows-sdk-version">,
242248 Flags<[FrontendOption,
243- SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
249+ SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
250+ SwiftSynthesizeInterfaceOption]>,
244251 HelpText<"Windows SDK Version">, MetaVarName<"<version>">;
245252def visualc_tools_root : Separate<["-"], "visualc-tools-root">,
246253 Flags<[ArgumentIsPath, FrontendOption,
247- SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
254+ SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
255+ SwiftSynthesizeInterfaceOption]>,
248256 HelpText<"VisualC++ Tools Root">, MetaVarName<"<root>">;
249257def visualc_tools_version : Separate<["-"], "visualc-tools-version">,
250258 Flags<[FrontendOption,
251- SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
259+ SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
260+ SwiftSynthesizeInterfaceOption]>,
252261 HelpText<"VisualC++ ToolSet Version">, MetaVarName<"<version>">;
253262
254263// Android Options
255264
256265def sysroot : Separate<["-"], "sysroot">,
257266 Flags<[ArgumentIsPath, FrontendOption, SwiftSymbolGraphExtractOption,
258- SwiftAPIDigesterOption]>,
267+ SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption ]>,
259268 HelpText<"Native Platform sysroot">, MetaVarName<"<sysroot>">;
260269
261270// Standard Options
@@ -265,26 +274,26 @@ def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>,
265274def o : JoinedOrSeparate<["-"], "o">,
266275 Flags<[FrontendOption, AutolinkExtractOption, ModuleWrapOption,
267276 NoInteractiveOption, ArgumentIsPath, SwiftAPIDigesterOption,
268- CacheInvariant]>,
277+ SwiftSynthesizeInterfaceOption, CacheInvariant]>,
269278 HelpText<"Write output to <file>">, MetaVarName<"<file>">;
270279
271280def j : JoinedOrSeparate<["-"], "j">, Flags<[DoesNotAffectIncrementalBuild]>,
272281 HelpText<"Number of commands to execute in parallel">, MetaVarName<"<n>">;
273282
274283def sdk : Separate<["-"], "sdk">,
275284 Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption,
276- SwiftAPIDigesterOption]>,
285+ SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption ]>,
277286 HelpText<"Compile against <sdk>">, MetaVarName<"<sdk>">;
278287
279288def swift_version : Separate<["-"], "swift-version">,
280289 Flags<[FrontendOption, ModuleInterfaceOption, SwiftSymbolGraphExtractOption,
281- SwiftAPIDigesterOption]>,
290+ SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption ]>,
282291 HelpText<"Interpret input according to a specific Swift language version number">,
283292 MetaVarName<"<vers>">;
284293
285294def language_mode : Separate<["-"], "language-mode">,
286295 Flags<[FrontendOption, ModuleInterfaceOption, SwiftSymbolGraphExtractOption,
287- SwiftAPIDigesterOption]>,
296+ SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption ]>,
288297 HelpText<"Interpret input according to a specific Swift language mode">,
289298 MetaVarName<"<mode>">,
290299 Alias<swift_version>;
@@ -306,17 +315,20 @@ def e : Separate<["-"], "e">, Flags<[NewDriverOnlyOption]>,
306315 HelpText<"Executes a line of code provided on the command line">;
307316
308317def F : JoinedOrSeparate<["-"], "F">,
309- Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
318+ Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption,
319+ SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
310320 HelpText<"Add directory to framework search path">;
311321def F_EQ : Joined<["-"], "F=">, Flags<[FrontendOption, ArgumentIsPath]>,
312322 Alias<F>;
313323
314324def Fsystem : Separate<["-"], "Fsystem">,
315- Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption]>,
325+ Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption,
326+ SwiftSynthesizeInterfaceOption]>,
316327 HelpText<"Add directory to system framework search path">;
317328
318329def I : JoinedOrSeparate<["-"], "I">,
319- Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
330+ Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption,
331+ SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
320332 HelpText<"Add directory to the import search path">;
321333def I_EQ : Joined<["-"], "I=">, Flags<[FrontendOption, ArgumentIsPath]>,
322334 Alias<I>;
@@ -495,7 +507,8 @@ def localization_path : Separate<["-"], "localization-path">,
495507
496508def module_cache_path : Separate<["-"], "module-cache-path">,
497509 Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath,
498- SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
510+ SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
511+ SwiftSynthesizeInterfaceOption]>,
499512 HelpText<"Specifies the module cache path">;
500513
501514def enable_library_evolution : Flag<["-"], "enable-library-evolution">,
@@ -559,11 +572,11 @@ def library_level_EQ : Joined<["-"], "library-level=">,
559572
560573def module_name : Separate<["-"], "module-name">,
561574 Flags<[FrontendOption, ModuleInterfaceOption,
562- SwiftSymbolGraphExtractOption]>,
575+ SwiftSymbolGraphExtractOption, SwiftSynthesizeInterfaceOption ]>,
563576 HelpText<"Name of the module to build">;
564577def project_name : Separate<["-"], "project-name">,
565578 Flags<[FrontendOption, ModuleInterfaceOptionIgnorable,
566- SwiftSymbolGraphExtractOption]>,
579+ SwiftSymbolGraphExtractOption, SwiftSynthesizeInterfaceOption ]>,
567580 HelpText<"Name of the project this module to build belongs to">;
568581
569582def module_name_EQ : Joined<["-"], "module-name=">, Flags<[FrontendOption]>,
@@ -790,7 +803,8 @@ def enable_experimental_cxx_interop :
790803
791804def cxx_interoperability_mode :
792805 Joined<["-"], "cxx-interoperability-mode=">,
793- Flags<[FrontendOption, ModuleInterfaceOption, SwiftSymbolGraphExtractOption]>,
806+ Flags<[FrontendOption, ModuleInterfaceOption, SwiftSymbolGraphExtractOption,
807+ SwiftSynthesizeInterfaceOption]>,
794808 HelpText<"Enables C++ interoperability; pass 'default' to enable or 'off' to disable">;
795809
796810def experimental_c_foreign_reference_types :
@@ -1384,7 +1398,9 @@ def num_threads : Separate<["-"], "num-threads">,
13841398def Xfrontend : Separate<["-"], "Xfrontend">, Flags<[HelpHidden]>,
13851399 MetaVarName<"<arg>">, HelpText<"Pass <arg> to the Swift frontend">;
13861400
1387- def Xcc : Separate<["-"], "Xcc">, Flags<[FrontendOption, SwiftSymbolGraphExtractOption]>,
1401+ def Xcc : Separate<["-"], "Xcc">,
1402+ Flags<[FrontendOption, SwiftSymbolGraphExtractOption,
1403+ SwiftSynthesizeInterfaceOption]>,
13881404 MetaVarName<"<arg>">,
13891405 HelpText<"Pass <arg> to the C/C++/Objective-C compiler">;
13901406
@@ -1396,13 +1412,16 @@ def Xllvm : Separate<["-"], "Xllvm">,
13961412 MetaVarName<"<arg>">, HelpText<"Pass <arg> to LLVM.">;
13971413
13981414def resource_dir : Separate<["-"], "resource-dir">,
1399- Flags<[FrontendOption, SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption, HelpHidden, ArgumentIsPath]>,
1415+ Flags<[FrontendOption, SwiftSymbolGraphExtractOption,
1416+ SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption,
1417+ HelpHidden, ArgumentIsPath]>,
14001418 MetaVarName<"</usr/lib/swift>">,
14011419 HelpText<"The directory that holds the compiler resource files">;
14021420
14031421def target : Separate<["-"], "target">,
1404- Flags<[FrontendOption, ModuleWrapOption, ModuleInterfaceOption, SwiftSymbolGraphExtractOption,
1405- SwiftAPIDigesterOption]>,
1422+ Flags<[FrontendOption, ModuleWrapOption, ModuleInterfaceOption,
1423+ SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
1424+ SwiftSynthesizeInterfaceOption]>,
14061425 HelpText<"Generate code for the given target <triple>, such as x86_64-apple-macos10.9">, MetaVarName<"<triple>">;
14071426def target_legacy_spelling : Joined<["--"], "target=">,
14081427 Flags<[FrontendOption]>, Alias<target>;
@@ -1419,7 +1438,8 @@ def target_variant : Separate<["-"], "target-variant">,
14191438 " variant target triple in addition to the main -target triple">;
14201439
14211440def clang_target : Separate<["-"], "clang-target">,
1422- Flags<[FrontendOption, SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
1441+ Flags<[FrontendOption, SwiftSymbolGraphExtractOption,
1442+ SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
14231443 HelpText<"Separately set the target we should use for internal Clang instance">;
14241444
14251445def disable_clang_target : Flag<["-"], "disable-clang-target">,
0 commit comments