Skip to content

Better message when a side module needs exceptions #9698

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

Merged
merged 7 commits into from
Nov 6, 2019
Merged

Better message when a side module needs exceptions #9698

merged 7 commits into from
Nov 6, 2019

Conversation

kripken
Copy link
Member

@kripken kripken commented Oct 24, 2019

The main module needs to be built with exceptions support for a side module to use it, both for system libs and for the current JS support. This informs users they need to do that if a side module throws and the main wasn't built properly to support that.

Helps #9691

Btw @sbc100 I noticed while writing this patch that EXPORT_ALL is needed for main module to add the JS glue code to where it can be imported from side modules. I was surprised we don't enable that flag by default, maybe I'm missing something?

@kripken kripken requested a review from sbc100 October 24, 2019 17:51
@kripken
Copy link
Member Author

kripken commented Nov 6, 2019

review ping @sbc100

Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests seems rather long.. but I don't remember if we have helpers to make that kind of things easier to test.

@kripken kripken merged commit ebe882c into incoming Nov 6, 2019
@delete-merged-branch delete-merged-branch bot deleted the ex branch November 6, 2019 18:05
@kripken
Copy link
Member Author

kripken commented Nov 6, 2019

Yeah, not sure there's a shorter way. We don't have many such tests in other.

@sbc100 did you see my question in the PR title about EXPORT_ALL?

@sbc100
Copy link
Collaborator

sbc100 commented Nov 6, 2019

I wasn't aware of any differences between EXPORT_ALL with llvm backend vs fastcomp? or are you seeing the same issue with fastcomp?

@kripken
Copy link
Member Author

kripken commented Nov 6, 2019

It doesn't look related to the backend, same on fastcomp.

I investigated a bit more and opened #9793

belraquib pushed a commit to belraquib/emscripten that referenced this pull request Dec 23, 2020
)

The main module needs to be built with exceptions support for a side module to
use it, both for system libs and for the current JS support. This informs users
they need to do that if a side module throws and the main wasn't built properly
to support that.

Helps emscripten-core#9691
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

Successfully merging this pull request may close these issues.

2 participants