lol
at master 50 lines 2.2 kB view raw
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2From: Luke Granger-Brown <git@lukegb.com> 3Date: Thu, 17 Apr 2025 02:44:24 +0100 4Subject: [PATCH] rules_rust base 5 6Signed-off-by: Luke Granger-Brown <git@lukegb.com> 7--- 8 crate_universe/src/lockfile.rs | 4 ++-- 9 rust/private/rustc.bzl | 4 ++-- 10 4 files changed, 13 insertions(+), 13 deletions(-) 11 12diff --git crate_universe/src/lockfile.rs crate_universe/src/lockfile.rs 13index 3e0ce6265fda6fbdd9e3e989e3e4e4443b615b8c..0fafcea8fbc7a590676d34d2c4ca8c413b953955 100644 14--- crate_universe/src/lockfile.rs 15+++ crate_universe/src/lockfile.rs 16@@ -146,10 +146,10 @@ impl Digest { 17 )); 18 hasher.update(b"\0"); 19 20- hasher.update(Digest::compute_single_hash(cargo_version, "Cargo version")); 21+ hasher.update(Digest::compute_single_hash("hermetic", "Cargo version")); 22 hasher.update(b"\0"); 23 24- hasher.update(Digest::compute_single_hash(rustc_version, "Rustc version")); 25+ hasher.update(Digest::compute_single_hash("hermetic", "Rustc version")); 26 hasher.update(b"\0"); 27 28 let hash = hasher.finalize().encode_hex::<String>(); 29diff --git rust/private/rustc.bzl rust/private/rustc.bzl 30index d78c28902c8f73ae655b8f6b5df3db5a1805aa19..321a24a946c33d5e3452758a72a77b52d5a3eccf 100644 31--- rust/private/rustc.bzl 32+++ rust/private/rustc.bzl 33@@ -1059,7 +1059,7 @@ def construct_arguments( 34 35 if toolchain.llvm_cov and ctx.configuration.coverage_enabled: 36 # https://doc.rust-lang.org/rustc/instrument-coverage.html 37- rustc_flags.add("--codegen=instrument-coverage") 38+ pass 39 40 if toolchain._experimental_link_std_dylib: 41 rustc_flags.add("--codegen=prefer-dynamic") 42@@ -1563,7 +1563,7 @@ def rustc_compile_action( 43 }) 44 crate_info = rust_common.create_crate_info(**crate_info_dict) 45 46- if crate_info.type in ["staticlib", "cdylib"]: 47+ if crate_info.type in ["staticlib", "cdylib"] and not out_binary: 48 # These rules are not supposed to be depended on by other rust targets, and 49 # as such they shouldn't provide a CrateInfo. However, one may still want to 50 # write a rust_test for them, so we provide the CrateInfo wrapped in a provider