diff --git a/cc/ndk_prebuilt.go b/cc/ndk_prebuilt.go index de1fa4698..7e8d98916 100644 --- a/cc/ndk_prebuilt.go +++ b/cc/ndk_prebuilt.go @@ -164,21 +164,9 @@ func ndkPrebuiltStaticStlFactory() android.Module { } func getNdkStlLibDir(ctx android.ModuleContext, stl string) android.SourcePath { - var libDir string - switch stl { - case "libstlport": - 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, "") + libDir := "cxx-stl/llvm-libc++/libs" + ndkSrcRoot := "prebuilts/ndk/current/sources" + return android.PathForSource(ctx, ndkSrcRoot).Join(ctx, libDir, ctx.Arch().Abi[0]) } func (ndk *ndkPrebuiltStlLinker) link(ctx ModuleContext, flags Flags, diff --git a/cc/stl.go b/cc/stl.go index cafb26deb..c65f1c2f5 100644 --- a/cc/stl.go +++ b/cc/stl.go @@ -24,8 +24,6 @@ func getNdkStlFamily(ctx android.ModuleContext, m *Module) string { switch stl { case "ndk_libc++_shared", "ndk_libc++_static": return "libc++" - case "ndk_libstlport_shared", "ndk_libstlport_static": - return "stlport" case "ndk_system": return "system" case "": @@ -37,9 +35,9 @@ func getNdkStlFamily(ctx android.ModuleContext, m *Module) string { } type StlProperties struct { - // select the STL library to use. Possible values are "libc++", "libc++_static", - // "stlport", "stlport_static", "ndk", "libstdc++", or "none". Leave blank to select the - // default + // Select the STL library to use. Possible values are "libc++", + // "libc++_static", "libstdc++", or "none". Leave blank to select the + // default. Stl *string `android:"arch_variant"` SelectedStl string `blueprint:"mutated"` @@ -63,8 +61,7 @@ func (stl *stl) begin(ctx BaseModuleContext) { switch s { case "": return "ndk_system" - case "c++_shared", "c++_static", - "stlport_shared", "stlport_static": + case "c++_shared", "c++_static": return "ndk_lib" + s case "libc++": 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 // its own includes. The includes are handled in CCBase.Flags(). 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) - case "ndk_libc++_static", "ndk_libstlport_static": + case "ndk_libc++_static": deps.StaticLibs = append(deps.StaticLibs, stl.Properties.SelectedStl) default: 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": // TODO(danalbert): This really shouldn't be here... flags.CppFlags = append(flags.CppFlags, "-std=c++11") - case "ndk_libstlport_shared", "ndk_libstlport_static": - // Nothing case "": // None or error. if !ctx.toolchain().Bionic() {