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

Support static linking with glibc and target-feature=+crt-static #77386

Merged
merged 4 commits into from
Oct 6, 2020

Commits on Oct 5, 2020

  1. Update libc to 0.2.79

    This also fixes issues with inconsistent `unsafe` on functions.
    joshtriplett committed Oct 5, 2020
    Configuration menu
    Copy the full SHA
    16ebf75 View commit details
    Browse the repository at this point in the history
  2. unwind: Move linux-gnu library linking to lib.rs and libc

    This unifies it with the handling of `target-feature=+crt-static` on
    other platforms, and allows for supporting static glibc in the future.
    joshtriplett committed Oct 5, 2020
    Configuration menu
    Copy the full SHA
    9d952cb View commit details
    Browse the repository at this point in the history
  3. Support static linking with glibc and target-feature=+crt-static

    With this change, it's possible to build on a linux-gnu target and pass
    RUSTFLAGS='-C target-feature=+crt-static' or the equivalent via a
    `.cargo/config.toml` file, and get a statically linked executable.
    
    This requires libc 0.2.79, which adds support for static linking with
    glibc.
    
    Add `crt_static_respected` to the `linux_base` target spec.
    
    Update `android_base` and `linux_musl_base` accordingly. Avoid enabling
    crt_static_respected on Android platforms, since that hasn't been
    tested.
    joshtriplett committed Oct 5, 2020
    Configuration menu
    Copy the full SHA
    a3944a0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d9f29fd View commit details
    Browse the repository at this point in the history