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

Cannot disable -fwasm-exceptions with exception-handling-method=js #412

Open
orhun-sketchup opened this issue Aug 29, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@orhun-sketchup
Copy link

orhun-sketchup commented Aug 29, 2024

Even though exception-handling-method=js is passed to b2, I still end up with -fwasm-exceptions used in em++ compiler flags.

How can I prevent b2 adding it?

I am using,
os: Windows 10
compiler: emscripten 3.1.65
boost: 1.86.0
b2: 5.2.1

I use a modified conan-center-index boost recipe to build boost (i.e. add exception-handling-method=js to it, among other things.)

This is the b2 command line that I end up with:

b2 -q address-model=32 exception-handling-method=js --layout=system --user-config=<PATH>user-config.jam -sNO_ZLIB=1 -sNO_BZIP2=1 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=off --disable-iconv threading=multi visibility=hidden link=static variant=debug --with-atomic --with-charconv --with-chrono --with-container --with-date_time --with-exception --with-filesystem --with-regex --with-system --with-thread toolset=emscripten cxxstd=17 define=BOOST_SYSTEM_NO_DEPRECATED=1 define=BOOST_ASIO_NO_DEPRECATED=1 define=BOOST_FILESYSTEM_NO_DEPRECATED=1 define=BOOST_DLL_USE_STD_FS=1 pch=on linkflags="" cxxflags="-fPIC -s DISABLE_EXCEPTION_CATCHING=0" install --prefix=<PATH> -j24 --abbreviate-paths -d1 --debug-configuration --build-dir="<PATH>"

user-config.jam contains:

using "emscripten" :  :  "<PATH>/em++.bat" : 
<archiver>"<PATH>/emar.bat" <ranlib>"<PATH>/emranlib.bat"  ;

This is the generated compiler command line:
"<PATH>/em++.bat" -std=c++17 -fvisibility-inlines-hidden -fwasm-exceptions -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -m32 -fPIC -s DISABLE_EXCEPTION_CATCHING=0 -DBOOST_ALL_NO_LIB=1 -DBOOST_ASIO_NO_DEPRECATED=1 -DBOOST_COBALT_USE_STD_PMR=1 -DBOOST_CONTAINER_STATIC_LINK=1 -DBOOST_DLL_USE_STD_FS=1 -DBOOST_FILESYSTEM_NO_DEPRECATED=1 -DBOOST_SYSTEM_NO_DEPRECATED=1 -I"." -c -o "<PATH>\bin.v2\libs\container\build\emscr-3.1.6\dbg\adrs-mdl-32\cxstd-17-iso\lnk-sttc\trgt-os-nn\thrd-mlt\vsblt-hdn\global_resource.o" "libs/container/src/global_resource.cpp"

-fwasm-exceptions is still being used.

Thanks!

NOTE:
It is not related but I find the use of emscr-3.1.6 in the obj file path, 'interesting'. Instead of the actual emscripten compiler version of 3.1.65.

@orhun-sketchup orhun-sketchup added the bug Something isn't working label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@orhun-sketchup and others