rust: Disable dead stripping for fuzzers.
Without `-C link-dead-code`, Rust fuzzers may fail to start fuzzing. See the cargo-fuzz issue in the code comment for details. This patch disables dead stripping for our fuzzers by default. Bug: 193200135 Test: Flag emitted when building Rust fuzzers. Test: Fuzzer runs on device. Change-Id: I530de30e9a57db206bcbf3d2d3d371628eef8934
This commit is contained in:
@@ -47,6 +47,9 @@ var fuzzerFlags = []string{
|
||||
"-C llvm-args=-sanitizer-coverage-trace-geps",
|
||||
"-C llvm-args=-sanitizer-coverage-prune-blocks=0",
|
||||
|
||||
// See https://github.com/rust-fuzz/cargo-fuzz/pull/193
|
||||
"-C link-dead-code",
|
||||
|
||||
// Sancov breaks with lto
|
||||
// TODO: Remove when https://bugs.llvm.org/show_bug.cgi?id=41734 is resolved and sancov works with LTO
|
||||
"-C lto=no",
|
||||
|
Reference in New Issue
Block a user