diff options
author | Dan Willemsen <dwillemsen@google.com> | 2016-06-15 13:47:51 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2016-06-15 13:47:51 -0700 |
commit | 141d566f2b18fa8d248669c31d9f26ccca22b984 (patch) | |
tree | b8c7408a44e74101902029741177764cdeeedff7 /cc | |
parent | 7517ed0b467ccb4a06bfdd5147c3811daf4814e6 (diff) | |
download | build_soong-141d566f2b18fa8d248669c31d9f26ccca22b984.tar.gz build_soong-141d566f2b18fa8d248669c31d9f26ccca22b984.tar.bz2 build_soong-141d566f2b18fa8d248669c31d9f26ccca22b984.zip |
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
Diffstat (limited to 'cc')
-rw-r--r-- | cc/makevars.go | 2 | ||||
-rw-r--r-- | cc/stl.go | 18 | ||||
-rw-r--r-- | cc/toolchain.go | 11 | ||||
-rw-r--r-- | cc/x86_darwin_host.go | 19 |
4 files changed, 3 insertions, 47 deletions
diff --git a/cc/makevars.go b/cc/makevars.go index f107eff8..f2214a27 100644 --- a/cc/makevars.go +++ b/cc/makevars.go @@ -109,8 +109,6 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string, 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 { @@ -65,8 +65,7 @@ func (stl *stl) begin(ctx BaseModuleContext) { } } 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) begin(ctx BaseModuleContext) { 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 @@ func (stl *stl) flags(ctx ModuleContext, flags Flags) Flags { } } 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 87657ef5..2e2ee5a4 100644 --- a/cc/toolchain.go +++ b/cc/toolchain.go @@ -62,9 +62,6 @@ type Toolchain interface { ShlibSuffix() string ExecutableSuffix() string - SystemCppCppflags() string - SystemCppLdflags() string - AddressSanitizerRuntimeLibrary() string AvailableLibraries() []string @@ -119,14 +116,6 @@ func (toolchainBase) ClangAsflags() string { 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 65a2dcc7..a0643eff 100644 --- a/cc/x86_darwin_host.go +++ b/cc/x86_darwin_host.go @@ -38,14 +38,6 @@ var ( "-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 @@ func init() { 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 @@ func (t *toolchainDarwin) ShlibSuffix() string { return ".dylib" } -func (t *toolchainDarwin) SystemCppCppflags() string { - return "${darwinSystemCppCppflags}" -} - -func (t *toolchainDarwin) SystemCppLdflags() string { - return "${darwinSystemCppLdflags}" -} - func (t *toolchainDarwin) AvailableLibraries() []string { return darwinAvailableLibraries } |