Skip to content

Feature request: environment variable to respect the -shared flag #16481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hoodmane opened this issue Mar 12, 2022 · 2 comments
Open

Feature request: environment variable to respect the -shared flag #16481

hoodmane opened this issue Mar 12, 2022 · 2 comments

Comments

@hoodmane
Copy link
Collaborator

In Pyodide, we run into a fair amount of trouble convincing various build systems to pass -s SIDE_MODULE=1 through to the compiler. Also, if a library asks to be -shared we always want to respect it. I finally thought to just patch

diagnostics.warning('emcc', 'linking a library with `-shared` will emit a static object file. This is a form of emulation to support existing build systems. If you want to build a runtime shared library use the SIDE_MODULE setting.')

to set settings.SIDE_MODULE = True but it would be helpful to have a feature for this.

@hoodmane
Copy link
Collaborator Author

The comment there says:

 # Until we have a better story for actually producing runtime shared libraries
 # we support a compatibility mode where shared libraries are actually just
 # object files linked with `wasm-ld --relocatable` or `llvm-link` in the case
 # of LTO.

But Emscripten has a good system for producing shared libraries =)

@sbc100
Copy link
Collaborator

sbc100 commented Mar 13, 2022

Perhaps related: #16281

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants