Skip to content

Fix build on Emscripten tip of tree #5019

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 4 commits into from
Sep 6, 2022
Merged

Fix build on Emscripten tip of tree #5019

merged 4 commits into from
Sep 6, 2022

Conversation

kripken
Copy link
Member

@kripken kripken commented Sep 6, 2022

No description provided.

@kripken kripken requested a review from sbc100 September 6, 2022 18:36
CMakeLists.txt Outdated
@@ -447,6 +448,7 @@ if(EMSCRIPTEN)
else()
target_link_libraries(binaryen_js "-sEXPORT_ES6=1")
endif()
target_link_libraries(binaryen_js "-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[$allocateUTF8OnStack]")
Copy link
Member

Choose a reason for hiding this comment

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

you don't need the square brackets here or above.

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried without the square brackets, and it hits an escaping issue with the $.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, actually my local testing must have been wrong... it's still failing on CI due to escaping 😢

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm trying $$ now for the escaping. I have to try on CI as for some reason my local CMake behaves differently.

Is there a simpler way to fix the escaping that I'm missing perhaps?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like I've hit this problem before #4793 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

You can also use -sEXPORTED_RUNTIME_METHODS=allocateUTF8OnStack which doesn't use $-prefixing.

Copy link
Member

Choose a reason for hiding this comment

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

Oh I see that you did that :)

@kripken kripken merged commit e584f69 into main Sep 6, 2022
@kripken kripken deleted the new.emscripten branch September 6, 2022 20:54
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.

3 participants