mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[driver] Added support for -Xfrontend, which passes arguments through to the frontend.
Swift SVN r11166
This commit is contained in:
@@ -177,6 +177,9 @@ def repl : Flag<["-"], "repl">, HelpText<"REPL mode">, Flags<[FrontendOption]>,
|
||||
def i : Flag<["-"], "i">, HelpText<"Immediate mode">, Flags<[FrontendOption]>,
|
||||
ModeOpt;
|
||||
|
||||
def Xfrontend : Separate<["-"], "Xfrontend">, Flags<[DriverOption]>,
|
||||
MetaVarName<"<arg>">, HelpText<"Pass <arg> to the Swift frontend">;
|
||||
|
||||
def Xcc : Separate<["-"], "Xcc">, Flags<[DriverOption, FrontendOption]>,
|
||||
MetaVarName<"<arg>">,
|
||||
HelpText<"Pass <arg> to the C/C++/Objective-C compiler">;
|
||||
|
||||
@@ -102,6 +102,10 @@ std::unique_ptr<Job> Swift::constructJob(const JobAction &JA,
|
||||
// Set the SDK for the frontend.
|
||||
Args.AddLastArg(Arguments, options::OPT_sdk);
|
||||
|
||||
// Pass through the values passed to -Xfrontend.
|
||||
Args.AddAllArgValues(Arguments, options::OPT_Xfrontend);
|
||||
|
||||
|
||||
// Add the output file argument.
|
||||
Arguments.push_back("-o");
|
||||
Arguments.push_back(Output->getFilename().data());
|
||||
|
||||
Reference in New Issue
Block a user