[PATCH] D64651: [Driver] Support file paths with -ccc-gcc-name
Alex James via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 21:51:31 PST 2020
al3xtjames updated this revision to Diff 306309.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64651/new/
https://reviews.llvm.org/D64651
Files:
clang/lib/Driver/ToolChains/Gnu.cpp
Index: clang/lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Gnu.cpp
+++ clang/lib/Driver/ToolChains/Gnu.cpp
@@ -170,7 +170,12 @@
} else
GCCName = "gcc";
- const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath(GCCName));
+ const char *Exec;
+ if (llvm::sys::fs::exists(GCCName))
+ Exec = GCCName;
+ else
+ Exec = Args.MakeArgString(getToolChain().GetProgramPath(GCCName));
+
C.addCommand(std::make_unique<Command>(JA, *this,
ResponseFileSupport::AtFileCurCP(),
Exec, CmdArgs, Inputs, Output));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64651.306309.patch
Type: text/x-patch
Size: 697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201119/80688d59/attachment.bin>
More information about the llvm-commits
mailing list