This repository was archived by the owner on Jun 26, 2020. It is now read-only.
This repository was archived by the owner on Jun 26, 2020. It is now read-only.
STATUS_ACCESS_VIOLATION in cranelift-codegen build script #900
Closed
Description
When attempting to add cranelift
to a project of mine for use as a JIT compiler, I get:
error: failed to run custom build command for `cranelift-codegen v0.38.0`
Caused by:
process didn't exit successfully: `F:\code\projects\active\untitled\target\debug\build\cranelift-codegen-c6b973378c2b1052\build-script-build` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
--- stdout
cargo:rerun-if-changed=C:\Users\novacrazy\.cargo\registry\src\github.tiyicn.workers.dev-1ecc6299db9ec823\cranelift-codegen-0.38.0\build.rs
warning: build failed, waiting for other jobs to finish...
error: build failed
This seems to be caused by my build configuration in Cargo.toml
:
[profile.dev]
debug = true
opt-level = 2
incremental = false
debug-assertions = true
codegen-units = 32
[profile.release]
opt-level = 3
debug = true # helps with profiling
lto = 'fat'
incremental = false
debug-assertions = false
codegen-units = 1
[profile.bench]
opt-level = 3
debug = false
lto = 'fat'
debug-assertions = false
incremental = false
codegen-units = 1
which upon adding to the SimpleJIT demo config causes the same STATUS_ACCESS_VIOLATION
I'm on Windows 10 Pro for Workstations with a AMD Zen 1 Threadripper 1950X, compiling with RUSTFLAGS = "-C target-cpu=native"
, so znver1
.
Compiling without target-cpu=native
seems to work, but I kind of use that...
So it's a mix of those config options and target-cpu=native
.
I'm using rustc 1.38.0-nightly (60960a260 2019-08-12)
, which is after an LLVM update known to cause issues on Zen 1