Skip to content

Disable exceptions without setting additional env flags #1317

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
cschlosser opened this issue Feb 15, 2024 · 0 comments · May be fixed by #1343
Open

Disable exceptions without setting additional env flags #1317

cschlosser opened this issue Feb 15, 2024 · 0 comments · May be fixed by #1343

Comments

@cschlosser
Copy link

Hi,

I'm building on a system with -fno-exceptions.
The only way I found to prevent the throw statement from leading to a compiler error is defining RUST_CXX_NO_EXCEPTIONS in the CXXFLAGS env var as it's read by cc.
I don't want to set this as a global define for all builds using the environment variable if possible.

Is this the preferred solution or am I missing something?

If this is currently the preferred way of dealing with this would you be open to exposing this (and maybe exception handling in the crate in general) through a feature flag?
Or would you prefer a more implicit solution like #1174?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant