<div dir="ltr">--exclude-libs is a linker option.  gcc just happens to pass it through for you.  Clang will do the same if you escape it with something like -Wl,--exclude-libs,ALL.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Jun 26, 2013 at 11:50 AM, Peng Cheng <span dir="ltr"><<a href="mailto:gm4cheng@gmail.com" target="_blank">gm4cheng@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Hi,</div><div><br></div><div>I am creating a shared libary from some objs and a static libary ( e.g., llvm, a 3rd party static lib ).  the static library is only used by functions in the objs, and is not intended to be exposed to shared library clients.  so, I do not want to export symbols in the static library, to avoid potential name conflict when this static library is also linked into other shared libraries.</div>


<div><br></div><div>with gcc, I am using --exclude-libs to remove symbols in static library.</div><div><br></div><div>while with clang, it seems there is no such equivalent option.</div><div><br></div><div>my questions are that:</div>


<div><br></div><div>1. are there any equivalent options in clang, but with different name?</div><div><br></div><div>2. if not, are there any workaround ( besides adding export/import declaration in the source code of the static library, which is out of my control ) ?</div>


<div><br></div><div>3. I am pretty sure that linux is using a common name space for shared library symbols, which tends to cause name conflicts.   what about maci and windows?</div><div><br></div><div>Your help is really appreciated!</div>


<div><br></div><div>Thanks,</div><div><br></div><div>-Peng</div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>