llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Naveen Seth Hanig (naveen-seth)

<details>
<summary>Changes</summary>

In `createClangModulePrecompileJob`, the `PrependArg` parameter was not being 
passed for the newly created Clang module precompile job. 
This causes failures for setups where the clang executable is a wrapper (e.g., 
the llvm-driver wrapper).

See https://github.com/llvm/llvm-project/pull/191258#issuecomment-4227294864

---
Full diff: https://github.com/llvm/llvm-project/pull/191610.diff


1 Files Affected:

- (modified) clang/lib/Driver/ModulesDriver.cpp (+6-5) 


``````````diff
diff --git a/clang/lib/Driver/ModulesDriver.cpp 
b/clang/lib/Driver/ModulesDriver.cpp
index 783f2270c4e0f..8738397c6cb75 100644
--- a/clang/lib/Driver/ModulesDriver.cpp
+++ b/clang/lib/Driver/ModulesDriver.cpp
@@ -1243,11 +1243,12 @@ createClangModulePrecompileJob(Compilation &C, const 
Command &ImportingJob,
   for (const auto &Arg : BuildArgs)
     JobArgs.push_back(TCArgs.MakeArgString(Arg));
 
-  return std::make_unique<Command>(*PA, ImportingJob.getCreator(),
-                                   ResponseFileSupport::AtFileUTF8(),
-                                   C.getDriver().getClangProgramPath(), 
JobArgs,
-                                   /*Inputs=*/ArrayRef<InputInfo>{},
-                                   /*Outputs=*/ArrayRef<InputInfo>{});
+  const auto &D = C.getDriver();
+  return std::make_unique<Command>(
+      *PA, ImportingJob.getCreator(), ResponseFileSupport::AtFileUTF8(),
+      D.getClangProgramPath(), JobArgs,
+      /*Inputs=*/ArrayRef<InputInfo>{},
+      /*Outputs=*/ArrayRef<InputInfo>{}, D.getPrependArg());
 }
 
 /// Creates a \c ClangModuleJobNode with associated job for each unique Clang

``````````

</details>


https://github.com/llvm/llvm-project/pull/191610
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to