TargetOptions only contained the target triple, which was duplicated in
IRGenOptions. These could get out-of-sync, which would cause issues during
IRGen. Since nothing was using TargetOptions other than CompilerInvocation,
removed TargetOptions in favor of making IRGenOptions the canonical home of the
target triple.
Swift SVN r12869
This option was never honored, and the main functionality that this option
would have implemented has been subsumed by -output-file-map.
Swift SVN r12800
The new format is "-<option>" and "-<option>-path". As a result:
- Renamed -serialized-diagnostics-path to -serialize-diagnostics-path.
- Renamed -module-output-path to -emit-module-path.
Swift SVN r12614
Thanks to the way we've set up our diagnostics engine, there's not actually
a reason for /everything/ to get rebuilt when /one/ diagnostic changes.
I've split them up into five categories for now: Parse, Sema, SIL, IRGen,
and Frontend, plus a set of "Common" diagnostics that are used in multiple
areas of the compiler. We can massage this later.
No functionality change, but should speed up compile times!
Swift SVN r12438
Added support for the -emit-module and -module-output-path options. -emit-module
and -module-output-path function similarly to -serialize-diagnostics and
-serialized-diagnostics-path: notably, -module-output-path implies -emit-module,
but -emit-module can be passed without -module-output-path and a default path
will be determined based on other inputs.
Added support for the -module-link-name option, which specifies the name of the
library to link against when importing the generated module.
Note that support for these options is only implemented in the integrated
frontend; driver-level support for these options is forthcoming.
Swift SVN r12301
Reworked the -serialize-diagnostics option, so that it is now just a flag
indicating that the frontend should generate serialized diagnostics. The path at
which the diagnostics will be serialized is now specified by the
-serialized-diagnostics-path option, which is a frontend-only option. (The
frontend treats -serialized-diagnostics-path as implying -serialize-diagnostics.)
If -serialize-diagnostics is passed but -serialized-diagnostics-path is not
passed, the frontend will choose an output path from a few default values:
- If the frontend has a non-stdout output path, replace that path's extension
with .dia.
- If there is a primary input filename, use that input's base name as the base
name for the serialized diagnostics file.
- Otherwise, use the module name as the base name for the serialized diagnostics
file.
Added support for setting up a serialized diagnostics DiagnosticConsumer in
frontend_main() if FrontendOptions::SerializedDiagnosticsPath is non-empty.
Swift SVN r12251
Added checks to determine if the input should be treated as SIL, Library, REPL, or Main, based on the command line arguments and inputs.
Swift SVN r12176
We should be able to cut out another layer of IRGen grime now.
This does XFAIL one test, test/Prototypes/TextFormatting.swift, which fails because of a weird archetype ordering in a nested substitution list. This should get sorted out by switching to interface types, so I'm going to let it go until then.
Swift SVN r11618
MainInputFilename and OutputFilename are pulled from the FrontendOptions, while Triple is parsed directly from the ArgList.
Eventually, MainInputFilename and OutputFilename should likely be removed from IRGenOptions, in favor of the values in FrontendOptions, while Triple will be in a separate TargetOptions class.
Swift SVN r11455
Moved the responsibility for storing LinkLibraries from CompilerInvocation to the invocation’s IRGenOpts.
Moved the handling of -l and -framework into ParseIRGenArgs.
Swift SVN r11450
Added driver-level support for generating commands with -emit-ir and -emit-bc as well integrated frontend support for handling -emit-ir and -emit-bc.
Swift SVN r11375
Also updated the comments in FrontendOptions::ActionType to indicate that only -dump-parse skips type-checking. (Previously, the comments implied that -parse also skipped type-checking, which is not the desired behavior.)
Swift SVN r11374
Added an ActionType enum to FrontendOptions with the various actions that the integrated frontend will support, as well as a new RequestedAction member.
Added support for determining the user’s requested action in ParseFrontendArgs. (The integrated frontend does not yet honor this request; support for that is forthcoming.)
Swift SVN r11372
These are not yet used, since the integrated frontend doesn’t yet support immediate mode, but they are ready for use once immediate mode is supported.
Swift SVN r11326
Added PrintHelp and PrintHelpHidden to FrontendOptions.
Marked both -help and --help-hidden with the FrontendOption flag.
Updated ParseFrontendArgs to parse -help and --help-hidden.
Updated frontend_main() so that it prints the help for the frontend options.
Swift SVN r11320
Added a new DiagnosticOptions class to swiftBasic, and added a DiagnosticOptions member to CompilerInvocation.
Added a static ParseDiagnosticArgs function to parse diagnostic-related arguments.
Added -verify to FrontendOptions.td, and added support for parsing -verify in ParseDiagnosticArgs.
Updated frontend_main() to enable and trigger the DiagnosticVerifier when -verify is passed.
Swift SVN r11318
Removed CompilerInvocation::TargetTriple and replaced it with CompilerInvocation::TargetOpts, a TargetOptions object.
Added a static ParseTargetArgs function to set up TargetOptions, and moved handling of -target into that function.
Swift SVN r11288
StringRef::getAsInteger returns true, not false, when an error occurs.
Explicitly set the radix to 10, instead of inferring the radix.
For the invalid argument value diagnostic, switch the order of the argument string and the value.
Swift SVN r11279
Also updated findModule() in SourceLoader.cpp and SerializedModuleLoader.cpp to get the ImportSearchPaths from the ASTContext’s SearchPathOpts, instead of directly from the ASTContext.
Swift SVN r11214
Added a new SearchPathOptions class to swiftAST, which will contain options like import search paths and the SDK path.
Moved the RuntimeIncludePath from CompilerInvocation into SearchPathOptions. For now, at least, the RuntimeIncludePath is handled separately from other ImportSearchPaths, since we can’t yet guarantee that RuntimeIncludePath is set up before we parse the ImportSearchPaths.
Added a SearchPathOptions member to ASTContext.
Updated findModule() in SourceLoader.cpp and SerializedModuleLoader.cpp to check RuntimeIncludePath after everything else if no module was found. (This matches existing behavior, which had RuntimeIncludedPath at the end of ImportSearchPaths.)
Swift SVN r11213