[clang] [clang-linker-wrapper] Add error handling for missing linker path (PR #113613)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 24 13:40:20 PDT 2024
================
@@ -370,6 +370,8 @@ Error runLinker(ArrayRef<StringRef> Files, const ArgList &Args) {
// Render the linker arguments and add the newly created image. We add it
// after the output file to ensure it is linked with the correct libraries.
StringRef LinkerPath = Args.getLastArgValue(OPT_linker_path_EQ);
+ if (LinkerPath.empty())
+ return createStringError("Host linker is not available");
----------------
jhuber6 wrote:
```suggestion
return createStringError("linker path missing, must pass 'linker-path'");
```
https://github.com/llvm/llvm-project/pull/113613
More information about the cfe-commits
mailing list