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 crate type flag to rustc command #10093

Merged
merged 3 commits into from
Nov 26, 2021

Conversation

Rustin170506
Copy link
Member

@Rustin170506 Rustin170506 commented Nov 17, 2021

part of #10083

  • Add crate type flag to rustc command
  • Add tests
  • Update docs

@rust-highfive
Copy link

r? @ehuss

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 17, 2021
@Rustin170506
Copy link
Member Author

Rustin170506 commented Nov 17, 2021

/hold

  • Add comments and documentation
  • Add tests

@Rustin170506 Rustin170506 changed the title Add crate type flag to rustc command WIP: Add crate type flag to rustc command Nov 17, 2021
@Rustin170506
Copy link
Member Author

/unhold

Ready for review!

Also, I did some manual testing.

hyper git:(master) ../cargo/target/debug/cargo rustc --crate-type lib,cdylib -Z unstable-options
   Compiling pin-project-lite v0.2.7
   Compiling bytes v1.1.0
   Compiling cfg-if v1.0.0
   Compiling itoa v0.4.8
   Compiling fnv v1.0.7
   Compiling lazy_static v1.4.0
   Compiling try-lock v0.2.3
   Compiling pin-utils v0.1.0
   Compiling httpdate v1.0.2
   Compiling tower-service v0.3.1
   Compiling proc-macro2 v1.0.32
   Compiling syn v1.0.81
   Compiling libc v0.2.107
   Compiling futures-core v0.3.17
   Compiling log v0.4.14
   Compiling futures-task v0.3.17
   Compiling memchr v2.4.1
   Compiling httparse v1.5.1
   Compiling futures-channel v0.3.17
   Compiling tokio v1.14.0
   Compiling futures-util v0.3.17
   Compiling tracing-core v0.1.21
   Compiling want v0.3.0
   Compiling http v0.2.5
   Compiling quote v1.0.10
   Compiling num_cpus v1.13.0
   Compiling http-body v0.4.4
   Compiling tokio-macros v1.6.0
   Compiling tracing-attributes v0.1.18
   Compiling tracing v0.1.29
   Compiling hyper v0.14.15 (/Users/rustin/ClionProjects/hyper)
    Finished dev [unoptimized + debuginfo] target(s) in 14.57s
    hyper git:(master) ll ./target/debug
total 3408
drwxr-xr-x   57 rustin  staff   1.8K Nov 19 00:02 build
drwxr-xr-x  484 rustin  staff    15K Nov 19 00:02 deps
drwxr-xr-x    2 rustin  staff    64B Nov 17 20:40 examples
drwxr-xr-x    5 rustin  staff   160B Nov 19 00:02 incremental
-rw-r--r--    1 rustin  staff   1.2K Nov 17 20:40 libhyper.d
-rwxr-xr-x    2 rustin  staff    51K Nov 19 00:02 libhyper.dylib
-rw-r--r--    2 rustin  staff   1.6M Nov 19 00:02 libhyper.rlib

@Rustin170506 Rustin170506 marked this pull request as ready for review November 18, 2021 16:03
@Rustin170506 Rustin170506 changed the title WIP: Add crate type flag to rustc command Add crate type flag to rustc command Nov 18, 2021
@Rustin170506 Rustin170506 force-pushed the rustin-patch-rustc branch 3 times, most recently from 9be5b37 to 51f124f Compare November 18, 2021 16:23
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks for moving this forward!

Can you remove the close line from the PR description? We normally don't close tracking issues until after it is stabilized. Additionally, it is customary to provide a description of what the PR does besides just pointing to an issue.

src/bin/cargo/commands/rustc.rs Outdated Show resolved Hide resolved
src/cargo/ops/cargo_compile.rs Show resolved Hide resolved
src/cargo/core/compiler/mod.rs Outdated Show resolved Hide resolved
src/doc/man/cargo-rustc.md Outdated Show resolved Hide resolved
tests/testsuite/rustc.rs Outdated Show resolved Hide resolved
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
@Rustin170506
Copy link
Member Author

@ehuss All comments addressed!

Could you please take a look again? Thanks! 💚 💙 💜 💛 ❤️

@ehuss
Copy link
Contributor

ehuss commented Nov 26, 2021

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 26, 2021

📌 Commit 137f9bc has been approved by ehuss

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 26, 2021
@bors
Copy link
Collaborator

bors commented Nov 26, 2021

⌛ Testing commit 137f9bc with merge b85ad15...

@bors
Copy link
Collaborator

bors commented Nov 26, 2021

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing b85ad15 to master...

@bors bors merged commit b85ad15 into rust-lang:master Nov 26, 2021
@bors bors mentioned this pull request Nov 26, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 30, 2021
Update cargo

6 commits in 7f08ace4f1305de7f3b1b0e2f765911957226bd4..294967c53f0c70d598fc54ca189313c86c576ea7
2021-11-24 17:54:39 +0000 to 2021-11-29 19:04:22 +0000
- Fix some tests with output collisions. (rust-lang/cargo#10137)
- Description of the targets that can be applied (rust-lang/cargo#10109)
- Improve unused patch message when source URLs mismatched (rust-lang/cargo#10130)
- Add a note about doctest xcompile. (rust-lang/cargo#10132)
- book: add edit links to specific pages (rust-lang/cargo#10124)
- Add crate type flag to rustc command (rust-lang/cargo#10093)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants