[Driver] Support response file in Fuchsia driver
authorPetr Hosek <phosek@google.com>
Thu, 20 Apr 2023 00:03:30 +0000 (00:03 +0000)
committerPetr Hosek <phosek@google.com>
Thu, 20 Apr 2023 02:44:40 +0000 (02:44 +0000)
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/D148763

clang/lib/Driver/ToolChains/Fuchsia.cpp

index b8bb000..0b74e6a 100644 (file)
@@ -187,7 +187,8 @@ void fuchsia::Linker::ConstructJob(Compilation &C, const JobAction &JA,
       CmdArgs.push_back("-lc");
   }
 
-  C.addCommand(std::make_unique<Command>(JA, *this, ResponseFileSupport::None(),
+  C.addCommand(std::make_unique<Command>(JA, *this,
+                                         ResponseFileSupport::AtFileCurCP(),
                                          Exec, CmdArgs, Inputs, Output));
 }