[clang] 038536a - [Driver] Support response file on baremetal driver

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 19 19:52:30 PDT 2023


Author: Petr Hosek
Date: 2023-04-20T02:45:26Z
New Revision: 038536acaf271cb614fd2248becf1cc2c5e700c7

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

LOG: [Driver] Support response file on baremetal driver

All officially supported linkers should support response files and
this avoids issues when compiling on platforms such as Windows.

Differential Revision: https://reviews.llvm.org/D148760

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/BareMetal.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/BareMetal.cpp b/clang/lib/Driver/ToolChains/BareMetal.cpp
index c935758adb2b..38f26d017647 100644
--- a/clang/lib/Driver/ToolChains/BareMetal.cpp
+++ b/clang/lib/Driver/ToolChains/BareMetal.cpp
@@ -345,7 +345,8 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA,
   CmdArgs.push_back("-o");
   CmdArgs.push_back(Output.getFilename());
 
-  C.addCommand(std::make_unique<Command>(JA, *this, ResponseFileSupport::None(),
+  C.addCommand(std::make_unique<Command>(JA, *this,
+                                         ResponseFileSupport::AtFileCurCP(),
                                          Args.MakeArgString(TC.GetLinkerPath()),
                                          CmdArgs, Inputs, Output));
 }


        


More information about the cfe-commits mailing list