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

rustc: Implement a new `--print cfg` flag #31278

Merged
merged 1 commit into from Feb 9, 2016

Conversation

Projects
None yet
4 participants
@alexcrichton
Copy link
Member

alexcrichton commented Jan 29, 2016

This commit is an implementation of the new compiler flags required by RFC
1361
. This specifically adds a new cfg option to the --print flag to
the compiler. This new directive will print the defined #[cfg] directives by
the compiler for the target in question.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 29, 2016

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@brson

This comment has been minimized.

Copy link
Contributor

brson commented Feb 8, 2016

If you try to write it down in the source as well it fails:

That's super surprising. rustc --cfg "foo(bar)" is accepted.

@brson brson referenced this pull request Feb 8, 2016

Closed

--cfg accepts invalid cfgs #31495

@brson

This comment has been minimized.

Copy link
Contributor

brson commented Feb 8, 2016

Please add an unreachable assertion to the MetaList case and a comment explaining why its impossible, then r=me.

@alexcrichton alexcrichton force-pushed the alexcrichton:print-cfg branch from 2330495 to e50eac5 Feb 8, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Feb 8, 2016

@bors: r=brson e50eac5

bors added a commit that referenced this pull request Feb 8, 2016

Auto merge of #31278 - alexcrichton:print-cfg, r=brson
This commit is an implementation of the new compiler flags required by [RFC
1361][rfc]. This specifically adds a new `cfg` option to the `--print` flag to
the compiler. This new directive will print the defined `#[cfg]` directives by
the compiler for the target in question.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1361-cargo-cfg-dependencies
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 8, 2016

⌛️ Testing commit e50eac5 with merge 798e3c6...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 8, 2016

💔 Test failed - auto-win-gnu-64-opt

rustc: Implement a new `--print cfg` flag
This commit is an implementation of the new compiler flags required by [RFC
1361][rfc]. This specifically adds a new `cfg` option to the `--print` flag to
the compiler. This new directive will print the defined `#[cfg]` directives by
the compiler for the target in question.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1361-cargo-cfg-dependencies.md

@alexcrichton alexcrichton force-pushed the alexcrichton:print-cfg branch from e50eac5 to a1ffe6b Feb 8, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Feb 8, 2016

@bors: r=brson a1ffe6b

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 9, 2016

⌛️ Testing commit a1ffe6b with merge 75271d8...

bors added a commit that referenced this pull request Feb 9, 2016

Auto merge of #31278 - alexcrichton:print-cfg, r=brson
This commit is an implementation of the new compiler flags required by [RFC
1361][rfc]. This specifically adds a new `cfg` option to the `--print` flag to
the compiler. This new directive will print the defined `#[cfg]` directives by
the compiler for the target in question.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1361-cargo-cfg-dependencies

@bors bors merged commit a1ffe6b into rust-lang:master Feb 9, 2016

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
homu Test successful
Details

@alexcrichton alexcrichton deleted the alexcrichton:print-cfg branch Feb 12, 2016

ranma42 added a commit to ranma42/rust that referenced this pull request Feb 15, 2016

Add usage documentation for `--print cfg`
The `--print` flag was extended in rust-lang#31278 to accept `cfg`, but the
usage message was not updated.

ranma42 added a commit to ranma42/rust that referenced this pull request Mar 2, 2016

Add usage documentation for `--print cfg`
The `--print` flag was extended in rust-lang#31278 to accept `cfg`, but the
usage message was not updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.