Closed
Description
STR
$ git clone --depth 1 https://github.com/rust-lang/rust
$ mkdir build
$ cd build
$ ../rust/configure --enable-rustbuild
$ make
(...)
Compiling bootstrap v0.0.0 (file:///home/japaric/tmp/foo/rust/src/bootstrap)
fatal: Not a git repository (or any parent up to mount point /home/japaric/tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
thread '<main>' panicked at 'command did not execute successfully: "git" "submodule" "status"
expected success, got: exit code: 128', /home/japaric/tmp/foo/rust/src/build_helper/lib.rs:59
Makefile:23: recipe for target 'all' failed
make: *** [all] Error 101
But using a build directory inside the cloned rust directory works fine. i.e.
$ git clone --depth 1 https://github.com/rust-lang/rust
$ cd rust
$ mkdir build
$ cd build
$ ../configure --enable-rustbuild
$ make
Compiling bootstrap v0.0.0 (file:///home/japaric/tmp/foo/rust/src/bootstrap)
Submodule 'src/compiler-rt' (https://github.com/rust-lang/compiler-rt.git) registered for path '../src/compiler-rt'
(OK)
It seems git submodule status
is called in the build directory instead of calling it inside the rust repository.
Version
$ git rev-parse HEAD
0c4d81f9bc9bb39963ded050b821347ae214d734
Activity
rustbuild: Fix submodules for out of tree builds
Auto merge of #31620 - alexcrichton:fix-out-of-tree-builds, r=brson