Skip to content

Allow linking JS libraries just like .a #5221

Closed
@RReverser

Description

@RReverser

Would it be possible to allow JS libraries to be linked as normal objects (via -l and recognising .js extension suffix like linker already does for other extensions)?

This would help a lot, for example, to avoid teaching Rust --js-library specifically for Emscripten target - rust-lang/rust#41409 - and likely would help other tooling that can already pass objects to downstream linker via -l.

If not, that's fine, I can continue working to bring this as a separate gated feature to Rust, but decided to ask if this is something that can be considered changing on Emscripten side.

Activity

kripken

kripken commented on May 15, 2017

@kripken
Member

We had a PR for that, I believe. I think it was motivated by Rust in fact. I don't remember if it landed or not, but it was on the way to, so maybe we should find it and move it along.

RReverser

RReverser commented on May 15, 2017

@RReverser
CollaboratorAuthor

Sounds good to me if you're on board. I'll try to find it and, if not, will make my own.

RReverser

RReverser commented on May 15, 2017

@RReverser
CollaboratorAuthor

Found #4816 if that's what you mean. Also found similar but older #2809.

Which one is a preferrable starting point?

kripken

kripken commented on May 15, 2017

@kripken
Member

Thanks, yeah, #4816 is the one I meant. Reading it again now, I'm not sure why it was closed. @juj had a few concerns, but they weren't fully discussed, and I think they could be addressed - we could reduce the risk of confusion in a few ways, like useful debug logging etc.

In terms of next steps, maybe @juj can say if he's strongly opposed to this? If we can convince him, then that PR is a good starting point.

stale

stale commented on Aug 30, 2019

@stale

This issue has been automatically marked as stale because there has been no activity in the past 2 years. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @kripken@RReverser

        Issue actions

          Allow linking JS libraries just like .a · Issue #5221 · emscripten-core/emscripten