Skip to content

Commit 161061f

Browse files
committed
Pass target-variant through the driver for -print-target-info
1 parent c964d18 commit 161061f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/Driver/Driver.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,6 +2176,11 @@ bool Driver::handleImmediateArgs(const ArgList &Args, const ToolChain &TC) {
21762176
commandLine.push_back("-target");
21772177
commandLine.push_back(targetArg->getValue());
21782178
}
2179+
if (const Arg *targetVariantArg =
2180+
Args.getLastArg(options::OPT_target_variant)) {
2181+
commandLine.push_back("-target-variant");
2182+
commandLine.push_back(targetVariantArg->getValue());
2183+
}
21792184
if (const Arg *sdkArg = Args.getLastArg(options::OPT_sdk)) {
21802185
commandLine.push_back("-sdk");
21812186
commandLine.push_back(sdkArg->getValue());
@@ -2188,6 +2193,7 @@ bool Driver::handleImmediateArgs(const ArgList &Args, const ToolChain &TC) {
21882193

21892194
std::string executable = getSwiftProgramPath();
21902195

2196+
// FIXME: This bypasses mechanisms like -v and -###. (SR-12119)
21912197
sys::TaskQueue queue;
21922198
queue.addTask(executable.c_str(), commandLine);
21932199
queue.execute(nullptr,

0 commit comments

Comments
 (0)