rust: Add support for host fuzzers.
Adds support for host-based Rust fuzzers. Bug: 282897366 Test: SANITZE_HOST="address" m <host_fuzzer> Test: run fuzzer Change-Id: Ibb951f651ef12e763778ebbf12e66769a7113920
This commit is contained in:
@@ -320,6 +320,15 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag
|
||||
flags.LinkFlags = append(flags.LinkFlags, cc.RpathFlags(ctx)...)
|
||||
}
|
||||
|
||||
if !ctx.toolchain().Bionic() && ctx.Os() != android.LinuxMusl && !ctx.Windows() {
|
||||
// Add -ldl, -lpthread, -lm and -lrt to host builds to match the default behavior of device
|
||||
// builds. This is irrelevant for the Windows target as these are Posix specific.
|
||||
flags.LinkFlags = append(flags.LinkFlags,
|
||||
"-ldl",
|
||||
"-lpthread",
|
||||
"-lm",
|
||||
)
|
||||
}
|
||||
return flags
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user