Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f7e3bb4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Remove GCC support from Make"

parents 953d3a2b f640dbcd
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1089,10 +1089,6 @@ func (c *Module) clang(ctx BaseModuleContext) bool {
		ctx.PropertyErrorf("clang", "false (GCC) is no longer supported")
	}

	if !c.toolchain(ctx).ClangSupported() {
		panic("GCC is no longer supported")
	}

	return !c.Properties.Gcc
}

+0 −5
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@ type Toolchain interface {
	IncludeFlags() string
	InstructionSetFlags(string) (string, error)

	ClangSupported() bool
	ClangTriple() string
	ToolchainClangCflags() string
	ToolchainClangLdflags() string
@@ -132,10 +131,6 @@ func (toolchainBase) ToolchainClangLdflags() string {
	return ""
}

func (toolchainBase) ClangSupported() bool {
	return true
}

func (toolchainBase) ShlibSuffix() string {
	return ".so"
}
+0 −4
Original line number Diff line number Diff line
@@ -233,10 +233,6 @@ func (t *toolchainWindowsX8664) WindresFlags() string {
	return "-F pe-x86-64"
}

func (t *toolchainWindows) ClangSupported() bool {
	return true
}

func (t *toolchainWindowsX86) ClangTriple() string {
	return "i686-windows-gnu"
}
+41 −79
Original line number Diff line number Diff line
@@ -136,7 +136,6 @@ func makeVarsProvider(ctx android.MakeVarsContext) {

	ctx.Strict("DEFAULT_C_STD_VERSION", config.CStdVersion)
	ctx.Strict("DEFAULT_CPP_STD_VERSION", config.CppStdVersion)
	ctx.Strict("DEFAULT_GCC_CPP_STD_VERSION", config.GccCppStdVersion)
	ctx.Strict("EXPERIMENTAL_C_STD_VERSION", config.ExperimentalCStdVersion)
	ctx.Strict("EXPERIMENTAL_CPP_STD_VERSION", config.ExperimentalCppStdVersion)

@@ -217,34 +216,6 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string,
		productExtraLdflags += "-static"
	}

	ctx.Strict(makePrefix+"GLOBAL_CFLAGS", strings.Join([]string{
		toolchain.Cflags(),
		"${config.CommonGlobalCflags}",
		fmt.Sprintf("${config.%sGlobalCflags}", hod),
		toolchain.ToolchainCflags(),
		productExtraCflags,
	}, " "))
	ctx.Strict(makePrefix+"GLOBAL_CONLYFLAGS", strings.Join([]string{
		"${config.CommonGlobalConlyflags}",
	}, " "))
	ctx.Strict(makePrefix+"GLOBAL_CPPFLAGS", strings.Join([]string{
		"${config.CommonGlobalCppflags}",
		fmt.Sprintf("${config.%sGlobalCppflags}", hod),
		toolchain.Cppflags(),
	}, " "))
	ctx.Strict(makePrefix+"GLOBAL_LDFLAGS", strings.Join([]string{
		fmt.Sprintf("${config.%sGlobalLdflags}", hod),
		toolchain.Ldflags(),
		toolchain.ToolchainLdflags(),
		productExtraLdflags,
	}, " "))
	ctx.Strict(makePrefix+"GLOBAL_LLDFLAGS", strings.Join([]string{
		fmt.Sprintf("${config.%sGlobalLldflags}", hod),
		toolchain.Ldflags(),
		toolchain.ToolchainLdflags(),
		productExtraLdflags,
	}, " "))

	includeFlags, err := ctx.Eval(toolchain.IncludeFlags())
	if err != nil {
		panic(err)
@@ -267,7 +238,6 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string,
		ctx.Strict(makePrefix+"thumb_CFLAGS", flags)
	}

	if toolchain.ClangSupported() {
	clangPrefix := secondPrefix + "CLANG_" + typePrefix
	clangExtras := "-target " + toolchain.ClangTriple()
	clangExtras += " -B" + config.ToolPath(toolchain)
@@ -314,14 +284,6 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string,
	ctx.Strict("CLANG_CONFIG_"+target.Arch.ArchType.Name+"_"+typePrefix+"TRIPLE",
		toolchain.ClangTriple())

		ctx.Strict(makePrefix+"CLANG_SUPPORTED", "true")
	} else {
		ctx.Strict(makePrefix+"CLANG_SUPPORTED", "")
	}

	ctx.Strict(makePrefix+"CC", gccCmd(toolchain, "gcc"))
	ctx.Strict(makePrefix+"CXX", gccCmd(toolchain, "g++"))

	if target.Os == android.Darwin {
		ctx.Strict(makePrefix+"AR", "${config.MacArPath}")
		ctx.Strict(makePrefix+"NM", "${config.MacToolPath}/nm")