Merge "Use proptools.BoolDefault" am: ed1268268d
am: 72510f2a27
Change-Id: I9c7901cdf5a24a48edac64ba3a4b8e047d4ba81a
This commit is contained in:
1
cc/cc.go
1
cc/cc.go
@@ -1585,6 +1585,7 @@ func getCurrentNdkPrebuiltVersion(ctx DepsContext) string {
|
||||
}
|
||||
|
||||
var Bool = proptools.Bool
|
||||
var BoolDefault = proptools.BoolDefault
|
||||
var BoolPtr = proptools.BoolPtr
|
||||
var String = proptools.String
|
||||
var StringPtr = proptools.StringPtr
|
||||
|
@@ -700,13 +700,11 @@ func (library *libraryDecorator) link(ctx ModuleContext,
|
||||
}
|
||||
|
||||
func (library *libraryDecorator) buildStatic() bool {
|
||||
return library.MutatedProperties.BuildStatic &&
|
||||
(library.Properties.Static.Enabled == nil || *library.Properties.Static.Enabled)
|
||||
return library.MutatedProperties.BuildStatic && BoolDefault(library.Properties.Static.Enabled, true)
|
||||
}
|
||||
|
||||
func (library *libraryDecorator) buildShared() bool {
|
||||
return library.MutatedProperties.BuildShared &&
|
||||
(library.Properties.Shared.Enabled == nil || *library.Properties.Shared.Enabled)
|
||||
return library.MutatedProperties.BuildShared && BoolDefault(library.Properties.Shared.Enabled, true)
|
||||
}
|
||||
|
||||
func (library *libraryDecorator) getWholeStaticMissingDeps() []string {
|
||||
|
@@ -128,7 +128,7 @@ type testDecorator struct {
|
||||
}
|
||||
|
||||
func (test *testDecorator) gtest() bool {
|
||||
return test.Properties.Gtest == nil || *test.Properties.Gtest == true
|
||||
return BoolDefault(test.Properties.Gtest, true)
|
||||
}
|
||||
|
||||
func (test *testDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
|
||||
|
Reference in New Issue
Block a user