Skip to content
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

>= 1.0.102 wasm build breaks #1125

Closed
juntyr opened this issue Jul 4, 2024 · 2 comments
Closed

>= 1.0.102 wasm build breaks #1125

juntyr opened this issue Jul 4, 2024 · 2 comments

Comments

@juntyr
Copy link

juntyr commented Jul 4, 2024

#1114 conflates wasm with wasi targets. While wasi targets should change the sysroot to the wasi-sdk-provided one, the non-wasi target wasm32-unknown-unknown should probably keep the default sysroot.

#1105 extended the disabling of wasm exceptions from just wasm32-wasip1 to all wasi wasm targets. While this is technically correct, I am building a wasip1 module with exceptions (by stubbing some functions), which broke after upgrading cc. Perhaps cc could somehow allow a build-script to opt out of disabling the exceptions?

Thank you for your help!

@NobodyXu
Copy link
Collaborator

NobodyXu commented Jul 4, 2024

the non-wasi target wasm32-unknown-unknown should probably keep the default sysroot.

Thanks, so looks like we need to special case it.

While this is technically correct, I am building a wasip1 module with exceptions (by stubbing some functions), which broke after upgrading cc.

Maybe CRATE_CC_NO_DEFAULTS could help here?

@juntyr
Copy link
Author

juntyr commented Jul 4, 2024

While this is technically correct, I am building a wasip1 module with exceptions (by stubbing some functions), which broke after upgrading cc.

Maybe CRATE_CC_NO_DEFAULTS could help here?

Thanks for the suggestion! Setting CRATE_CC_NO_DEFAULTS=1 did get me closer to a solution, though I had to manually set some flags, e.g. -O3, myself to regain the previous behavior. This is good enough for me right now :)

@juntyr juntyr closed this as completed Jul 4, 2024
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