Loading cc/compiler.go +31 −34 Original line number Diff line number Diff line Loading @@ -397,7 +397,6 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps flags.GlobalFlags = append(flags.GlobalFlags, tc.ToolchainCflags()) } if !ctx.useSdk() { cStd := config.CStdVersion if String(compiler.Properties.C_std) == "experimental" { cStd = config.ExperimentalCStdVersion Loading @@ -420,10 +419,9 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps // GCC uses an invalid C++14 ABI (emits calls to // __cxa_throw_bad_array_length, which is not a valid C++ RT ABI). // http://b/25022512 cppStd = config.GccCppStdVersion } else if ctx.Host() && !flags.Clang { // The host GCC doesn't support C++14 (and is deprecated, so likely // never will). Build these modules with C++11. // never will). // Build these modules with C++11. cppStd = config.GccCppStdVersion } Loading @@ -434,7 +432,6 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps flags.ConlyFlags = append([]string{"-std=" + cStd}, flags.ConlyFlags...) flags.CppFlags = append([]string{"-std=" + cppStd}, flags.CppFlags...) } if ctx.useVndk() { flags.CFlags = append(flags.CFlags, esc(compiler.Properties.Target.Vendor.Cflags)...) Loading cc/stl.go +1 −2 Original line number Diff line number Diff line Loading @@ -176,8 +176,7 @@ func (stl *stl) flags(ctx ModuleContext, flags Flags) Flags { ndkSrcRoot := android.PathForSource(ctx, "prebuilts/ndk/current/sources/cxx-stl/system/include") flags.CFlags = append(flags.CFlags, "-isystem "+ndkSrcRoot.String()) case "ndk_libc++_shared", "ndk_libc++_static": // TODO(danalbert): This really shouldn't be here... flags.CppFlags = append(flags.CppFlags, "-std=c++11") // Nothing. case "": // None or error. if !ctx.toolchain().Bionic() { Loading Loading
cc/compiler.go +31 −34 Original line number Diff line number Diff line Loading @@ -397,7 +397,6 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps flags.GlobalFlags = append(flags.GlobalFlags, tc.ToolchainCflags()) } if !ctx.useSdk() { cStd := config.CStdVersion if String(compiler.Properties.C_std) == "experimental" { cStd = config.ExperimentalCStdVersion Loading @@ -420,10 +419,9 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps // GCC uses an invalid C++14 ABI (emits calls to // __cxa_throw_bad_array_length, which is not a valid C++ RT ABI). // http://b/25022512 cppStd = config.GccCppStdVersion } else if ctx.Host() && !flags.Clang { // The host GCC doesn't support C++14 (and is deprecated, so likely // never will). Build these modules with C++11. // never will). // Build these modules with C++11. cppStd = config.GccCppStdVersion } Loading @@ -434,7 +432,6 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps flags.ConlyFlags = append([]string{"-std=" + cStd}, flags.ConlyFlags...) flags.CppFlags = append([]string{"-std=" + cppStd}, flags.CppFlags...) } if ctx.useVndk() { flags.CFlags = append(flags.CFlags, esc(compiler.Properties.Target.Vendor.Cflags)...) Loading
cc/stl.go +1 −2 Original line number Diff line number Diff line Loading @@ -176,8 +176,7 @@ func (stl *stl) flags(ctx ModuleContext, flags Flags) Flags { ndkSrcRoot := android.PathForSource(ctx, "prebuilts/ndk/current/sources/cxx-stl/system/include") flags.CFlags = append(flags.CFlags, "-isystem "+ndkSrcRoot.String()) case "ndk_libc++_shared", "ndk_libc++_static": // TODO(danalbert): This really shouldn't be here... flags.CppFlags = append(flags.CppFlags, "-std=c++11") // Nothing. case "": // None or error. if !ctx.toolchain().Bionic() { Loading