[PATCH] D110224: Wrap xar/xar.h include in extern "C" block

Mike Hommey via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 22 00:57:18 PDT 2021


glandium created this revision.
glandium added a reviewer: lld-macho.
Herald added a reviewer: gkm.
Herald added a project: lld-macho.
glandium requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Without such wrapping, linking lld fails with missing symbols because of
C++ symbol mangling.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110224

Files:
  lld/MachO/SyntheticSections.cpp


Index: lld/MachO/SyntheticSections.cpp
===================================================================
--- lld/MachO/SyntheticSections.cpp
+++ lld/MachO/SyntheticSections.cpp
@@ -27,7 +27,9 @@
 
 #ifdef LLVM_HAVE_LIBXAR
 #include <fcntl.h>
+extern "C" {
 #include <xar/xar.h>
+}
 #endif
 
 using namespace llvm;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110224.374133.patch
Type: text/x-patch
Size: 316 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210922/e78e77fd/attachment.bin>


More information about the llvm-commits mailing list