Skip to content

Disable exceptions without setting additional env flags #1317

Open
@cschlosser

Description

@cschlosser

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions