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

cargo vendor does not vendor compiler_builtins #9915

Closed
osa1 opened this issue Sep 16, 2021 · 1 comment
Closed

cargo vendor does not vendor compiler_builtins #9915

osa1 opened this issue Sep 16, 2021 · 1 comment
Labels
C-bug Category: bug

Comments

@osa1
Copy link

osa1 commented Sep 16, 2021

Using cargo 1.56.0-nightly (e515c3277 2021-09-08)

I have a Rust package that I build with cargo build -Zbuild-std=core,alloc. With these -Zbuild-std parameters cargo needs to build compiler_builtins for this package, but if I run cargo +nightly vendor -Zbuild-std=core,alloc vendor directory does not contain compiler_builtins.

Repro:

  • cargo +nightly new --bin cargo_vendor_bug
  • If you run cargo +nightly build -Zbuild-std=core,alloc --target=wasm32-wasi you will see that it builds compiler_builtins.
  • cargo +nightly vendor -Zbuild-std=core,alloc
  • Check vendor directory; it won't have compiler_builtins

Deps being built by this -Zbuild-std command:

  • core-0.0.0
  • compiler_builtins-0.1.49
  • rustc-std-workspace-core-1.99.0
  • alloc-0.0.0

I'm guessing core and alloc here are built into the compiler and cannot be vendored, but I'd expect compiler_builtins and rustc-std-workspace-core to be vendored as at least compiler_builtins (maybe rustc-std-workspace-core too) is fetched from crates.io and I can't build my package without fetching deps from crates.io with cargo vendor because of this issue.

@osa1 osa1 added the C-bug Category: bug label Sep 16, 2021
@ehuss
Copy link
Contributor

ehuss commented Sep 16, 2021

Thanks for the report! I think this is a duplicate of rust-lang/wg-cargo-std-aware#23, so closing in favor of that.

@ehuss ehuss closed this as completed Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants