rust: don't rerun git submodule for HEAD builds

Fixes Homebrew/homebrew#48980.

Closes Homebrew/homebrew#49370.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
This commit is contained in:
Alex Dunn 2016-02-19 22:15:02 -08:00
parent 30187def17
commit cb8a5f141d

View file

@ -49,6 +49,12 @@ class Rust < Formula
end
def install
# Because we copy the source tree to a temporary build directory,
# the absolute paths written to the `gitdir` files of the
# submodules are no longer accurate, and running `git submodule
# update` during the configure step fails.
ENV["CFG_DISABLE_MANAGE_SUBMODULES"] = "1" if build.head?
args = ["--prefix=#{prefix}"]
args << "--disable-rpath" if build.head?
args << "--enable-clang" if ENV.compiler == :clang