Use stable coverage API with rustc 1.60

This commit is contained in:
Kirill Bulatov
2022-09-12 00:07:34 +03:00
committed by Kirill Bulatov
parent a48f9f377d
commit 698d6d0bad

View File

@@ -75,8 +75,6 @@ class Cargo:
def rustlib_dir(self) -> Path:
if not self._rustlib_dir:
cmd = [
'cargo',
'-Zunstable-options',
'rustc',
'--print=target-libdir',
]
@@ -397,7 +395,7 @@ class State:
# Enable LLVM's source-based coverage
# see: https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
# see: https://blog.rust-lang.org/inside-rust/2020/11/12/source-based-code-coverage.html
'-Zinstrument-coverage',
'-Cinstrument-coverage',
# Link every bit of code to prevent "holes" in coverage report
# see: https://doc.rust-lang.org/rustc/codegen-options/index.html#link-dead-code
'-Clink-dead-code',
@@ -410,10 +408,6 @@ class State:
f'--remap-path-prefix {self.cwd}=',
])
# XXX: God, have mercy on our souls...
# see: https://github.com/rust-lang/rust/pull/90132
os.environ['RUSTC_BOOTSTRAP'] = '1'
def _merge_profraw(self) -> bool:
profdata_path = self.profdata_dir / '-'.join([
self.profraw_prefix,