[clang] [clang-nvlink-wrapper] Keep LTO task outputs distinct (PR #238883)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 10 08:46:31 PST 2026


================
@@ -685,6 +691,7 @@ getInput(const cl::LibraryOptionsContext &LibraryOptions, const ArgList &Args) {
     // Run the LTO job to compile the bitcode.
     size_t MaxTasks = LTOBackend.getMaxTasks();
     SmallVector<StringRef> LTOFiles(MaxTasks);
+    std::mutex TempFilesMutex;
----------------
jhuber6 wrote:

A mutex shouldn't be necessary. `createTempFile` is intended to be thread safe on its own and everything else should have an index in an array of size `MaxTasks` like above.

https://github.com/llvm/llvm-project/pull/238883


More information about the cfe-commits mailing list