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

add -Z pre-link-arg{,s} to rustc #41971

Merged
merged 1 commit into from
May 19, 2017
Merged

Conversation

japaric
Copy link
Member

@japaric japaric commented May 13, 2017

This PR adds two unstable flags to rustc: -Z pre-link-arg and -Z pre-link-args. These are the counterpart of the existing -C link-arg{,s}
flags and can be used to pass extra arguments at the beginning of the linker
invocation, before the Rust object files are passed.

I have started a discussion on the rust-embedded RFCs repo about settling on a
convention for passing extra arguments to the linker and there are two options
on discussion: .cargo/config's target.$T.rustflags and custom target
specification files ({pre,,post}-link-args fields). However, to compare these
two options on equal footing this -Z pre-link-arg feature is required.

Therefore I'm requesting landing this -Z pre-link-arg flag as an experimental
feature to evaluate these two options.

cc @brson
r? @alexcrichton

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@Mark-Simulacrum
Copy link
Member

Looks like this has a merge conflict.

@Mark-Simulacrum Mark-Simulacrum added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 13, 2017
This commit adds two unstable flags to `rustc`: `-Z pre-link-arg` and `-Z
pre-link-args`. These are the counterpart of the existing `-C link-arg{,s}`
flags and can be used to pass extra arguments at the *beginning* of the linker
invocation, before the Rust object files are passed.
@japaric
Copy link
Member Author

japaric commented May 13, 2017

@Mark-Simulacrum fixed

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 13, 2017
@aidanhs
Copy link
Member

aidanhs commented May 18, 2017

Ping @alexcrichton for review.

@alexcrichton
Copy link
Member

@bors: r+

Oop sorry for the delay!

@bors
Copy link
Contributor

bors commented May 18, 2017

📌 Commit 94d2c43 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented May 18, 2017

⌛ Testing commit 94d2c43 with merge ccf8c44...

bors added a commit that referenced this pull request May 18, 2017
add -Z pre-link-arg{,s} to rustc

This PR adds two unstable flags to `rustc`: `-Z pre-link-arg` and `-Z
pre-link-args`. These are the counterpart of the existing `-C link-arg{,s}`
flags and can be used to pass extra arguments at the *beginning* of the linker
invocation, before the Rust object files are passed.

I have [started] a discussion on the rust-embedded RFCs repo about settling on a
convention for passing extra arguments to the linker and there are two options
on discussion: `.cargo/config`'s `target.$T.rustflags` and custom target
specification files (`{pre,,post}-link-args` fields). However, to compare these
two options on equal footing this `-Z pre-link-arg` feature is required.

[started]: rust-embedded/wg#24

Therefore I'm requesting landing this `-Z pre-link-arg` flag as an experimental
feature to evaluate these two options.

cc @brson
r? @alexcrichton
@bors
Copy link
Contributor

bors commented May 18, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

@bors: retry

something tells me that libstd doesn't actually take an hour to compile

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request May 18, 2017
add -Z pre-link-arg{,s} to rustc

This PR adds two unstable flags to `rustc`: `-Z pre-link-arg` and `-Z
pre-link-args`. These are the counterpart of the existing `-C link-arg{,s}`
flags and can be used to pass extra arguments at the *beginning* of the linker
invocation, before the Rust object files are passed.

I have [started] a discussion on the rust-embedded RFCs repo about settling on a
convention for passing extra arguments to the linker and there are two options
on discussion: `.cargo/config`'s `target.$T.rustflags` and custom target
specification files (`{pre,,post}-link-args` fields). However, to compare these
two options on equal footing this `-Z pre-link-arg` feature is required.

[started]: rust-embedded/wg#24

Therefore I'm requesting landing this `-Z pre-link-arg` flag as an experimental
feature to evaluate these two options.

cc @brson
r? @alexcrichton
@bors
Copy link
Contributor

bors commented May 19, 2017

⌛ Testing commit 94d2c43 with merge 6ba3b15...

@bors
Copy link
Contributor

bors commented May 19, 2017

💔 Test failed - status-appveyor

@alexcrichton
Copy link
Member

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request May 19, 2017
add -Z pre-link-arg{,s} to rustc

This PR adds two unstable flags to `rustc`: `-Z pre-link-arg` and `-Z
pre-link-args`. These are the counterpart of the existing `-C link-arg{,s}`
flags and can be used to pass extra arguments at the *beginning* of the linker
invocation, before the Rust object files are passed.

I have [started] a discussion on the rust-embedded RFCs repo about settling on a
convention for passing extra arguments to the linker and there are two options
on discussion: `.cargo/config`'s `target.$T.rustflags` and custom target
specification files (`{pre,,post}-link-args` fields). However, to compare these
two options on equal footing this `-Z pre-link-arg` feature is required.

[started]: rust-embedded/wg#24

Therefore I'm requesting landing this `-Z pre-link-arg` flag as an experimental
feature to evaluate these two options.

cc @brson
r? @alexcrichton
bors added a commit that referenced this pull request May 19, 2017
@bors bors merged commit 94d2c43 into rust-lang:master May 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants