rust-osdev / cargo-xbuild

Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc.
Apache License 2.0
258 stars 25 forks source link

codegen-backends deleted on Windows. #48

Open sgeos opened 4 years ago

sgeos commented 4 years ago

On Windows, xbuild seems to be deleting codegen-backends and other presumably important files before erroring out.


C:\Users\me\source\repos\CustomSdkRustInterop\lib_hello>cargo xbuild --target aarch64-custom-elf.json
    Updating crates.io index
   Compiling core v0.0.0 (C:\Users\me\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libcore)
   Compiling compiler_builtins v0.1.19
   Compiling rustc-std-workspace-core v1.99.0 (C:\Users\me\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\tools\rustc-std-workspace-core)
   Compiling alloc v0.0.0 (C:\Users\me\AppData\Local\Temp\xargo.P3VleUWvqWpF)
    Finished release [optimized] target(s) in 27.84s
error: process didn't exit successfully: `rustc -vV` (exit code: 1)
--- stdout
rustc 1.40.0-nightly (fa0f7d008 2019-10-17)
binary: rustc
commit-hash: fa0f7d0080d8e7e9eb20aa9cbf8013f96c81287f
commit-date: 2019-10-17
host: x86_64-pc-windows-msvc
release: 1.40.0-nightly

--- stderr
error: failed to find a `codegen-backends` folder in the sysroot candidates:
* C:\Users\me\.rustup\toolchains\nightly-x86_64-pc-windows-msvc
* \\?\C:\Users\me\.rustup\toolchains\nightly-x86_64-pc-windows-msvc```
phil-opp commented 4 years ago

Sorry for the late reply!

I'm not sure if cargo-xbuild is at fault here. I've never seen this error, but it seems like rustc -vV is the command that fails. Could you try running this command manually to see if it still errors independently of cargo-xbuild?