Update RustDefaultVersion
to 1.59.0
bug: 215232614 Test: TreeHugger and compiling with m rust Change-Id: Ia60c77637ab2e41844010e021656fad0870013ac
This commit is contained in:
@@ -24,7 +24,7 @@ import (
|
|||||||
var pctx = android.NewPackageContext("android/soong/rust/config")
|
var pctx = android.NewPackageContext("android/soong/rust/config")
|
||||||
|
|
||||||
var (
|
var (
|
||||||
RustDefaultVersion = "1.58.1"
|
RustDefaultVersion = "1.59.0"
|
||||||
RustDefaultBase = "prebuilts/rust/"
|
RustDefaultBase = "prebuilts/rust/"
|
||||||
DefaultEdition = "2021"
|
DefaultEdition = "2021"
|
||||||
Stdlibs = []string{
|
Stdlibs = []string{
|
||||||
@@ -49,7 +49,7 @@ var (
|
|||||||
"-C overflow-checks=on",
|
"-C overflow-checks=on",
|
||||||
"-C force-unwind-tables=yes",
|
"-C force-unwind-tables=yes",
|
||||||
// Use v0 mangling to distinguish from C++ symbols
|
// Use v0 mangling to distinguish from C++ symbols
|
||||||
"-Z symbol-mangling-version=v0",
|
"-C symbol-mangling-version=v0",
|
||||||
}
|
}
|
||||||
|
|
||||||
deviceGlobalRustFlags = []string{
|
deviceGlobalRustFlags = []string{
|
||||||
|
@@ -47,17 +47,17 @@ func TestRustFuzz(t *testing.T) {
|
|||||||
// Check that compiler flags are set appropriately .
|
// Check that compiler flags are set appropriately .
|
||||||
fuzz_libtest := ctx.ModuleForTests("fuzz_libtest", "android_arm64_armv8-a_fuzzer").Rule("rustc")
|
fuzz_libtest := ctx.ModuleForTests("fuzz_libtest", "android_arm64_armv8-a_fuzzer").Rule("rustc")
|
||||||
if !strings.Contains(fuzz_libtest.Args["rustcFlags"], "-Z sanitizer=hwaddress") ||
|
if !strings.Contains(fuzz_libtest.Args["rustcFlags"], "-Z sanitizer=hwaddress") ||
|
||||||
!strings.Contains(fuzz_libtest.Args["rustcFlags"], "-C passes='sancov'") ||
|
!strings.Contains(fuzz_libtest.Args["rustcFlags"], "-C passes='sancov-module'") ||
|
||||||
!strings.Contains(fuzz_libtest.Args["rustcFlags"], "--cfg fuzzing") {
|
!strings.Contains(fuzz_libtest.Args["rustcFlags"], "--cfg fuzzing") {
|
||||||
t.Errorf("rust_fuzz module does not contain the expected flags (sancov, cfg fuzzing, hwaddress sanitizer).")
|
t.Errorf("rust_fuzz module does not contain the expected flags (sancov-module, cfg fuzzing, hwaddress sanitizer).")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that dependencies have 'fuzzer' variants produced for them as well.
|
// Check that dependencies have 'fuzzer' variants produced for them as well.
|
||||||
libtest_fuzzer := ctx.ModuleForTests("libtest_fuzzing", "android_arm64_armv8-a_rlib_rlib-std_fuzzer").Output("libtest_fuzzing.rlib")
|
libtest_fuzzer := ctx.ModuleForTests("libtest_fuzzing", "android_arm64_armv8-a_rlib_rlib-std_fuzzer").Output("libtest_fuzzing.rlib")
|
||||||
if !strings.Contains(libtest_fuzzer.Args["rustcFlags"], "-Z sanitizer=hwaddress") ||
|
if !strings.Contains(libtest_fuzzer.Args["rustcFlags"], "-Z sanitizer=hwaddress") ||
|
||||||
!strings.Contains(libtest_fuzzer.Args["rustcFlags"], "-C passes='sancov'") ||
|
!strings.Contains(libtest_fuzzer.Args["rustcFlags"], "-C passes='sancov-module'") ||
|
||||||
!strings.Contains(libtest_fuzzer.Args["rustcFlags"], "--cfg fuzzing") {
|
!strings.Contains(libtest_fuzzer.Args["rustcFlags"], "--cfg fuzzing") {
|
||||||
t.Errorf("rust_fuzz dependent library does not contain the expected flags (sancov, cfg fuzzing, hwaddress sanitizer).")
|
t.Errorf("rust_fuzz dependent library does not contain the expected flags (sancov-module, cfg fuzzing, hwaddress sanitizer).")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -57,7 +57,7 @@ type SanitizeProperties struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var fuzzerFlags = []string{
|
var fuzzerFlags = []string{
|
||||||
"-C passes='sancov'",
|
"-C passes='sancov-module'",
|
||||||
|
|
||||||
"--cfg fuzzing",
|
"--cfg fuzzing",
|
||||||
"-C llvm-args=-sanitizer-coverage-level=3",
|
"-C llvm-args=-sanitizer-coverage-level=3",
|
||||||
@@ -70,7 +70,7 @@ var fuzzerFlags = []string{
|
|||||||
"-C link-dead-code",
|
"-C link-dead-code",
|
||||||
|
|
||||||
// Sancov breaks with lto
|
// Sancov breaks with lto
|
||||||
// TODO: Remove when https://bugs.llvm.org/show_bug.cgi?id=41734 is resolved and sancov works with LTO
|
// TODO: Remove when https://bugs.llvm.org/show_bug.cgi?id=41734 is resolved and sancov-module works with LTO
|
||||||
"-C lto=no",
|
"-C lto=no",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user