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

SEH from boost::asio win_mutex.ipp not compatible with clang SYCL #7

Open
101001000 opened this issue Dec 5, 2022 · 4 comments
Open

Comments

@101001000
Copy link
Owner

Windows uses SEH for some exception handling. \boost\asio\detail\impl\win_mutex.ipp and \boost\asio\detail\impl\win_static_mutex.ipp has a __try statement which is not compatible with the sycl clang build.

It's possible to replace those "__try" statements with "try" and it will work, even if I don't really know the consequences.

@101001000
Copy link
Owner Author

Apparently, I need to use clang-cl for compilation to be SEH compatible on Windows.

I was not able to compile with clang-cl Boost::json, the Boost::json CMakeLists is not able to find "compiler features" for Clang (neither 16.0 or 15.0)

@101001000
Copy link
Owner Author

CMake was not able to find compile features when adding "-fsycl" tag.

A quick patch I did in commit 7b20b5e was to add the needed features by myself with:

set(CMAKE_CXX_COMPILE_FEATURES cxx_constexpr cxx_std_11 cxx_alias_templates cxx_variadic_templates cxx_decltype)

in the CMakeLists.txt file

@101001000
Copy link
Owner Author

Fixed forking Boost::asio repo and commenting the __try and __except blocks

@101001000
Copy link
Owner Author

I think this maybe could be solved with this flag: /EHsc

@101001000 101001000 reopened this Sep 9, 2023
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

1 participant