Remove support for stlport.
Test: make checkbuild Bug: None Change-Id: I066574dd623ddd617f7cdbabbb16e01ece0b4cdc
This commit is contained in:
@@ -164,21 +164,9 @@ func ndkPrebuiltStaticStlFactory() android.Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getNdkStlLibDir(ctx android.ModuleContext, stl string) android.SourcePath {
|
func getNdkStlLibDir(ctx android.ModuleContext, stl string) android.SourcePath {
|
||||||
var libDir string
|
libDir := "cxx-stl/llvm-libc++/libs"
|
||||||
switch stl {
|
ndkSrcRoot := "prebuilts/ndk/current/sources"
|
||||||
case "libstlport":
|
return android.PathForSource(ctx, ndkSrcRoot).Join(ctx, libDir, ctx.Arch().Abi[0])
|
||||||
libDir = "cxx-stl/stlport/libs"
|
|
||||||
case "libc++":
|
|
||||||
libDir = "cxx-stl/llvm-libc++/libs"
|
|
||||||
}
|
|
||||||
|
|
||||||
if libDir != "" {
|
|
||||||
ndkSrcRoot := "prebuilts/ndk/current/sources"
|
|
||||||
return android.PathForSource(ctx, ndkSrcRoot).Join(ctx, libDir, ctx.Arch().Abi[0])
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.ModuleErrorf("Unknown NDK STL: %s", stl)
|
|
||||||
return android.PathForSource(ctx, "")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ndk *ndkPrebuiltStlLinker) link(ctx ModuleContext, flags Flags,
|
func (ndk *ndkPrebuiltStlLinker) link(ctx ModuleContext, flags Flags,
|
||||||
|
17
cc/stl.go
17
cc/stl.go
@@ -24,8 +24,6 @@ func getNdkStlFamily(ctx android.ModuleContext, m *Module) string {
|
|||||||
switch stl {
|
switch stl {
|
||||||
case "ndk_libc++_shared", "ndk_libc++_static":
|
case "ndk_libc++_shared", "ndk_libc++_static":
|
||||||
return "libc++"
|
return "libc++"
|
||||||
case "ndk_libstlport_shared", "ndk_libstlport_static":
|
|
||||||
return "stlport"
|
|
||||||
case "ndk_system":
|
case "ndk_system":
|
||||||
return "system"
|
return "system"
|
||||||
case "":
|
case "":
|
||||||
@@ -37,9 +35,9 @@ func getNdkStlFamily(ctx android.ModuleContext, m *Module) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type StlProperties struct {
|
type StlProperties struct {
|
||||||
// select the STL library to use. Possible values are "libc++", "libc++_static",
|
// Select the STL library to use. Possible values are "libc++",
|
||||||
// "stlport", "stlport_static", "ndk", "libstdc++", or "none". Leave blank to select the
|
// "libc++_static", "libstdc++", or "none". Leave blank to select the
|
||||||
// default
|
// default.
|
||||||
Stl *string `android:"arch_variant"`
|
Stl *string `android:"arch_variant"`
|
||||||
|
|
||||||
SelectedStl string `blueprint:"mutated"`
|
SelectedStl string `blueprint:"mutated"`
|
||||||
@@ -63,8 +61,7 @@ func (stl *stl) begin(ctx BaseModuleContext) {
|
|||||||
switch s {
|
switch s {
|
||||||
case "":
|
case "":
|
||||||
return "ndk_system"
|
return "ndk_system"
|
||||||
case "c++_shared", "c++_static",
|
case "c++_shared", "c++_static":
|
||||||
"stlport_shared", "stlport_static":
|
|
||||||
return "ndk_lib" + s
|
return "ndk_lib" + s
|
||||||
case "libc++":
|
case "libc++":
|
||||||
return "ndk_libc++_shared"
|
return "ndk_libc++_shared"
|
||||||
@@ -132,9 +129,9 @@ func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps {
|
|||||||
// The system STL doesn't have a prebuilt (it uses the system's libstdc++), but it does have
|
// The system STL doesn't have a prebuilt (it uses the system's libstdc++), but it does have
|
||||||
// its own includes. The includes are handled in CCBase.Flags().
|
// its own includes. The includes are handled in CCBase.Flags().
|
||||||
deps.SharedLibs = append([]string{"libstdc++"}, deps.SharedLibs...)
|
deps.SharedLibs = append([]string{"libstdc++"}, deps.SharedLibs...)
|
||||||
case "ndk_libc++_shared", "ndk_libstlport_shared":
|
case "ndk_libc++_shared":
|
||||||
deps.SharedLibs = append(deps.SharedLibs, stl.Properties.SelectedStl)
|
deps.SharedLibs = append(deps.SharedLibs, stl.Properties.SelectedStl)
|
||||||
case "ndk_libc++_static", "ndk_libstlport_static":
|
case "ndk_libc++_static":
|
||||||
deps.StaticLibs = append(deps.StaticLibs, stl.Properties.SelectedStl)
|
deps.StaticLibs = append(deps.StaticLibs, stl.Properties.SelectedStl)
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("Unknown stl: %q", stl.Properties.SelectedStl))
|
panic(fmt.Errorf("Unknown stl: %q", stl.Properties.SelectedStl))
|
||||||
@@ -168,8 +165,6 @@ func (stl *stl) flags(ctx ModuleContext, flags Flags) Flags {
|
|||||||
case "ndk_libc++_shared", "ndk_libc++_static":
|
case "ndk_libc++_shared", "ndk_libc++_static":
|
||||||
// TODO(danalbert): This really shouldn't be here...
|
// TODO(danalbert): This really shouldn't be here...
|
||||||
flags.CppFlags = append(flags.CppFlags, "-std=c++11")
|
flags.CppFlags = append(flags.CppFlags, "-std=c++11")
|
||||||
case "ndk_libstlport_shared", "ndk_libstlport_static":
|
|
||||||
// Nothing
|
|
||||||
case "":
|
case "":
|
||||||
// None or error.
|
// None or error.
|
||||||
if !ctx.toolchain().Bionic() {
|
if !ctx.toolchain().Bionic() {
|
||||||
|
Reference in New Issue
Block a user