Skip to content

--print=native-static-libs should behave as the other --print commands and not create output #61089

@lu-zero

Description

@lu-zero
Contributor

It creates .a instead.

And if one wants to get the link line in shell you have this mouthful expression:

NATIVE_LIBS=`rustc --crate-type staticlib \
  --print native-static-libs 2>&1 - < /dev/null | \
  grep native-static-libs | cut -d ':' -f 3`

Activity

added
A-driverArea: rustc_driver that ties everything together into the `rustc` compiler
A-frontendArea: Compiler frontend (errors, parsing and HIR)
C-bugCategory: This is a bug.
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on May 23, 2019
added a commit that references this issue on Feb 16, 2021
9809ee0
Enselic

Enselic commented on Nov 24, 2023

@Enselic
Member

Triage: Reproducer:

$ mkdir new-empty-dir
$ cd new-empty-dir
$ rustc --crate-type staticlib --print native-static-libs - </dev/null
$ [ -f *.a ] && echo ".a was created :("
.a was created :(
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

    A-driverArea: rustc_driver that ties everything together into the `rustc` compilerA-frontendArea: Compiler frontend (errors, parsing and HIR)C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @Enselic@lu-zero@jonas-schievink

      Issue actions

        --print=native-static-libs should behave as the other --print commands and not create output · Issue #61089 · rust-lang/rust