Author: Joseph Huber
Date: 2026-02-26T10:40:25-06:00
New Revision: f14875f3f690f4aa2e387ba19122494eb0481486

URL: 
https://github.com/llvm/llvm-project/commit/f14875f3f690f4aa2e387ba19122494eb0481486
DIFF: 
https://github.com/llvm/llvm-project/commit/f14875f3f690f4aa2e387ba19122494eb0481486.diff

LOG: [Clang] Enable response file support for 'llvm-offload-binary' (#183548)

Summary:
These command line invocations can become so large that they no longer
fit, we should support response files in this case so the build on
Windows can be unblocked with the new driver.

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/Clang.cpp
    llvm/test/tools/llvm-offload-binary/llvm-offload-binary.ll

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/Clang.cpp 
b/clang/lib/Driver/ToolChains/Clang.cpp
index 7eafa1395b131..29d98e88800da 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -9275,7 +9275,7 @@ void OffloadPackager::ConstructJob(Compilation &C, const 
JobAction &JA,
   }
 
   C.addCommand(std::make_unique<Command>(
-      JA, *this, ResponseFileSupport::None(),
+      JA, *this, ResponseFileSupport::AtFileUTF8(),
       Args.MakeArgString(getToolChain().GetProgramPath(getShortName())),
       CmdArgs, Inputs, Output));
 }

diff  --git a/llvm/test/tools/llvm-offload-binary/llvm-offload-binary.ll 
b/llvm/test/tools/llvm-offload-binary/llvm-offload-binary.ll
index c6027b360e5cc..df46ad3a0d38a 100644
--- a/llvm/test/tools/llvm-offload-binary/llvm-offload-binary.ll
+++ b/llvm/test/tools/llvm-offload-binary/llvm-offload-binary.ll
@@ -1,6 +1,9 @@
 ; RUN: llvm-offload-binary -o %t --image=file=%s,arch=abc,triple=x-y-z
 ; RUN: llvm-objdump --offloading %t | FileCheck %s
 ; RUN: llvm-offload-binary %t --image=file=%t2,arch=abc,triple=x-y-z
+; RUN: echo "-o %t --image=file=%s,arch=abc,triple=x-y-z" > %t.rsp
+; RUN: llvm-offload-binary @%t.rsp
+; RUN: llvm-objdump --offloading %t | FileCheck %s
 ; RUN: 
diff  %s %t2
 
 ;      CHECK: OFFLOADING IMAGE [0]:


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

Reply via email to