Remove git reference during build

Cargo attempts to use git's list-files capability in order to figure out
what parts of a source tree are truly inputs to a crate. However, this
does not work correctly if the rustc source is actually a bare git repo.

By blowing away the .git directory before the build, we can trick Cargo
into believing the directory did not come from git and convince it to
behave itself until we fix the issue in Cargo itself.

WARNING: With this change, running build.py locally becomes unsafe, as
it will blow away your git repository. This is a temporary measure since
our current Cargo prebuilt needs to be updated to ignore .git in order
to build again.

Bug: 149047263
Change-Id: If55ebc3037b0bd05dfa27e3294d1d38c444c8a05
1 file changed
tree: b6a9d7127fe20529c5a0be315d88294427045c38
  1. patches/
  2. build.py
  3. build_platform.py
  4. config_toml.py
  5. paths.py