<div dir="ltr">Hi,<div><br></div><div style>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 style><br></div><div style>with gcc, I am using --exclude-libs to remove symbols in static library.</div><div style><br></div><div style>while with clang, it seems there is no such equivalent option.</div><div style>
<br></div><div style>my questions are that:</div><div style><br></div><div style>1. are there any equivalent options in clang, but with different name?</div><div style><br></div><div style>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 style><br></div><div style>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 style><br></div><div style>
Your help is really appreciated!</div><div style><br></div><div style>Thanks,</div><div style><br></div><div style>-Peng</div><div style><br></div></div>