Rename no_standard_libraries to no_standard_libs
For consistency with libs and static_libs. And make it a *bool so that it can be overriden when used in java_defaults modules. Test: java_test.go Change-Id: If0eaf5d5571dc6e565056d273b0addd960d6b33f
This commit is contained in:
@@ -123,7 +123,7 @@ func init() {
|
|||||||
"LOCAL_NO_CRT": "nocrt",
|
"LOCAL_NO_CRT": "nocrt",
|
||||||
"LOCAL_ALLOW_UNDEFINED_SYMBOLS": "allow_undefined_symbols",
|
"LOCAL_ALLOW_UNDEFINED_SYMBOLS": "allow_undefined_symbols",
|
||||||
"LOCAL_RTTI_FLAG": "rtti",
|
"LOCAL_RTTI_FLAG": "rtti",
|
||||||
"LOCAL_NO_STANDARD_LIBRARIES": "no_standard_libraries",
|
"LOCAL_NO_STANDARD_LIBRARIES": "no_standard_libs",
|
||||||
"LOCAL_PACK_MODULE_RELOCATIONS": "pack_relocations",
|
"LOCAL_PACK_MODULE_RELOCATIONS": "pack_relocations",
|
||||||
"LOCAL_TIDY": "tidy",
|
"LOCAL_TIDY": "tidy",
|
||||||
"LOCAL_PROPRIETARY_MODULE": "proprietary",
|
"LOCAL_PROPRIETARY_MODULE": "proprietary",
|
||||||
|
@@ -21,6 +21,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
)
|
)
|
||||||
@@ -68,7 +69,7 @@ type AndroidApp struct {
|
|||||||
func (a *AndroidApp) DepsMutator(ctx android.BottomUpMutatorContext) {
|
func (a *AndroidApp) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||||
a.Module.deps(ctx)
|
a.Module.deps(ctx)
|
||||||
|
|
||||||
if !a.properties.No_standard_libraries {
|
if !proptools.Bool(a.properties.No_standard_libs) {
|
||||||
switch a.deviceProperties.Sdk_version { // TODO: Res_sdk_version?
|
switch a.deviceProperties.Sdk_version { // TODO: Res_sdk_version?
|
||||||
case "current", "system_current", "":
|
case "current", "system_current", "":
|
||||||
ctx.AddDependency(ctx.Module(), frameworkResTag, "framework-res")
|
ctx.AddDependency(ctx.Module(), frameworkResTag, "framework-res")
|
||||||
|
@@ -24,6 +24,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
"android/soong/genrule"
|
"android/soong/genrule"
|
||||||
@@ -76,7 +77,7 @@ type CompilerProperties struct {
|
|||||||
|
|
||||||
// don't build against the default libraries (legacy-test, core-junit,
|
// don't build against the default libraries (legacy-test, core-junit,
|
||||||
// ext, and framework for device targets)
|
// ext, and framework for device targets)
|
||||||
No_standard_libraries bool
|
No_standard_libs *bool
|
||||||
|
|
||||||
// list of module-specific flags that will be used for javac compiles
|
// list of module-specific flags that will be used for javac compiles
|
||||||
Javacflags []string `android:"arch_variant"`
|
Javacflags []string `android:"arch_variant"`
|
||||||
@@ -174,7 +175,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (j *Module) deps(ctx android.BottomUpMutatorContext) {
|
func (j *Module) deps(ctx android.BottomUpMutatorContext) {
|
||||||
if !j.properties.No_standard_libraries {
|
if !proptools.Bool(j.properties.No_standard_libs) {
|
||||||
if ctx.Device() {
|
if ctx.Device() {
|
||||||
switch j.deviceProperties.Sdk_version {
|
switch j.deviceProperties.Sdk_version {
|
||||||
case "":
|
case "":
|
||||||
|
@@ -69,7 +69,7 @@ func testJava(t *testing.T, bp string) *android.TestContext {
|
|||||||
bp += fmt.Sprintf(`
|
bp += fmt.Sprintf(`
|
||||||
java_library {
|
java_library {
|
||||||
name: "%s",
|
name: "%s",
|
||||||
no_standard_libraries: true,
|
no_standard_libs: true,
|
||||||
}
|
}
|
||||||
`, extra)
|
`, extra)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user