<div dir="ltr">I'm working with a C++ code generator that produces multiple instances of the same definition (specifically, it generates explicit instantiations of the same template in multiple output source files). With the GNU ld, I'm able to link successfully using the --allow-multiple-definitions flag; however this flag is not supported in llvm-ld.<div>

<br></div><div>Is there any way I can either convince llvm-ld to accept this without producing an error, or alternatively is there any way in C++ that I can trick the compiler into making these definitions linkonce?<br><div>

<div><br></div>-- <br>-- Talin
</div></div></div>