Skip to content

Commit 192cf99

Browse files
authored
Merge pull request #55 from vjayathirtha-nv/release_70
generate the '-cmdline' option for flang1 and flang2
2 parents d2da7e5 + c44908d commit 192cf99

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/Driver/ToolChains/Flang.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@ void FlangFrontend::ConstructJob(Compilation &C, const JobAction &JA,
7676
LowerCmdArgs.push_back(ILMFile);
7777
C.addTempFile(ILMFile);
7878

79+
// Generate -cmdline
80+
std::string CmdLine("'+flang");
81+
// ignore the first argument which reads "--driver-mode=fortran"
82+
for (unsigned i = 1; i < Args.getNumInputArgStrings(); ++i) {
83+
CmdLine.append(" ");
84+
CmdLine.append(Args.getArgString(i));
85+
}
86+
CmdLine.append("'");
87+
88+
CommonCmdArgs.push_back("-cmdline");
89+
CommonCmdArgs.push_back(Args.MakeArgString(CmdLine));
90+
7991
/***** Process common args *****/
8092

8193

0 commit comments

Comments
 (0)