[clang] [llvm] [LinkerWrapper] Support relocatable linking for offloading (PR #80066)

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 10:18:22 PST 2024


================
@@ -265,6 +329,11 @@ Error runLinker(ArrayRef<StringRef> Files, const ArgList &Args) {
     LinkerArgs.push_back(Arg);
   if (Error Err = executeCommands(LinkerPath, LinkerArgs))
     return Err;
+
+  if (Args.hasArg(OPT_relocatable))
+    if (Error Err = relocateOffloadSection(Args, ExecutableName))
----------------
Artem-B wrote:

We could just `return relocateOffloadSection(Args, ExecutableName)`

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


More information about the cfe-commits mailing list