rust/compiler/rustc_metadata/src
bors b9197978a9 Auto merge of #86876 - jyn514:56935-target-crate-num, r=petrochenkov
Reuse CrateNum for proc-macro crates even when cross-compiling

Proc-macros are always compiled for the host, so this should be the same
in every way as recompiling the crate.

I am not sure why the previous code special-cased the target, since the
compiler properly gives an error when trying to load a crate for a
different host:

```
error[E0461]: couldn't find crate `dependency` with expected target triple x86_64-unknown-linux-gnu
  --> /home/joshua/rustc4/src/test/ui/cfg-dependent.rs:8:2
   |
LL |     dependency::is_64();
   |     ^^^^^^^^^^
   |
   = note: the following crate versions were found:
           crate `dependency`, target triple i686-unknown-linux-gnu: /home/joshua/rustc4/build/x86_64-unknown-linux-gnu/test/ui/cfg-dependent/auxiliary/libdependency.so
```

I think another possible fix is to remove the check altogether. But I'm
not sure, and this fix works, so I'm not making the larger change here.

Fixes https://github.com/rust-lang/rust/issues/56935.

r? `@petrochenkov` cc `@alexcrichton`
2021-07-15 02:39:38 +00:00
..
dynamic_lib mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
rmeta Shrink the CrateStore dynamic interface. 2021-07-14 16:37:56 +02:00
creader.rs Auto merge of #86876 - jyn514:56935-target-crate-num, r=petrochenkov 2021-07-15 02:39:38 +00:00
dependency_format.rs Remove LibSource 2021-07-05 10:49:07 +02:00
dynamic_lib.rs Use #[non_exhaustive] where appropriate 2021-06-24 04:16:11 -04:00
foreign_modules.rs Only store a LocalDefId in hir::ForeignItem. 2021-02-15 19:32:29 +01:00
lib.rs Auto merge of #85910 - cjgillot:no-meta-version, r=Aaron1011 2021-06-10 00:39:25 +00:00
locator.rs Revert "Revert "Merge CrateDisambiguator into StableCrateId"" 2021-07-06 11:28:04 +02:00
native_libs.rs Add support for raw-dylib with stdcall, fastcall functions on i686-pc-windows-msvc. 2021-07-09 12:04:54 -07:00