Skip to content

no way to disable exception handling with static/dynamic linking #10780

@thestinger

Description

@thestinger
Contributor

There's no equivalent to -Z no-landing-pads for static/dynamic libraries. Since it's not possible to mark foreign functions as not throwing like it is with __attribute__((nothrow)), Rust will always output lots of unwinding tables with a Rust-specific unwinding personality/calls. This would be a lot less bad if Rust actually read the C library headers with libclang and dealt with the attributes like nothrow.

Activity

brson

brson commented on Jan 30, 2014

@brson
Contributor

Can -Z no-landing-pads work for static and dynamic libraries?

This is similar to #11871 where we have a language feature that has a runtime dependency, but it can't be turned off, and you wouldn't want to accidentally combine crates with the wrong options. Perhaps we can add something to the metadata to record which runtime features were in use, and start adding these options.

thestinger

thestinger commented on Jan 30, 2014

@thestinger
ContributorAuthor

I think adding a flag to the metadata is the best idea. It would be really nice to omit the landing pads and invoke calls in the first place too.

added
I-slowIssue: Problems and improvements with respect to performance of generated code.
on Sep 19, 2014
thestinger

thestinger commented on Nov 1, 2014

@thestinger
ContributorAuthor

Closing in favour of #18511.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-compiletimeIssue: Problems and improvements with respect to compile times.I-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @brson@thestinger

        Issue actions

          no way to disable exception handling with static/dynamic linking · Issue #10780 · rust-lang/rust