<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Thanks for following up :)</div><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 24, 2016, at 8:46 PM, Fabio Kaminski &lt;<a href="mailto:fabiokaminski@gmail.com" class="">fabiokaminski@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">1 - For me at least the "link" directive works only for shared libs,<br class="">and given you are looking into the symbols of the .a file and not the<br class="">.dylib or .so, that its probably what the modulemap will try to link<br class="">against?</div></div></blockquote><div><br class=""></div><div>Ah, interesting! Is there a reason for this limitation? Could a bug be filed for a swiftpm enhancement that automatically adds `-l` flags for whatever is included as a `link` in the module map?</div><div><br class=""></div></div><blockquote type="cite" class=""><div>I think the [extern_c] directive maybe is the magic sauce that will<br class="">try to link the symbols using the correct mangling technique "_" ?<br class=""></div></blockquote><div><br class=""></div><div>Unfortunately [extern_c] doesn't seem to have any effect on linking, though it appears to be the correct attribute according to <a href="http://clang.llvm.org/docs/Modules.html#module-declaration" class="">http://clang.llvm.org/docs/Modules.html#module-declaration</a>. I was able to fix the problem, though, with this Makefile in my dependent project:</div><div><br class=""></div><div><a href="https://gist.github.com/stephencelis/7f76f8d26a1df64ee3ff#file-llvm_makefile-mak" class="">https://gist.github.com/stephencelis/7f76f8d26a1df64ee3ff#file-llvm_makefile-mak</a></div><div><br class=""></div><div>It's an unfortunate limitation. Requiring dependent projects to set certain `-Xcc` and `-Xlinker` flags makes the parent CLLVM dependency a lot less easy to use. I'm not sure if there have been evolution, bug, or internal discussions around this, though. At least I'm unblocked in the meantime. Thanks again!</div><div><br class=""></div><div>--</div>Stephen</body></html>