bfgroup / b2

B2 makes it easy to build C++ projects, everywhere.
https://www.bfgroup.xyz/b2/
Boost Software License 1.0
75 stars 228 forks source link

Option to turn off wasm-exceptions not available for emscripten builds #401

Closed dsamo closed 1 month ago

dsamo commented 1 month ago

Hello, in our company we use boost builds in a webassembly client using emscripten.

Since boost 1.85 it seems by looking into the emscripten jam file that there is no way to turn off wasm-exceptions unless we use node < 16 or emscripten major version < 2. Currently our wasm client is still using js exceptions and if we are to transition we need to put time there to investigate certain things. But with the restriction above we now have a client being built with js exceptions and a library (boost) being built with wasm-exceptions which leads to undefined symbols linker error for __wasm_lpad_context.

Is there a feature flag to build with js-exceptions explicitly?

Kojoley commented 1 month ago

exception-handling-method=js to build with js exceptions implementation instead of wasm exceptions. exception-handling=off to turn off exceptions entirely.

dsamo commented 1 month ago

exception-handling-method=js to build with js exceptions implementation instead of wasm exceptions.

exception-handling=off to turn off exceptions entirely.

My jam file knowledge failed me here. Verified this works. Thanks!