Fix defaults of BaseCompilerProperties
* Edition and Deny_warnings should not be set when
constructing a BaseCompilerProperties, or the
initialized values will reject values inherited from rust_defaults.
* Use getEdition and getDenyWarnings to retrieve those properties
with defaults from config.
Bug: 141699953
Test: mm in rust projects
Change-Id: Id1ae357caeaf656cd33732bf4e54920e206f4ead
diff --git a/rust/config/global.go b/rust/config/global.go
index ae50804..7846d21 100644
--- a/rust/config/global.go
+++ b/rust/config/global.go
@@ -17,8 +17,6 @@
import (
"strings"
- "github.com/google/blueprint/proptools"
-
"android/soong/android"
_ "android/soong/cc/config"
)
@@ -35,7 +33,7 @@
"libtest",
}
- DefaultDenyWarnings = proptools.BoolPtr(true)
+ DefaultDenyWarnings = true
GlobalRustFlags = []string{
"--remap-path-prefix $$(pwd)=",