On Wed, Oct 22, 2014 at 7:43 PM, Mark Callow <[email protected]>
wrote:

>  On 23/10/2014 03:47, Alon Zakai wrote:
>
>  We could provide precompiled versions in the sdk, but it would increase
> the sdk size quite a bit, especially as we add more ports. So not sure what
> is best here.
>
> I was thinking the SDK would show a list of available ports, much in the
> way it shows a list of available tools now. You could then install the
> ports of interest. They wouldn't be downloaded until install so there would
> be virtually no impact on the size of the sdk download.
>

emcc --show-ports lists the available ports. We could improve the
presentation there though.


>
> Not sure what you mean by "build just libSDL2"? It gets built and stored
> in the cache (~/.emscripten_cache), then used from there. So it is built on
> its own (once), then linked in.
>
> You explained that adding -s USE_SDL=2 would cause emcc to fetch and build
> SDL2 and include it in the app. I was wondering how you could fetch and
> build just SDL2. If the result is stored in the cache though, there is
> probably not much need to download and build it separately.
>
> I am generating MSVS projects with GYP that include configurations for
> building for Win32, x64 and Emscripten platforms. (I have modified GYP to
> understand the vs-tool properties; I need to write some tests before Google
> will incorporate the changes.) The issue I have is that, due to a
> fundamental limitation of GYP, I have to use the same list of libraries for
> each configuration. Therefore it would really be helpful if
>
>    - emcc (emlink?) recognized the names of built-in libraries (e.g. -l
>    libGLESv2) and ignored them, instead of searching for a library with that
>    name. I have had to create empty libraries to avoid errors.
>     - libraries from ports were added via, e.g. -lSDL2 during the link
>    step rather than -s USE_SDL=2 during compile. This would also be more in
>    keeping with native tool chains.  At present I am using a pre-compiled
>    libSDL2 from gsathya with -lSDL2 on the link step and it is working fine.
>
>
We did consider using -lSDL2, but Jukka convinced me that it was too
brittle - could have confusion with a local library of that name, etc. So
-s USE_SDL=2 is an explicit way to say "use the ports version of this",
while -lSDL2 is "use a local copy of it".

I think that is a safer default behavior, but I wouldn't be opposed to
having an option to treat -lSDL2 as using it from ports.

- Alon

-- 
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.

Reply via email to