Closed
Description
STR
$ git clone https://github.com/rust-lang/rust
$ cd rust
$ mkdir build
$ cd build
$ ../configure
$ RUSTFLAGS=-Ccodegen_units=2 make
rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc
rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand
rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunicode
rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc
rustc: /home/rustbuild/src/rust-buildbot/slave/snap3-linux/build/src/llvm/lib/IR/Constants.cpp:1609: static llvm::Constant* llvm::ConstantExpr::getPointerCast(llvm::Constant*, llvm::Type*): Assertion `S->getType()->isPtrOrPtrVectorTy() && "Invalid cast"' failed.
Aborted (core dumped)
Version
Sadly, I couldn't generate a minimal script that reproduces the problem. But these seem to be the required ingredients:
- Cross crate. The linked crate must use unboxed closures.
- There must be some
#[inline]
d function in the root crate. - And, of course, the
-C codegen_units
flag.