[flang-commits] [clang] [flang] [flang] Do not hardcode "flang" in the driver (PR #200438)
Kelvin Li via flang-commits
flang-commits at lists.llvm.org
Mon Jun 15 09:48:07 PDT 2026
================
@@ -1320,7 +1320,18 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA,
Input.getInputArg().renderAsInput(Args, CmdArgs);
}
- const char *Exec = Args.MakeArgString(D.GetProgramPath("flang", TC));
+ // Handle "clang --driver-mode=flang" case
+ bool isClangDriverWithFlangMode = false;
+ if (D.Name.find("clang") != std::string_view::npos) {
+ if (const Arg *A = Args.getLastArg(options::OPT_driver_mode)) {
+ if (std::string_view(A->getValue()) == "flang") {
+ isClangDriverWithFlangMode = true;
+ }
+ }
+ }
----------------
kkwli wrote:
I will remove them.
https://github.com/llvm/llvm-project/pull/200438
More information about the flang-commits
mailing list