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.
Regards
-Mark
--
注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合
が有ります。正式なメール受信者では無い場合はメール複製、 再配信または情
報の使用を固く禁じております。エラー、手違いでこのメールを受け取られまし
たら削除を行い配信者にご連絡をお願いいたし ます.
NOTE: This electronic mail message may contain confidential and
privileged information from HI Corporation. If you are not the intended
recipient, any disclosure, photocopying, distribution or use of the
contents of the received information is prohibited. If you have received
this e-mail in error, please notify the sender immediately and
permanently delete this message and all related copies.
--
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.