Merge "android_app stl property bug fix"
This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
|||||||
func init() {
|
func init() {
|
||||||
android.RegisterModuleType("ndk_prebuilt_object", ndkPrebuiltObjectFactory)
|
android.RegisterModuleType("ndk_prebuilt_object", ndkPrebuiltObjectFactory)
|
||||||
android.RegisterModuleType("ndk_prebuilt_static_stl", ndkPrebuiltStaticStlFactory)
|
android.RegisterModuleType("ndk_prebuilt_static_stl", ndkPrebuiltStaticStlFactory)
|
||||||
android.RegisterModuleType("ndk_prebuilt_shared_stl", ndkPrebuiltSharedStlFactory)
|
android.RegisterModuleType("ndk_prebuilt_shared_stl", NdkPrebuiltSharedStlFactory)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NDK prebuilt libraries.
|
// NDK prebuilt libraries.
|
||||||
@@ -107,7 +107,7 @@ func (*ndkPrebuiltStlLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
|||||||
// library (stl) library for linking operation. The soong's module name format
|
// library (stl) library for linking operation. The soong's module name format
|
||||||
// is ndk_<NAME>.so where the library is located under
|
// is ndk_<NAME>.so where the library is located under
|
||||||
// ./prebuilts/ndk/current/sources/cxx-stl/llvm-libc++/libs/$(HOST_ARCH)/<NAME>.so.
|
// ./prebuilts/ndk/current/sources/cxx-stl/llvm-libc++/libs/$(HOST_ARCH)/<NAME>.so.
|
||||||
func ndkPrebuiltSharedStlFactory() android.Module {
|
func NdkPrebuiltSharedStlFactory() android.Module {
|
||||||
module, library := NewLibrary(android.DeviceSupported)
|
module, library := NewLibrary(android.DeviceSupported)
|
||||||
library.BuildOnlyShared()
|
library.BuildOnlyShared()
|
||||||
module.compiler = nil
|
module.compiler = nil
|
||||||
|
@@ -175,7 +175,7 @@ func (a *AndroidApp) DepsMutator(ctx android.BottomUpMutatorContext) {
|
|||||||
ctx.AddFarVariationDependencies(variation, tag, a.appProperties.Jni_libs...)
|
ctx.AddFarVariationDependencies(variation, tag, a.appProperties.Jni_libs...)
|
||||||
if String(a.appProperties.Stl) == "c++_shared" {
|
if String(a.appProperties.Stl) == "c++_shared" {
|
||||||
if embedJni {
|
if embedJni {
|
||||||
ctx.AddFarVariationDependencies(variation, tag, "libc++")
|
ctx.AddFarVariationDependencies(variation, tag, "ndk_libc++_shared")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1203,6 +1203,10 @@ func TestStl(t *testing.T) {
|
|||||||
compile_multilib: "both",
|
compile_multilib: "both",
|
||||||
sdk_version: "current",
|
sdk_version: "current",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ndk_prebuilt_shared_stl {
|
||||||
|
name: "ndk_libc++_shared",
|
||||||
|
}
|
||||||
`)
|
`)
|
||||||
|
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
@@ -1212,7 +1216,7 @@ func TestStl(t *testing.T) {
|
|||||||
{"stl",
|
{"stl",
|
||||||
[]string{
|
[]string{
|
||||||
"libjni.so",
|
"libjni.so",
|
||||||
"libc++.so",
|
"libc++_shared.so",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{"system",
|
{"system",
|
||||||
|
@@ -105,6 +105,7 @@ func testContext(config android.Config, bp string,
|
|||||||
ctx.RegisterModuleType("cc_object", android.ModuleFactoryAdaptor(cc.ObjectFactory))
|
ctx.RegisterModuleType("cc_object", android.ModuleFactoryAdaptor(cc.ObjectFactory))
|
||||||
ctx.RegisterModuleType("toolchain_library", android.ModuleFactoryAdaptor(cc.ToolchainLibraryFactory))
|
ctx.RegisterModuleType("toolchain_library", android.ModuleFactoryAdaptor(cc.ToolchainLibraryFactory))
|
||||||
ctx.RegisterModuleType("llndk_library", android.ModuleFactoryAdaptor(cc.LlndkLibraryFactory))
|
ctx.RegisterModuleType("llndk_library", android.ModuleFactoryAdaptor(cc.LlndkLibraryFactory))
|
||||||
|
ctx.RegisterModuleType("ndk_prebuilt_shared_stl", android.ModuleFactoryAdaptor(cc.NdkPrebuiltSharedStlFactory))
|
||||||
ctx.PreDepsMutators(func(ctx android.RegisterMutatorsContext) {
|
ctx.PreDepsMutators(func(ctx android.RegisterMutatorsContext) {
|
||||||
ctx.BottomUp("link", cc.LinkageMutator).Parallel()
|
ctx.BottomUp("link", cc.LinkageMutator).Parallel()
|
||||||
ctx.BottomUp("begin", cc.BeginMutator).Parallel()
|
ctx.BottomUp("begin", cc.BeginMutator).Parallel()
|
||||||
@@ -134,6 +135,8 @@ func testContext(config android.Config, bp string,
|
|||||||
"api/test-removed.txt": nil,
|
"api/test-removed.txt": nil,
|
||||||
"framework/aidl/a.aidl": nil,
|
"framework/aidl/a.aidl": nil,
|
||||||
|
|
||||||
|
"prebuilts/ndk/current/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so": nil,
|
||||||
|
|
||||||
"prebuilts/sdk/14/public/android.jar": nil,
|
"prebuilts/sdk/14/public/android.jar": nil,
|
||||||
"prebuilts/sdk/14/public/framework.aidl": nil,
|
"prebuilts/sdk/14/public/framework.aidl": nil,
|
||||||
"prebuilts/sdk/14/system/android.jar": nil,
|
"prebuilts/sdk/14/system/android.jar": nil,
|
||||||
|
Reference in New Issue
Block a user