linuxManualConfig: don't leak rust-lib-src paths into the final binary

(cherry picked from commit 9dd1da7475)
This commit is contained in:
K900 2024-11-18 11:29:08 +03:00 committed by Maximilian Bosch
parent 7543be6fa9
commit e1ec45316b
No known key found for this signature in database

View File

@ -150,6 +150,10 @@ let
RUST_LIB_SRC = lib.optionalString withRust rustPlatform.rustLibSrc;
# avoid leaking Rust source file names into the final binary, which adds
# a false dependency on rust-lib-src on targets with uncompressed kernels
KRUSTFLAGS = lib.optionalString withRust "--remap-path-prefix ${rustPlatform.rustLibSrc}=/";
patches =
map (p: p.patch) kernelPatches
# Required for deterministic builds along with some postPatch magic.