I believe LLVM's "opt" tool can do that using -internalize. You'd need to have one zlib linked into the code that uses it, and another into the rest of the code, and then internalize one of the two. For an example see get_safe_internalize() in emscripten's tools/shared.py (by default emscripten internalizes everything but what is exported - note how you'll have to specify what not to internalize).
On Thu, Sep 6, 2018 at 8:57 AM Ricardo Reis <[email protected]> wrote: > Hi! > > I'm compiling a shared library with Emscripten that has ZLIB embedded on > it (It's a slightly modified version of the actual ZLIB, so it's important > to use it instead of the actual ZLIB or system ZLIB). > The problem is that I'm linking the bytecode library into another > Emscripten project which is already embedding its own ZLIB, so Emscripten > compiler will throw a message saying the ZLIB symbols have been declared > twice. > > I know there is an external file in GCC to hide exported symbols (make > them non-global), so this kind of conflict wouldn't happen. > Is there such thing for Emscripten? > > Best regards, > Ricardo Reis. > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
