Skip to content

build fully statically linked executable for Android not supported #10765

Closed as not planned
@leleliu008

Description

@leleliu008

Problem

I want to build a fully statically linked executable for Android.

I respectively tried following settings:

export RUSTFLAGS="$RUSTFLAGS -C target-feature=+crt-static"
export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-static"

both are not work. the final executable is always dynamically-linked.

Steps

build https://github.com/sharkdp/bat.git for Android

Possible Solution(s)

No response

Notes

No response

Version

cargo 1.59.0 (49d8809dc 2022-02-10)
release: 1.59.0
commit-hash: 49d8809dc2d3e6e0d5ec634fcf26d8e2aab67130
commit-date: 2022-02-10
host: x86_64-unknown-linux-gnu
libgit2: 1.3.0 (sys:0.13.23 vendored)
libcurl: 7.80.0-DEV (sys:0.4.51+curl-7.80.0 vendored ssl:OpenSSL/1.1.1l)
os: Ubuntu 22.04 (jammy) [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions