Hi all,
I've been trying to compile the core library by invoking rustc directly. I have some reasons as to why I cannot use cargo and instead have to invoke rustc directly.
I've been running into issues compiling core from the rust git repository running
rustc --crate-type rlib --crate-name core --edition=2021 src\lib.rs
.
I'm getting the below errors
error[E0522]: definition of an unknown language item: `ResumeTy`
--> src\future\mod.rs:47:28
|
47 | #[cfg_attr(not(bootstrap), lang = "ResumeTy")]
| ^^^^^^^^^^^^^^^^^ definition of unknown language item `ResumeTy`
error[E0522]: definition of an unknown language item: `get_context`
--> src\future\mod.rs:105:1
|
105 | #[lang = "get_context"]
| ^^^^^^^^^^^^^^^^^^^^^^^ definition of unknown language item `get_context`
error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assert_mem_uninitialized_valid`
--> src\intrinsics.rs:968:5
|
968 | pub fn assert_mem_uninitialized_valid<T>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0093]: unrecognized intrinsic function: `assert_mem_uninitialized_valid`
--> src\intrinsics.rs:968:5
|
968 | pub fn assert_mem_uninitialized_valid<T>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unrecognized intrinsic
error: aborting due to 4 previous errors
I'm a bit lost because running the same command on the core library source code that is in my rustup
directory compiles fine. I'm using rustc 1.68.0-nightly (d0dc9efff 2022-12-18) on x86_64-pc-windows-msvc. However, I run into the same issue while building on Mac.
I suspect it has something to do with code for the different compiler stages that come with the rust git repository that might not be included with the released artifacts.
Any advice is appreciated