Skip to content

Initial support for dynamically linked crates #134767

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bryanskiy
Copy link
Contributor

@Bryanskiy Bryanskiy commented Dec 25, 2024

This PR is an initial implementation of rust-lang/rfcs#3435 proposal.

component 1: interface generator

Interface generator - a tool for generating a stripped version of crate source code. The interface is like a C header, where all function bodies are omitted. For example, initial crate:

#[export]
#[repr(C)]
pub struct S {
   pub x: i32
}
#[export]
pub extern "C" fn foo(x: S) { 
   m1::bar(x);
}

pub fn bar(x: crate::S) { 
    // some computations 
}	

generated interface:

#[export]
#[repr(C)]
pub struct S {
    pub x: i32,
}

#[export]
pub extern "C" fn foo(x: S);

pub fn bar(x: crate::S);

The interface generator was implemented as part of the pretty-printer. Ideally interface should only contain exportable items, but here is the first problem:

  • pass for determining exportable items relies on privacy information, which is totally available only in HIR
  • HIR pretty-printer uses pseudo-code(at least for attributes)

So, the interface generator was implemented in AST. This has led to the fact that non-exportable items cannot be filtered out, but I don't think this is a major issue at the moment.

To emit an interface use a new sdylib crate type which is basically the same as dylib, but it doesn't contain metadata, and also produces the interface as a second artifact. The current interface name is lib{crate_name}.rs.

Why was it decided to use a design with an auto-generated interface?

One of the main objectives of this proposal is to allow building the library and the application with different compiler versions. This requires either a metadata format compatible across rustc versions or some form of a source code. The option with a stable metadata format has not been investigated in detail, but it is not part of RFC either. Here is the the related discussion: rust-lang/rfcs#3435 (comment)

Original proposal suggests using the source code for the dynamic library and all its dependencies. Metadata is obtained from cargo check. I decided to use interface files since it is more or less compatible with the original proposal, but also allows users to hide the source code.

Regarding the design with interfaces

in Rust, files generally do not have a special meaning, unlike C++. A translation unit i.e. a crate is not a single file, it consists of modules. Modules, in turn, can be declared either in one file or divided into several. That's why the "interface file" isn't a very coherent concept in Rust. I would like to avoid adding an additional level of complexity for users until it is proven necessary. Therefore, the initial plan was to make the interfaces completely invisible to users i. e. make them auto-generated. I also planned to put them in the dylib, but this has not been done yet. (since the PR is already big enough, I decided to postpone it)

There is one concern, though, which has not yet been investigated(#134767 (comment)):

Compiling the interface as pretty-printed source code doesn't use correct macro hygiene (mostly relevant to macros 2.0, stable macros do not affect item hygiene). I don't have much hope for encoding hygiene data in any stable way, we should rather support a way for the interface file to be provided manually, instead of being auto-generated, if there are any non-trivial requirements.

component 2: crate loader

When building dynamic dependencies, the crate loader searches for the interface in the file system, builds the interface without codegen and loads it's metadata. Routing rules for interface files are almost the same as for rlibs and dylibs. Firstly, the compiler checks extern options and then tries to deduce the path himself.

Here are the code and commands that corresponds to the compilation process:

// simple-lib.rs
#![crate_type = "sdylib"]

#[extern]
pub extern "C" fn foo() -> i32 {
    42
}
// app.rs
extern crate simple_lib;

fn main() {
    assert!(simple_lib::foo(), 42);
}
// Generate interface, build library.
rustc +toolchain1 lib.rs

// Build app. Perhaps with a different compiler version.
rustc +toolchain2 app.rs -L.

P.S. The interface name/format and rules for file system routing can be changed further.

component 3: exportable items collector

Query for collecting exportable items. Which items are exportable is defined here .

component 4: "stable" mangling scheme

The mangling scheme proposed in the RFC consists of two parts: a mangled item path and a hash of the signature.

mangled item path

For the first part of the symbol it has been decided to reuse the v0 mangling scheme as it much less dependent on compiler internals compared to the legacy scheme.

The exception is disambiguators (https://doc.rust-lang.org/rustc/symbol-mangling/v0.html#disambiguator):

For example, during symbol mangling rustc uses a special index to distinguish between two impls of the same type in the same module(See DisambiguatedDefPathData). The calculation of this index may depend on private items, but private items should not affect the ABI. Example:

#[export]
#[repr(C)]
pub struct S<T>(pub T);

struct S1;
pub struct S2;

impl S<S1> {
    extern "C" fn foo() -> i32 {
        1
    }
}

#[export]
impl S<S2> {
    // Different symbol names can be generated for this item
    // when compiling the interface and source code.
    pub extern "C" fn foo() -> i32 {
        2
    }
}

In order to make disambiguation independent of the compiler version we can assign an id to each impl according to their relative order in the source code.

The second example is StableCrateId which is used to disambiguate different crates. StableCrateId consists of crate name, -Cmetadata arguments and compiler version. At the moment, I have decided to keep only the crate name, but a more consistent approach to crate disambiguation could be added in the future.

Actually, there are more cases where such disambiguation can be used. For instance, when mangling internal rustc symbols, but it also hasn't been investigated in detail yet.

hash of the signature

Exportable functions from stable dylibs can be called from safe code. In order to provide type safety, 128 bit hash with relevant type information is appended to the symbol (description from RFC). For now, it includes:

  • hash of the type name for primitive types
  • for ADT types with public fields the implementation follows this rules

#[export(unsafe_stable_abi = "hash")] syntax for ADT types with private fields is not yet implemented.

Type safety is a subtle thing here. I used the approach from RFC, but there is the ongoing research project about it. https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html

Unresolved questions

Interfaces:

  1. Move the interface generator to HIR and add an exportable items filter.
  2. Compatibility of auto-generated interfaces and macro hygiene.
  3. There is an open issue with interface files compilation: Initial support for dynamically linked crates #134767 (comment)
  4. Put an interface into a dylib.

Mangling scheme:

  1. Which information is required to ensure type safety and how should it be encoded? (https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html)
  2. Determine all other possible cases, where path disambiguation is used. Make it compiler independent.

We also need a semi-stable API to represent types. For example, the order of fields in the VariantDef must be stable. Or a semi-stable representation for AST, which ensures that the order of the items in the code is preserved.

There are some others, mentioned in the proposal.

@rustbot
Copy link
Collaborator

rustbot commented Dec 25, 2024

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Dec 25, 2024
@Bryanskiy
Copy link
Contributor Author

cc @m-ou-se

@rust-log-analyzer

This comment has been minimized.

@bjorn3
Copy link
Member

bjorn3 commented Dec 26, 2024

However, in that case, we encounter a "disambiguation" issue:

I think that is indicative of a fundamental issue with your implementation. Adding new private impls should not change the ABI. The whole point of the RFC is to allow changing the implementation of the dylib without changing it's ABI. We already have support for dylibs where the ABI depends on the implementation.

@bjorn3
Copy link
Member

bjorn3 commented Dec 26, 2024

Also the interface file is missing either the StableCrateId or it's constituent parts (crate name and all -Cmetadata arguments). Without this it is impossible for the consumer to mangle symbols in the same way as the dylib itself.

Replacing all function bodies in an interface file with loop {} does not work in the presence of RPIT. And serializing it as a rust source file misses the expansion context which is essential for hygiene. I did much rather use a format like JSON of while we don't guarantee a stable ABI across rustc versions a binary format.

@bjorn3
Copy link
Member

bjorn3 commented Dec 26, 2024

component 4: stable ABI mangling scheme

A stable ABI across rustc versions is a lot more involved than just mangling all symbols the same. You have to make sure multiple copies of the standard library seamlessly interoperate including using the same TypeId for &str and String (and thus identical layout for these) for panics to work, you have to make sure the same #[global_allocator] is used, all standard library types remain layout compatible across versions (which would be very limiting and eg lock is in forever on which OSes use pthread_mutex and which use futex) and more. Realistically I don't think a stable ABI across rustc versions is possible without severely limiting what can be passed across the ABI boundary (crABI), which is completely orthogonal to making rust dylibs work across crate versions. crABI can work with cdylib's just as easily.

Edit: To put it another way, I did strongly prefer if stable ABI across rustc versions and stable ABI across crate versions with a single rustc version are treated as entirely separate problems implemented entirely separately. For stable ABI across crate versions you don't need to generate interface files. You can just reuse the existing rmeta file format, but only encode the subset of the items corresponding to the stable ABI.

@oli-obk oli-obk removed their assignment Jan 7, 2025
@Bryanskiy
Copy link
Contributor Author

@bjorn3

I think that is indicative of a fundamental issue with your implementation. Adding new private impls should not change the ABI. The whole point of the RFC is to allow changing the implementation of the dylib without changing it's ABI.

I can suggest the following solution for the above problem with impl's:

Split indices (disambiguators) into 2 sets: $S_1 = { 0, 1, ..., k }$, $S_2 = { k + 1, ..., n }$ where $k$ - number of exported impls, $n$ - total number of impls. For the exportable impls we assign indices from $S_1$ based on the their order in the source code. For the other impls we assign indices from $S_2$ in any way. This approach is stable across rustc versions and doesn't depend on private items.

Also the interface file is missing either the StableCrateId or it's constituent parts (crate name and all -Cmetadata arguments).

  1. Crate name is encoded in the interface name: lib{crate_name}.rs.
  2. -Cmetadata arguments are not yet supported. At the moment, dependence on them has been removed for stable "mangled" symbols.

Replacing all function bodies in an interface file with loop {} does not work in the presence of RPIT.

  1. I used loop {} as a temporary solution since fn foo(); syntax is not allowed 😄.
  2. Regarding the RPIT, yes, it is incompatible with the "header file" concept. But anyway, as you have already said, stable ABI should not depend on implementation. However, computing a hidden type is depends on implementation. So, I don't believe it is possible to support RPIT's without imposing strict limitations.

And serializing it as a rust source file misses the expansion context which is essential for hygiene. I did much rather use a format like JSON of while we don't guarantee a stable ABI across rustc versions a binary format.

One of the main objectives of this proposal is to allow building the library and the application with different compiler versions. This requires either a metadata format compatible across rustc versions or some form of source code. Stable metadata format is not a part of the RFC.

component 4: stable ABI mangling scheme
A stable ABI across rustc versions is a lot more involved than just mangling all symbols the same. You have to make sure multiple copies of the standard library seamlessly interoperate including using the same TypeId for &str and String ...

"stable ABI" is a bad wording here. Neither I nor the RFC offers a stable ABI. And all these issues are outside the scope of the proposal.

@bjorn3
Copy link
Member

bjorn3 commented Jan 13, 2025

One of the main objectives of this proposal is to allow building the library and the application with different compiler versions.

"stable ABI" is a bad wording here. Neither I nor the RFC offers a stable ABI. And all these issues are outside the scope of the proposal.

These two statements are conflicting with each other. Being able to build a library and application with a different compiler version requires both to share an ABI, in other words it requires having a stable ABI.

@Bryanskiy
Copy link
Contributor Author

Bryanskiy commented Jan 13, 2025

These two statements are conflicting with each other. Being able to build a library and application with a different compiler version requires both to share an ABI, in other words it requires having a stable ABI.

Only extern "C" functions and types with stable representation are allowed to be "exportable" right now. https://github.com/m-ou-se/rfcs/blob/export/text/0000-export.md#the-export-attribute.

@bors

This comment was marked as resolved.

@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as resolved.

@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Feb 11, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Apr 18, 2025

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout dylibs-3 (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self dylibs-3 --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging compiler/rustc_span/src/symbol.rs
Auto-merging compiler/rustc_passes/src/errors.rs
Auto-merging compiler/rustc_passes/src/check_attr.rs
Auto-merging compiler/rustc_passes/messages.ftl
Auto-merging compiler/rustc_mir_build/src/builder/mod.rs
Auto-merging compiler/rustc_metadata/src/rmeta/encoder.rs
Auto-merging compiler/rustc_ast_passes/src/ast_validation.rs
CONFLICT (content): Merge conflict in compiler/rustc_ast_passes/src/ast_validation.rs
Auto-merging compiler/rustc_ast_lowering/src/item.rs
CONFLICT (content): Merge conflict in compiler/rustc_ast_lowering/src/item.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 18, 2025
@bors
Copy link
Collaborator

bors commented Apr 18, 2025

☔ The latest upstream changes (presumably #139996) made this pull request unmergeable. Please resolve the merge conflicts.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 19, 2025

📌 Commit b39e794 has been approved by petrochenkov

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 19, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 20, 2025
Initial support for dynamically linked crates

This PR is an initial implementation of [rust-lang/rfcs#3435](rust-lang/rfcs#3435) proposal.
### component 1: interface generator

Interface generator - a tool for generating a stripped version of crate source code. The interface is like a C header, where all function bodies are omitted. For example, initial crate:

```rust
#[export]
#[repr(C)]
pub struct S {
   pub x: i32
}
#[export]
pub extern "C" fn foo(x: S) {
   m1::bar(x);
}

pub fn bar(x: crate::S) {
    // some computations
}
```

generated interface:

```rust
#[export]
#[repr(C)]
pub struct S {
    pub x: i32,
}

#[export]
pub extern "C" fn foo(x: S);

pub fn bar(x: crate::S);
```

The interface generator was implemented as part of the pretty-printer. Ideally interface should only contain exportable items, but here is the first problem:
-  pass for determining exportable items relies on privacy information, which is totally available only in HIR
- HIR pretty-printer uses pseudo-code(at least for attributes)

So, the interface generator was implemented in AST. This has led to the fact that non-exportable items cannot be filtered out, but I don't think this is a major issue at the moment.

To emit an interface use a new `sdylib` crate type which is basically the same as `dylib`, but it doesn't contain metadata, and also produces the interface as a second artifact. The current interface name is `lib{crate_name}.rs`.
#### Why was it decided to use a design with an auto-generated interface?

One of the main objectives of this proposal is to allow building the library and the application with different compiler versions. This requires either a metadata format compatible across rustc versions or some form of a source code. The option with a stable metadata format has not been investigated in detail, but it is not part of RFC either. Here is the the related discussion: rust-lang/rfcs#3435 (comment)

Original proposal suggests using the source code for the dynamic library and all its dependencies. Metadata is obtained from `cargo check`. I decided to use interface files since it is more or less compatible with the original proposal, but also allows users to hide the source code.
##### Regarding the design with interfaces

in Rust, files generally do not have a special meaning, unlike C++. A translation unit i.e. a crate is not a single file, it consists of modules. Modules, in turn, can be declared either in one file or divided into several. That's why the "interface file" isn't a very coherent concept in Rust. I would like to avoid adding an additional level of complexity for users until it is proven necessary. Therefore, the initial plan was to make the interfaces completely invisible to users i. e. make them auto-generated. I also planned to put them in the dylib, but this has not been done yet. (since the PR is already big enough, I decided to postpone it)

There is one concern, though, which has not yet been investigated(rust-lang#134767 (comment)):

> Compiling the interface as pretty-printed source code doesn't use correct macro hygiene (mostly relevant to macros 2.0, stable macros do not affect item hygiene).  I don't have much hope for encoding hygiene data in any stable way, we should rather support a way for the interface file to be provided manually, instead of being auto-generated, if there are any non-trivial requirements.
### component 2: crate loader

When building dynamic dependencies, the crate loader searches for the interface in the file system, builds the interface without codegen and loads it's metadata. Routing rules for interface files are almost the same as for `rlibs` and `dylibs`. Firstly, the compiler checks `extern` options and then tries to deduce the path himself.

Here are the code and commands that corresponds to the compilation process:

```rust
// simple-lib.rs
#![crate_type = "sdylib"]

#[extern]
pub extern "C" fn foo() -> i32 {
    42
}
```

```rust
// app.rs
extern crate simple_lib;

fn main() {
    assert!(simple_lib::foo(), 42);
}
```

```
// Generate interface, build library.
rustc +toolchain1 lib.rs

// Build app. Perhaps with a different compiler version.
rustc +toolchain2 app.rs -L.
```

P.S. The interface name/format and rules for file system routing can be changed further.
### component 3: exportable items collector

Query for collecting exportable items. Which items are exportable is defined [here](https://github.com/m-ou-se/rfcs/blob/export/text/0000-export.md#the-export-attribute) .
### component 4: "stable" mangling scheme

The mangling scheme proposed in the RFC consists of two parts: a mangled item path and a hash of the signature.
#### mangled item path

For the first part of the symbol it has been decided to reuse the `v0` mangling scheme as it much less dependent on compiler internals compared to the `legacy` scheme.

The exception is disambiguators (https://doc.rust-lang.org/rustc/symbol-mangling/v0.html#disambiguator):

For example, during symbol mangling rustc uses a special index to distinguish between two impls of the same type in the same module(See `DisambiguatedDefPathData`). The calculation of this index may depend on private items, but private items should not affect the ABI. Example:

```rust
#[export]
#[repr(C)]
pub struct S<T>(pub T);

struct S1;
pub struct S2;

impl S<S1> {
    extern "C" fn foo() -> i32 {
        1
    }
}

#[export]
impl S<S2> {
    // Different symbol names can be generated for this item
    // when compiling the interface and source code.
    pub extern "C" fn foo() -> i32 {
        2
    }
}
```

In order to make disambiguation independent of the compiler version we can assign an id to each impl according to their relative order in the source code.

The second example is `StableCrateId` which is used to disambiguate different crates. `StableCrateId` consists of crate name, `-Cmetadata` arguments and compiler version. At the moment, I have decided to keep only the crate name, but a more consistent approach to crate disambiguation could be added in the future.

Actually, there are more cases where such disambiguation can be used. For instance, when mangling internal rustc symbols, but it also hasn't been investigated in detail yet.
#### hash of the signature

Exportable functions from stable dylibs can be called from safe code. In order to provide type safety, 128 bit hash with relevant type information is appended to the symbol ([description from RFC](https://github.com/m-ou-se/rfcs/blob/export/text/0000-export.md#name-mangling-and-safety)). For now, it includes:

- hash of the type name for primitive types
- for ADT types with public fields the implementation follows [this](https://github.com/m-ou-se/rfcs/blob/export/text/0000-export.md#types-with-public-fields) rules

`#[export(unsafe_stable_abi = "hash")]` syntax for ADT types with private fields is not yet implemented.

Type safety is a subtle thing here. I used the approach from RFC, but there is the ongoing research project about it. [https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html](https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html)

### Unresolved questions

Interfaces:
1. Move the interface generator to HIR and add an exportable items filter.
2. Compatibility of auto-generated interfaces and macro hygiene.
3. There is an open issue with interface files compilation: rust-lang#134767 (comment)
4. Put an interface into a dylib.

Mangling scheme:
1. Which information is required to ensure type safety and how should it be encoded? ([https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html](https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html))
2. Determine all other possible cases, where path disambiguation is used. Make it compiler independent.

We also need a semi-stable API to represent types. For example, the order of fields in the `VariantDef` must be stable. Or a semi-stable representation for AST, which ensures that the order of the items in the code is preserved.

There are some others, mentioned in the proposal.
@bors
Copy link
Collaborator

bors commented Apr 20, 2025

⌛ Testing commit b39e794 with merge 187b4e3...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Apr 20, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 20, 2025
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 20, 2025

📌 Commit d1752ca has been approved by petrochenkov

It is now in the queue for this repository.

@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 Apr 20, 2025
@bors
Copy link
Collaborator

bors commented Apr 20, 2025

⌛ Testing commit d1752ca with merge 4505bf5...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 20, 2025
Initial support for dynamically linked crates

This PR is an initial implementation of [rust-lang/rfcs#3435](rust-lang/rfcs#3435) proposal.
### component 1: interface generator

Interface generator - a tool for generating a stripped version of crate source code. The interface is like a C header, where all function bodies are omitted. For example, initial crate:

```rust
#[export]
#[repr(C)]
pub struct S {
   pub x: i32
}
#[export]
pub extern "C" fn foo(x: S) {
   m1::bar(x);
}

pub fn bar(x: crate::S) {
    // some computations
}
```

generated interface:

```rust
#[export]
#[repr(C)]
pub struct S {
    pub x: i32,
}

#[export]
pub extern "C" fn foo(x: S);

pub fn bar(x: crate::S);
```

The interface generator was implemented as part of the pretty-printer. Ideally interface should only contain exportable items, but here is the first problem:
-  pass for determining exportable items relies on privacy information, which is totally available only in HIR
- HIR pretty-printer uses pseudo-code(at least for attributes)

So, the interface generator was implemented in AST. This has led to the fact that non-exportable items cannot be filtered out, but I don't think this is a major issue at the moment.

To emit an interface use a new `sdylib` crate type which is basically the same as `dylib`, but it doesn't contain metadata, and also produces the interface as a second artifact. The current interface name is `lib{crate_name}.rs`.
#### Why was it decided to use a design with an auto-generated interface?

One of the main objectives of this proposal is to allow building the library and the application with different compiler versions. This requires either a metadata format compatible across rustc versions or some form of a source code. The option with a stable metadata format has not been investigated in detail, but it is not part of RFC either. Here is the the related discussion: rust-lang/rfcs#3435 (comment)

Original proposal suggests using the source code for the dynamic library and all its dependencies. Metadata is obtained from `cargo check`. I decided to use interface files since it is more or less compatible with the original proposal, but also allows users to hide the source code.
##### Regarding the design with interfaces

in Rust, files generally do not have a special meaning, unlike C++. A translation unit i.e. a crate is not a single file, it consists of modules. Modules, in turn, can be declared either in one file or divided into several. That's why the "interface file" isn't a very coherent concept in Rust. I would like to avoid adding an additional level of complexity for users until it is proven necessary. Therefore, the initial plan was to make the interfaces completely invisible to users i. e. make them auto-generated. I also planned to put them in the dylib, but this has not been done yet. (since the PR is already big enough, I decided to postpone it)

There is one concern, though, which has not yet been investigated(rust-lang#134767 (comment)):

> Compiling the interface as pretty-printed source code doesn't use correct macro hygiene (mostly relevant to macros 2.0, stable macros do not affect item hygiene).  I don't have much hope for encoding hygiene data in any stable way, we should rather support a way for the interface file to be provided manually, instead of being auto-generated, if there are any non-trivial requirements.
### component 2: crate loader

When building dynamic dependencies, the crate loader searches for the interface in the file system, builds the interface without codegen and loads it's metadata. Routing rules for interface files are almost the same as for `rlibs` and `dylibs`. Firstly, the compiler checks `extern` options and then tries to deduce the path himself.

Here are the code and commands that corresponds to the compilation process:

```rust
// simple-lib.rs
#![crate_type = "sdylib"]

#[extern]
pub extern "C" fn foo() -> i32 {
    42
}
```

```rust
// app.rs
extern crate simple_lib;

fn main() {
    assert!(simple_lib::foo(), 42);
}
```

```
// Generate interface, build library.
rustc +toolchain1 lib.rs

// Build app. Perhaps with a different compiler version.
rustc +toolchain2 app.rs -L.
```

P.S. The interface name/format and rules for file system routing can be changed further.
### component 3: exportable items collector

Query for collecting exportable items. Which items are exportable is defined [here](https://github.com/m-ou-se/rfcs/blob/export/text/0000-export.md#the-export-attribute) .
### component 4: "stable" mangling scheme

The mangling scheme proposed in the RFC consists of two parts: a mangled item path and a hash of the signature.
#### mangled item path

For the first part of the symbol it has been decided to reuse the `v0` mangling scheme as it much less dependent on compiler internals compared to the `legacy` scheme.

The exception is disambiguators (https://doc.rust-lang.org/rustc/symbol-mangling/v0.html#disambiguator):

For example, during symbol mangling rustc uses a special index to distinguish between two impls of the same type in the same module(See `DisambiguatedDefPathData`). The calculation of this index may depend on private items, but private items should not affect the ABI. Example:

```rust
#[export]
#[repr(C)]
pub struct S<T>(pub T);

struct S1;
pub struct S2;

impl S<S1> {
    extern "C" fn foo() -> i32 {
        1
    }
}

#[export]
impl S<S2> {
    // Different symbol names can be generated for this item
    // when compiling the interface and source code.
    pub extern "C" fn foo() -> i32 {
        2
    }
}
```

In order to make disambiguation independent of the compiler version we can assign an id to each impl according to their relative order in the source code.

The second example is `StableCrateId` which is used to disambiguate different crates. `StableCrateId` consists of crate name, `-Cmetadata` arguments and compiler version. At the moment, I have decided to keep only the crate name, but a more consistent approach to crate disambiguation could be added in the future.

Actually, there are more cases where such disambiguation can be used. For instance, when mangling internal rustc symbols, but it also hasn't been investigated in detail yet.
#### hash of the signature

Exportable functions from stable dylibs can be called from safe code. In order to provide type safety, 128 bit hash with relevant type information is appended to the symbol ([description from RFC](https://github.com/m-ou-se/rfcs/blob/export/text/0000-export.md#name-mangling-and-safety)). For now, it includes:

- hash of the type name for primitive types
- for ADT types with public fields the implementation follows [this](https://github.com/m-ou-se/rfcs/blob/export/text/0000-export.md#types-with-public-fields) rules

`#[export(unsafe_stable_abi = "hash")]` syntax for ADT types with private fields is not yet implemented.

Type safety is a subtle thing here. I used the approach from RFC, but there is the ongoing research project about it. [https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html](https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html)

### Unresolved questions

Interfaces:
1. Move the interface generator to HIR and add an exportable items filter.
2. Compatibility of auto-generated interfaces and macro hygiene.
3. There is an open issue with interface files compilation: rust-lang#134767 (comment)
4. Put an interface into a dylib.

Mangling scheme:
1. Which information is required to ensure type safety and how should it be encoded? ([https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html](https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html))
2. Determine all other possible cases, where path disambiguation is used. Make it compiler independent.

We also need a semi-stable API to represent types. For example, the order of fields in the `VariantDef` must be stable. Or a semi-stable representation for AST, which ensures that the order of the items in the code is preserved.

There are some others, mentioned in the proposal.
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [run-make] tests\run-make\a-b-a-linker-guard stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\a-b-a-linker-guard\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 23
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\a-b-a-linker-guard\\rmake_out" "b.rs" "-Zunstable-options" "-Cprefer-dynamic" "-Csymbol-mangling-version=legacy", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\a-b-a-linker-guard\\rmake.rs", line: 18, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `dylib` dependency `a` found
##[error] --> b.rs:3:1
  |
3 | extern crate a;
  | ^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\a-b-a-linker-guard\rmake_out\a.rs
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\a-b-a-linker-guard\rmake_out\a.dll

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\allow-warnings-cmdline-stability stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\allow-warnings-cmdline-stability\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 10
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\allow-warnings-cmdline-stability\\rmake_out" "foo.rs" "-Awarnings", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\allow-warnings-cmdline-stability\\rmake.rs", line: 7, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `bar` found
##[error] --> foo.rs:3:1
  |
3 | extern crate bar;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\allow-warnings-cmdline-stability\rmake_out\libbar.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\allow-warnings-cmdline-stability\rmake_out\bar.rs

error[E0635]: unknown feature `unstable_test_feature`
##[error] --> foo.rs:1:12
  |
1 | #![feature(unstable_test_feature)]
---
---- [run-make] tests\run-make\archive-duplicate-names stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\archive-duplicate-names\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 24
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\archive-duplicate-names\\rmake_out" "bar.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\archive-duplicate-names\\rmake.rs", line: 24, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `foo` found
##[error] --> bar.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\archive-duplicate-names\rmake_out\libfoo.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\archive-duplicate-names\rmake_out\foo.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\c-dynamic-rlib stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\c-dynamic-rlib\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 14
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\c-dynamic-rlib\\rmake_out" "bar.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\c-dynamic-rlib\\rmake.rs", line: 14, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `foo` found
##[error] --> bar.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\c-dynamic-rlib\rmake_out\libfoo.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\c-dynamic-rlib\rmake_out\foo.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\c-dynamic-dylib stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\c-dynamic-dylib\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 13
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\c-dynamic-dylib\\rmake_out" "bar.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\c-dynamic-dylib\\rmake.rs", line: 13, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `dylib` dependency `foo` found
##[error] --> bar.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\c-dynamic-dylib\rmake_out\foo.rs
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\c-dynamic-dylib\rmake_out\foo.dll

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\c-static-rlib stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\c-static-rlib\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 13
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\c-static-rlib\\rmake_out" "bar.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\c-static-rlib\\rmake.rs", line: 13, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `foo` found
##[error] --> bar.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\c-static-rlib\rmake_out\libfoo.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\c-static-rlib\rmake_out\foo.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\c-static-dylib stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\c-static-dylib\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 15
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\c-static-dylib\\rmake_out" "bar.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\c-static-dylib\\rmake.rs", line: 15, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `dylib` dependency `foo` found
##[error] --> bar.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\c-static-dylib\rmake_out\foo.rs
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\c-static-dylib\rmake_out\foo.dll

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\cdylib stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\cdylib\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 17
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\cdylib\\rmake_out" "foo.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\cdylib\\rmake.rs", line: 17, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `bar` found
##[error] --> foo.rs:3:1
  |
3 | extern crate bar;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\cdylib\rmake_out\libbar.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\cdylib\rmake_out\bar.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\cdylib-dylib-linkage stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\cdylib-dylib-linkage\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 18
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\cdylib-dylib-linkage\\rmake_out" "foo.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\cdylib-dylib-linkage\\rmake.rs", line: 18, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `dylib` dependency `bar` found
##[error] --> foo.rs:3:1
  |
3 | extern crate bar;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\cdylib-dylib-linkage\rmake_out\bar.rs
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\cdylib-dylib-linkage\rmake_out\bar.dll

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\crate-circular-deps-link stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\crate-circular-deps-link\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 19
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\crate-circular-deps-link\\rmake_out" "c.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\crate-circular-deps-link\\rmake.rs", line: 19, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `a` found
##[error] --> c.rs:5:1
  |
5 | extern crate a;
  | ^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\crate-circular-deps-link\rmake_out\liba.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\crate-circular-deps-link\rmake_out\a.rs

error[E0464]: multiple candidates for `sdylib` dependency `b` found
##[error] --> c.rs:7:1
  |
7 | extern crate b;
  | ^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\crate-circular-deps-link\rmake_out\libb.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\crate-circular-deps-link\rmake_out\b.rs

error: `#[panic_handler]` function required, but not found

error: unwinding panics are not supported without std
  |
  = help: using nightly cargo, use -Zbuild-std with panic="abort" to avoid unwinding
  = note: since the core library is usually precompiled with panic="unwind", rebuilding your crate with panic="abort" may not be enough to fix the problem

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\crate-loading-multiple-candidates stdout ----

error: rmake recipe failed to complete
status: exit code: 101
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\crate-loading-multiple-candidates\\rmake.exe"
stdout: none
--- stderr -------------------------------

thread 'main' panicked at D:\a\rust\rust\tests\run-make\crate-loading-multiple-candidates\rmake.rs:33:10:
test failed: `multiple-candidates.stderr` is different from `(rustc)`

--- multiple-candidates.stderr
+++ (rustc)
@@ -1,11 +1,11 @@
-error[E0464]: multiple candidates for `rlib` dependency `crateresolve1` found
+error[E0464]: multiple candidates for `sdylib` dependency `crateresolve1` found
   --> multiple-candidates.rs:1:1
    |
 LL | extern crate crateresolve1;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: candidate #1: ./mylibs/libcrateresolve1-1.rlib
-   = note: candidate #2: ./mylibs/libcrateresolve1-2.rlib
+   = note: candidate #2: D:/a/rust/rust/build/x86_64-pc-windows-msvc/test/run-make/crate-loading-multiple-candidates/rmake_out/crateresolve1-1.rs
 
 error: aborting due to 1 previous error
 

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------


---- [run-make] tests\run-make\cross-lang-lto-upstream-rlibs stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\cross-lang-lto-upstream-rlibs\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 20
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\cross-lang-lto-upstream-rlibs\\rmake_out" "staticlib.rs" "-Clinker-plugin-lto" "-Ccodegen-units=1" "-o" "staticlib.lib", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\cross-lang-lto-upstream-rlibs\\rmake.rs", line: 15, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `upstream` found
##[error] --> staticlib.rs:3:1
  |
3 | extern crate upstream;
  | ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\cross-lang-lto-upstream-rlibs\rmake_out\libupstream.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\cross-lang-lto-upstream-rlibs\rmake_out\upstream.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\dylib-chain stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\dylib-chain\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 15
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\dylib-chain\\rmake_out" "m2.rs" "-Cprefer-dynamic", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\dylib-chain\\rmake.rs", line: 15, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `dylib` dependency `m1` found
##[error] --> m2.rs:2:1
  |
2 | extern crate m1;
  | ^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\dylib-chain\rmake_out\m1.rs
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\dylib-chain\rmake_out\m1.dll

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\embed-metadata stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\embed-metadata\\rmake.exe"
stdout: none
--- stderr -------------------------------
Testing library kind Rlib
command failed at line 45
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\embed-metadata\\temporary-directory" "foo.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\embed-metadata\\rmake.rs", line: 45, col: 9 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `dep1` found
##[error] --> foo.rs:1:1
  |
1 | extern crate dep1;
  | ^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\embed-metadata\temporary-directory\libdep1.rmeta
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\embed-metadata\temporary-directory\dep1.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\error-found-staticlib-instead-crate stdout ----

error: rmake recipe failed to complete
status: exit code: 101
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\error-found-staticlib-instead-crate\\rmake.exe"
stdout: none
--- stderr -------------------------------
assert_contains:
=== HAYSTACK ===
error: only metadata stub found for `sdylib` dependency `foo`
       please provide path to the corresponding .rmeta file with full metadata
 --> bar.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error
---
---- [run-make] tests\run-make\export\compile-interface-error stdout ----

error: rmake recipe failed to complete
status: exit code: 101
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\export\\compile-interface-error\\rmake.exe"
stdout: none
--- stderr -------------------------------
assert_contains:
=== HAYSTACK ===
error[E0463]: can't find crate for `libr`
##[error] --> app.rs:1:1
  |
1 | extern crate libr;
  | ^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to 1 previous error
---
---- [run-make] tests\run-make\extern-flag-pathless stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\extern-flag-pathless\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 17
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\extern-flag-pathless\\rmake_out" "foo.rs" "--extern" "bar", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\extern-flag-pathless\\rmake.rs", line: 17, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `bar` found
##[error] --> foo.rs:2:5
  |
2 |     bar::f();
  |     ^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\extern-flag-pathless\rmake_out\libbar.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\extern-flag-pathless\rmake_out\bar.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\extern-fn-generic stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\extern-fn-generic\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 14
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\extern-fn-generic\\rmake_out" "test.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\extern-fn-generic\\rmake.rs", line: 14, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `testcrate` found
##[error] --> test.rs:1:1
  |
1 | extern crate testcrate;
  | ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\extern-fn-generic\rmake_out\libtestcrate.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\extern-fn-generic\rmake_out\testcrate.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\extern-fn-with-union stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\extern-fn-with-union\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 14
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\extern-fn-with-union\\rmake_out" "test.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\extern-fn-with-union\\rmake.rs", line: 14, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `testcrate` found
##[error] --> test.rs:1:1
  |
1 | extern crate testcrate;
  | ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\extern-fn-with-union\rmake_out\libtestcrate.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\extern-fn-with-union\rmake_out\testcrate.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\extern-multiple-copies stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\extern-multiple-copies\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 14
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\extern-multiple-copies\\rmake_out" "bar.rs" "--extern" "foo1=libfoo1.rlib" "-L" "foo", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\extern-multiple-copies\\rmake.rs", line: 14, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `foo2` found
##[error] --> bar.rs:2:1
  |
2 | extern crate foo2; // foo2 first to exhibit the bug
  | ^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\extern-multiple-copies\rmake_out\libfoo2.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\extern-multiple-copies\rmake_out\foo2.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\external-crate-panic-handle-no-lint stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\external-crate-panic-handle-no-lint\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 11
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\external-crate-panic-handle-no-lint\\rmake_out" "app.rs" "-Cpanic=abort" "--emit=obj", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\external-crate-panic-handle-no-lint\\rmake.rs", line: 11, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `panic` found
##[error] --> app.rs:7:1
  |
7 | extern crate panic;
  | ^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\external-crate-panic-handle-no-lint\rmake_out\libpanic.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\external-crate-panic-handle-no-lint\rmake_out\panic.rs

error: `#[panic_handler]` function required, but not found

error: aborting due to 2 previous errors

---
---- [run-make] tests\run-make\libtest-padding stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\libtest-padding\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 17
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\libtest-padding\\rmake_out" "--test" "tests.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\libtest-padding\\rmake.rs", line: 17, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error: only metadata stub found for `sdylib` dependency `test`
       please provide path to the corresponding .rmeta file with full metadata
 --> tests.rs:2:1
  |
2 | extern crate test;
  | ^^^^^^^^^^^^^^^^^^

error: only metadata stub found for `sdylib` dependency `test`
       please provide path to the corresponding .rmeta file with full metadata
 --> tests.rs:5:1
  |
4 | #[test]
  | ------- in this procedural macro expansion
5 | fn short_test_name() {}
  | ^^^^^^^^^^^^^^^^^^^^^^^

error: only metadata stub found for `sdylib` dependency `test`
       please provide path to the corresponding .rmeta file with full metadata
 --> tests.rs:8:1
  |
7 | #[test]
  | ------- in this procedural macro expansion
8 | fn this_is_a_really_long_test_name() {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: only metadata stub found for `sdylib` dependency `test`
       please provide path to the corresponding .rmeta file with full metadata
  --> tests.rs:11:1
   |
10 | #[bench]
   | -------- in this procedural macro expansion
11 | fn short_bench_name(b: &mut test::Bencher) {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: only metadata stub found for `sdylib` dependency `test`
       please provide path to the corresponding .rmeta file with full metadata
  --> tests.rs:14:1
   |
13 | #[bench]
   | -------- in this procedural macro expansion
14 | fn this_is_a_really_long_bench_name(b: &mut test::Bencher) {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: only metadata stub found for `sdylib` dependency `test`
       please provide path to the corresponding .rmeta file with full metadata

error: aborting due to 6 previous errors
------------------------------------------


---- [run-make] tests\run-make\link-native-static-lib-to-dylib stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\link-native-static-lib-to-dylib\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 11
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\link-native-static-lib-to-dylib\\rmake_out" "bar.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\link-native-static-lib-to-dylib\\rmake.rs", line: 11, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error: only metadata stub found for `sdylib` dependency `foo`
       please provide path to the corresponding .rmeta file with full metadata
 --> bar.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error
------------------------------------------


---- [run-make] tests\run-make\link-dedup stdout ----

error: rmake recipe failed to complete
status: exit code: 101
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\link-dedup\\rmake.exe"
stdout: none
--- stderr -------------------------------
assert_contains:
=== HAYSTACK ===

=== NEEDLE ===
"testa.lib" "testb.lib" "testa.lib"

thread 'main' panicked at D:\a\rust\rust\tests\run-make\link-dedup\rmake.rs:18:12:
---
---- [run-make] tests\run-make\link-cfg stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\link-cfg\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 33
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\link-cfg\\rmake_out" "with-deps.rs" "--cfg" "foo", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\link-cfg\\rmake.rs", line: 33, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `dep` found
##[error] --> with-deps.rs:1:1
  |
1 | extern crate dep;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\link-cfg\rmake_out\libdep.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\link-cfg\rmake_out\dep.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\lto-dylib-dep stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\lto-dylib-dep\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 13
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\lto-dylib-dep\\rmake_out" "main.rs" "-Clto", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\lto-dylib-dep\\rmake.rs", line: 13, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `dylib` dependency `a_dylib` found
##[error] --> main.rs:1:1
  |
1 | extern crate a_dylib;
  | ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\lto-dylib-dep\rmake_out\a_dylib.rs
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\lto-dylib-dep\rmake_out\a_dylib.dll

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\lto-readonly-lib stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\lto-readonly-lib\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 15
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\lto-readonly-lib\\rmake_out" "main.rs" "-Clto", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\lto-readonly-lib\\rmake.rs", line: 15, col: 9 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `lib` found
##[error] --> main.rs:1:1
  |
1 | extern crate lib;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\lto-readonly-lib\rmake_out\liblib.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\lto-readonly-lib\rmake_out\lib.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\lto-no-link-whole-rlib stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\lto-no-link-whole-rlib\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 16
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\lto-no-link-whole-rlib\\rmake_out" "main.rs" "-Clto", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\lto-no-link-whole-rlib\\rmake.rs", line: 16, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `lib1` found
##[error] --> main.rs:1:1
  |
1 | extern crate lib1;
  | ^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\lto-no-link-whole-rlib\rmake_out\liblib1.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\lto-no-link-whole-rlib\rmake_out\lib1.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\lto-smoke stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\lto-smoke\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 14
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\lto-smoke\\rmake_out" "main.rs" "-Clto", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\lto-smoke\\rmake.rs", line: 14, col: 9 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `lib` found
##[error] --> main.rs:1:1
  |
1 | extern crate lib;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\lto-smoke\rmake_out\liblib.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\lto-smoke\rmake_out\lib.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\manual-link stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\manual-link\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 14
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\manual-link\\rmake_out" "main.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\manual-link\\rmake.rs", line: 14, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `foo` found
##[error] --> main.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\manual-link\rmake_out\libfoo.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\manual-link\rmake_out\foo.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\many-crates-but-no-match stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\many-crates-but-no-match\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 14
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\many-crates-but-no-match\\rmake_out" "--crate-type" "rlib" "-L" "a1" "crateB.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\many-crates-but-no-match\\rmake.rs", line: 14, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error: only metadata stub found for `sdylib` dependency `crateA`
       please provide path to the corresponding .rmeta file with full metadata
 --> crateB.rs:1:1
  |
1 | extern crate crateA;
  | ^^^^^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error
------------------------------------------


---- [run-make] tests\run-make\missing-crate-dependency stdout ----

error: rmake recipe failed to complete
status: exit code: 101
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\missing-crate-dependency\\rmake.exe"
stdout: none
--- stderr -------------------------------
assert_contains:
=== HAYSTACK ===
error[E0460]: found possibly newer version of crate `crateA` which `crateB` depends on
##[error] --> crateC.rs:1:1
  |
1 | extern crate crateB;
  | ^^^^^^^^^^^^^^^^^^^^
  |
  = note: perhaps that crate needs to be recompiled?
  = note: the following crate versions were found:
          crate `crateA`: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\missing-crate-dependency\rmake_out\crateA.rs
          crate `crateB`: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\missing-crate-dependency\rmake_out\libcrateB.rlib

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0460`.

=== NEEDLE ===
can't find crate for `crateA` which `crateB` depends on

thread 'main' panicked at D:\a\rust\rust\tests\run-make\missing-crate-dependency\rmake.rs:16:10:
needle was not found in haystack
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------


---- [run-make] tests\run-make\mixing-deps stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\mixing-deps\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 10
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\mixing-deps\\rmake_out" "dylib.rs" "-Cprefer-dynamic", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\mixing-deps\\rmake.rs", line: 10, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `both` found
##[error] --> dylib.rs:2:1
  |
2 | extern crate both;
  | ^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\mixing-deps\rmake_out\libboth.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\mixing-deps\rmake_out\both.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\mixing-formats stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\mixing-formats\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 21
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\mixing-formats\\temporary-directory" "--crate-type" "dylib" "bar1.rs" "-Cprefer-dynamic", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\mixing-formats\\rmake.rs", line: 21, col: 9 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `foo` found
##[error] --> bar1.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\mixing-formats\temporary-directory\libfoo.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\mixing-formats\temporary-directory\foo.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\mixing-libs stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\mixing-libs\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 15
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\mixing-libs\\rmake_out" "dylib.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\mixing-libs\\rmake.rs", line: 15, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `rlib` found
##[error] --> dylib.rs:2:1
  |
2 | extern crate rlib;
  | ^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\mixing-libs\rmake_out\librlib.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\mixing-libs\rmake_out\rlib.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\native-lib-load-order stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\native-lib-load-order\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 14
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\native-lib-load-order\\rmake_out" "b.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\native-lib-load-order\\rmake.rs", line: 14, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `a` found
##[error] --> b.rs:1:1
  |
1 | extern crate a;
  | ^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\native-lib-load-order\rmake_out\liba.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\native-lib-load-order\rmake_out\a.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\no-builtins-attribute stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\no-builtins-attribute\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 11
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\no-builtins-attribute\\rmake_out" "main.rs" "--emit=llvm-ir", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\no-builtins-attribute\\rmake.rs", line: 11, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `no_builtins` found
##[error] --> main.rs:1:1
  |
1 | extern crate no_builtins;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\no-builtins-attribute\rmake_out\libno_builtins.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\no-builtins-attribute\rmake_out\no_builtins.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\no-builtins-lto stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\no-builtins-lto\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 18
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\no-builtins-lto\\rmake_out" "main.rs" "-Clto" "--print" "link-args", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\no-builtins-lto\\rmake.rs", line: 14, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `no_builtins` found
##[error] --> main.rs:1:1
  |
1 | extern crate no_builtins;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\no-builtins-lto\rmake_out\libno_builtins.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\no-builtins-lto\rmake_out\no_builtins.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\no-cdylib-as-rdylib stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\no-cdylib-as-rdylib\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 14
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\no-cdylib-as-rdylib\\rmake_out" "foo.rs" "-Cprefer-dynamic", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\no-cdylib-as-rdylib\\rmake.rs", line: 14, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `bar` found
##[error] --> foo.rs:1:1
  |
1 | extern crate bar;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\no-cdylib-as-rdylib\rmake_out\libbar.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\no-cdylib-as-rdylib\rmake_out\bar.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\native-link-modifier-whole-archive stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\native-link-modifier-whole-archive\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 71
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\native-link-modifier-whole-archive\\rmake_out" "indirectly_linked.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\native-link-modifier-whole-archive\\rmake.rs", line: 71, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `rlib_with_cmdline_native_lib` found
##[error] --> indirectly_linked.rs:1:1
  |
1 | extern crate rlib_with_cmdline_native_lib;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\native-link-modifier-whole-archive\rmake_out\librlib_with_cmdline_native_lib.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\native-link-modifier-whole-archive\rmake_out\rlib_with_cmdline_native_lib.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\pgo-embed-bc-lto stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\pgo-embed-bc-lto\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 28
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\pgo-embed-bc-lto\\rmake_out" "interesting.rs" "-Cprofile-generate=prof_data_dir" "-O" "--crate-type" "lib,cdylib" "-Ccodegen-units=1", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\pgo-embed-bc-lto\\rmake.rs", line: 22, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `opaque` found
##[error] --> interesting.rs:4:1
  |
4 | extern crate opaque;
  | ^^^^^^^^^^^^^^^^^^^^
  |
---
---- [run-make] tests\run-make\share-generics-dylib stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\share-generics-dylib\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 29
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\share-generics-dylib\\rmake_out" "instance_user_dylib.rs" "--crate-type" "dylib" "-Cprefer-dynamic" "-Zshare-generics=yes" "-Csymbol-mangling-version=v0" "-Ccodegen-units=1", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\share-generics-dylib\\rmake.rs", line: 24, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `instance_provider_a` found
##[error] --> instance_user_dylib.rs:1:1
  |
1 | extern crate instance_provider_a;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\share-generics-dylib\rmake_out\libinstance_provider_a.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\share-generics-dylib\rmake_out\instance_provider_a.rs

error[E0464]: multiple candidates for `sdylib` dependency `instance_provider_b` found
##[error] --> instance_user_dylib.rs:2:1
  |
2 | extern crate instance_provider_b;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\share-generics-dylib\rmake_out\libinstance_provider_b.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\share-generics-dylib\rmake_out\instance_provider_b.rs

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\share-generics-export-again stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\share-generics-export-again\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 17
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\share-generics-export-again\\rmake_out" "--crate-type" "dylib" "bar.rs" "-Copt-level=3", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\share-generics-export-again\\rmake.rs", line: 17, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `foo` found
##[error] --> bar.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\share-generics-export-again\rmake_out\libfoo.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\share-generics-export-again\rmake_out\foo.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\static-dylib-by-default stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\static-dylib-by-default\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 18
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\static-dylib-by-default\\rmake_out" "bar.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\static-dylib-by-default\\rmake.rs", line: 18, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `foo` found
##[error] --> bar.rs:3:1
  |
3 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\static-dylib-by-default\rmake_out\libfoo.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\static-dylib-by-default\rmake_out\foo.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\static-unwinding stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\static-unwinding\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 13
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\static-unwinding\\rmake_out" "main.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\static-unwinding\\rmake.rs", line: 13, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `lib` found
##[error] --> main.rs:1:1
  |
1 | extern crate lib;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\static-unwinding\rmake_out\liblib.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\static-unwinding\rmake_out\lib.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\staticlib-dylib-linkage stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\staticlib-dylib-linkage\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 21
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\staticlib-dylib-linkage\\rmake_out" "foo.rs" "--crate-type" "staticlib" "--print" "native-static-libs" "-Zstaticlib-allow-rdylib-deps", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\staticlib-dylib-linkage\\rmake.rs", line: 16, col: 16 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `dylib` dependency `bar` found
##[error] --> foo.rs:3:1
  |
3 | extern crate bar;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\staticlib-dylib-linkage\rmake_out\bar.rs
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\staticlib-dylib-linkage\rmake_out\bar.dll

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\std-core-cycle stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\std-core-cycle\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 25
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\std-core-cycle\\rmake_out" "foo.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\std-core-cycle\\rmake.rs", line: 15, col: 25 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `bar` found
##[error] --> foo.rs:3:1
  |
3 | extern crate bar;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\std-core-cycle\rmake_out\libbar.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\std-core-cycle\rmake_out\bar.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\suspicious-library stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\suspicious-library\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 14
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\suspicious-library\\rmake_out" "bar.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\suspicious-library\\rmake.rs", line: 14, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `dylib` dependency `foo` found
##[error] --> bar.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\suspicious-library\rmake_out\foo.rs
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\suspicious-library\rmake_out\foo.dll

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\symbol-visibility stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\symbol-visibility\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 16
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\symbol-visibility\\rmake_out" "-Zshare-generics=no" "a_cdylib.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\symbol-visibility\\rmake.rs", line: 16, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `an_rlib` found
##[error] --> a_cdylib.rs:3:1
  |
3 | extern crate an_rlib;
  | ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\symbol-visibility\rmake_out\liban_rlib.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\symbol-visibility\rmake_out\an_rlib.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\symbol-mangling-hashed stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\symbol-mangling-hashed\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 43
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\symbol-mangling-hashed\\rmake_out" "default_dylib.rs" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\symbol-mangling-hashed\\rmake_out" "-Cprefer-dynamic", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\symbol-mangling-hashed\\rmake.rs", line: 43, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `dylib` dependency `hashed_dylib` found
##[error] --> default_dylib.rs:3:1
  |
3 | extern crate hashed_dylib;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\symbol-mangling-hashed\rmake_out\hashed_dylib.rs
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\symbol-mangling-hashed\rmake_out\hashed_dylib.dll

error[E0464]: multiple candidates for `sdylib` dependency `hashed_rlib` found
##[error] --> default_dylib.rs:4:1
  |
4 | extern crate hashed_rlib;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\symbol-mangling-hashed\rmake_out\libhashed_rlib.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\symbol-mangling-hashed\rmake_out\hashed_rlib.rs

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\symlinked-libraries stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\symlinked-libraries\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 14
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\symlinked-libraries\\rmake_out" "bar.rs" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\symlinked-libraries\\rmake_out" "-L" "other", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\symlinked-libraries\\rmake.rs", line: 14, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `dylib` dependency `foo` found
##[error] --> bar.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\symlinked-libraries\rmake_out\foo.rs
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\symlinked-libraries\rmake_out\foo.dll

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\symlinked-rlib stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\symlinked-rlib\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 16
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\symlinked-rlib\\rmake_out" "bar.rs" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\symlinked-rlib\\rmake_out", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\symlinked-rlib\\rmake.rs", line: 16, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error[E0464]: multiple candidates for `sdylib` dependency `foo` found
##[error] --> bar.rs:1:1
  |
1 | extern crate foo;
  | ^^^^^^^^^^^^^^^^^
  |
  = note: candidate #1: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\symlinked-rlib\rmake_out\libfoo.rlib
  = note: candidate #2: D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\run-make\symlinked-rlib\rmake_out\foo.rs

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0464`.
------------------------------------------


---- [run-make] tests\run-make\test-harness stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\test-harness\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 14
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\test-harness\\rmake_out" "--test" "test-ignore-cfg.rs" "--cfg" "ignorecfg", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\test-harness\\rmake.rs", line: 14, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error: only metadata stub found for `sdylib` dependency `test`
       please provide path to the corresponding .rmeta file with full metadata
 --> test-ignore-cfg.rs:3:1
  |
1 | #[test]
  | ------- in this procedural macro expansion
2 | #[cfg_attr(ignorecfg, ignore)]
3 | fn shouldignore() {}
  | ^^^^^^^^^^^^^^^^^^^^

error: only metadata stub found for `sdylib` dependency `test`
       please provide path to the corresponding .rmeta file with full metadata
 --> test-ignore-cfg.rs:7:1
  |
5 | #[test]
  | ------- in this procedural macro expansion
6 | #[cfg_attr(noignorecfg, ignore)]
7 | fn shouldnotignore() {}
  | ^^^^^^^^^^^^^^^^^^^^^^^

error: only metadata stub found for `sdylib` dependency `test`
       please provide path to the corresponding .rmeta file with full metadata

error: aborting due to 3 previous errors
------------------------------------------


---
test result: FAILED. 240 passed; 61 failed; 93 ignored; 0 measured; 6 filtered out; finished in 199.76s

Some tests failed in compiletest suite=run-make mode=run-make host=x86_64-pc-windows-msvc target=x86_64-pc-windows-msvc
Build completed unsuccessfully in 2:23:12
make: *** [Makefile:113: ci-msvc-py] Error 1
  local time: Sun Apr 20 22:39:36 CUT 2025
  network time: Sun, 20 Apr 2025 22:39:36 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Collaborator

bors commented Apr 20, 2025

💔 Test failed - checks-actions

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

bors commented Apr 21, 2025

☔ The latest upstream changes (presumably #140127) made this pull request unmergeable. Please resolve the merge conflicts.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.