On Tue, Oct 28, 2014 at 9:07 AM, Mark Callow <[email protected]>
wrote:

>  On 24/10/2014 05:18, Alon Zakai wrote:
>
> 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.
>
>   The more Emscripten diverges from the standard behavior of compiler
> tool chains, the harder it is to adapt other build tools to work with it.
> The issues I am having with GYP are symptomatic of this.
>
> In the specific case of "-s USE_SDL=2"  vs the standard "-lSDL2", if the
> latter is brittle, why isn't -lc brittle for regular C/C++ compilers? There
> is a well defined search path; directories specified with -L come before
> the default directories. In other words, it is not brittle at all. If you
> specify a -L that contains a library with the same name as a system
> library, you are expected to know what you are doing.
>
> Emscripten should likewise search any specified -L directories and, if a
> specified library isn't found, then it should search its built-in libraries
> and equivalent functions and then the ports.
>
> It should also not issue errors that a library specified with -l can't be
> found, if that libraries functionality is built into Emscripten. E.g.
> specifying -lGLESv2 should not cause emlink to spit out "Error:
> libGLESv2.a: File not Found" (or something like that) as the GLESv2
> functions are all included in Emscripten.
>
> This changes would make Emscripten much more friendly to other build tools.
>

For what little it is worth, this sounds good / right to me.

 - Bruce

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