rust-lang / rust-lang/rfcs

Provide a -Z option to emit the linker flags alone.

Open
#1,830 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T-compiler
Dominant language
Markdown
Stars
6.6k
Forks
1.7k
Avg merge
16h 14m
Merged PRs (30d)
1

Description

I'd like to integrate better some rust component in a larger project (namely VLC).

I have already an horrible kludge sort of working, but one of the quite annoying issues for this use case and other is the inability to pass to the larger build system the linker flags.

A smaller use-case:

  • rust-based but API-compatible implementation of a C library for C-linking consumers
    • the link line needs to be in the pkg-conf file.
    • the link line should be passed across the C glue.

I read that getting rustc to play along with other build systems is in the roadmap for 2017 and @japaric pointed me to here as well.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names rustc but no files or tests. Start by locating rustc's command-line option handling and linker-flag emission, then trace how those flags could be exposed to a C or pkg-config build. Done means a documented -Z option emits only the linker flags needed by the Rust component and is covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.