[PATCH] D33880: COFF: Introduce LD shim around LINK

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 30 13:08:09 PDT 2017


mstorsjo added inline comments.


================
Comment at: lld/lib/Shim/COFFLdShim.cpp:70
+BumpPtrAllocator BAlloc;
+StringSaver Saver{BAlloc};
+
----------------
FWIW, this fails to link for me (on linux), with following error:

```
lib/liblldCOFFShim.a(COFFLdShim.cpp.o):(.bss._ZN3lld4coff5SaverE+0x0): multiple definition of `lld::coff::Saver'
lib/liblldCOFF.a(Driver.cpp.o):(.bss._ZN3lld4coff5SaverE+0x0): first defined here
lib/liblldCOFFShim.a(COFFLdShim.cpp.o):(.bss._ZN3lld4coff6BAllocE+0x0): multiple definition of `lld::coff::BAlloc'
lib/liblldCOFF.a(Driver.cpp.o):(.bss._ZN3lld4coff6BAllocE+0x0): first defined here
```

I did this modification locally to fix it:
```
-BumpPtrAllocator BAlloc;
-StringSaver Saver{BAlloc};
+extern StringSaver Saver;
```


Repository:
  rL LLVM

https://reviews.llvm.org/D33880





More information about the llvm-commits mailing list