Remove support for libstdc++ on Android/Linux/Darwin
It's now only supported on Windows, where we don't have libc++ support
yet.
Change-Id: I64891b7558d3d2942588687017a0c2f695c18d5c
diff --git a/cc/makevars.go b/cc/makevars.go
index f107eff..f2214a2 100644
--- a/cc/makevars.go
+++ b/cc/makevars.go
@@ -109,8 +109,6 @@
toolchain.ToolchainLdflags(),
productExtraLdflags,
}, " "))
- ctx.Strict(makePrefix+"SYSTEMCPP_CPPFLAGS", toolchain.SystemCppCppflags())
- ctx.Strict(makePrefix+"SYSTEMCPP_LDFLAGS", toolchain.SystemCppLdflags())
includeFlags, err := ctx.Eval(toolchain.IncludeFlags())
if err != nil {
diff --git a/cc/stl.go b/cc/stl.go
index c5dbae3..280beed 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -65,8 +65,7 @@
}
} else {
switch stl.Properties.Stl {
- case "libc++", "libc++_static",
- "libstdc++":
+ case "libc++", "libc++_static":
return stl.Properties.Stl
case "none":
return ""
@@ -87,9 +86,7 @@
func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps {
switch stl.Properties.SelectedStl {
case "libstdc++":
- if ctx.Device() {
- deps.SharedLibs = append(deps.SharedLibs, stl.Properties.SelectedStl)
- }
+ // Nothing
case "libc++", "libc++_static":
if stl.Properties.SelectedStl == "libc++" {
deps.SharedLibs = append(deps.SharedLibs, stl.Properties.SelectedStl)
@@ -143,16 +140,7 @@
}
}
case "libstdc++":
- // Using bionic's basic libstdc++. Not actually an STL. Only around until the
- // tree is in good enough shape to not need it.
- // Host builds will use GNU libstdc++.
- if ctx.Device() {
- flags.CFlags = append(flags.CFlags, "-I"+android.PathForSource(ctx, "bionic/libstdc++/include").String())
- } else {
- // Host builds will use the system C++. libc++ on Darwin, GNU libstdc++ everywhere else
- flags.CppFlags = append(flags.CppFlags, flags.Toolchain.SystemCppCppflags())
- flags.LdFlags = append(flags.LdFlags, flags.Toolchain.SystemCppLdflags())
- }
+ // Nothing
case "ndk_system":
ndkSrcRoot := android.PathForSource(ctx, "prebuilts/ndk/current/sources/cxx-stl/system/include")
flags.CFlags = append(flags.CFlags, "-isystem "+ndkSrcRoot.String())
diff --git a/cc/toolchain.go b/cc/toolchain.go
index 87657ef..2e2ee5a 100644
--- a/cc/toolchain.go
+++ b/cc/toolchain.go
@@ -62,9 +62,6 @@
ShlibSuffix() string
ExecutableSuffix() string
- SystemCppCppflags() string
- SystemCppLdflags() string
-
AddressSanitizerRuntimeLibrary() string
AvailableLibraries() []string
@@ -119,14 +116,6 @@
return ""
}
-func (toolchainBase) SystemCppCppflags() string {
- return ""
-}
-
-func (toolchainBase) SystemCppLdflags() string {
- return ""
-}
-
func (toolchainBase) AddressSanitizerRuntimeLibrary() string {
return ""
}
diff --git a/cc/x86_darwin_host.go b/cc/x86_darwin_host.go
index 65a2dcc..a0643ef 100644
--- a/cc/x86_darwin_host.go
+++ b/cc/x86_darwin_host.go
@@ -38,14 +38,6 @@
"-mmacosx-version-min=${macSdkVersion}",
}
- darwinSystemCppCppflags = []string{
- "-isystem ${macToolchainRoot}/usr/include/c++/v1",
- }
-
- darwinSystemCppLdflags = []string{
- "-stdlib=libc++",
- }
-
// Extended cflags
darwinX86Cflags = []string{
"-m32",
@@ -129,9 +121,6 @@
pctx.StaticVariable("darwinClangCflags", strings.Join(darwinClangCflags, " "))
pctx.StaticVariable("darwinClangLdflags", strings.Join(darwinClangLdflags, " "))
- pctx.StaticVariable("darwinSystemCppCppflags", strings.Join(darwinSystemCppCppflags, " "))
- pctx.StaticVariable("darwinSystemCppLdflags", strings.Join(darwinSystemCppLdflags, " "))
-
// Extended cflags
pctx.StaticVariable("darwinX86Cflags", strings.Join(darwinX86Cflags, " "))
pctx.StaticVariable("darwinX8664Cflags", strings.Join(darwinX8664Cflags, " "))
@@ -257,14 +246,6 @@
return ".dylib"
}
-func (t *toolchainDarwin) SystemCppCppflags() string {
- return "${darwinSystemCppCppflags}"
-}
-
-func (t *toolchainDarwin) SystemCppLdflags() string {
- return "${darwinSystemCppLdflags}"
-}
-
func (t *toolchainDarwin) AvailableLibraries() []string {
return darwinAvailableLibraries
}