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

Commit 5482a833 authored by Yu Liu's avatar Yu Liu Committed by Gerrit Code Review
Browse files

Merge "Support env based compiler flags."

parents acb884e2 19ea53de
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -344,16 +344,7 @@ func init() {
	exportedVars.ExportStringListStaticVariable("HostGlobalLldflags", hostGlobalLldflags)

	// Export the static default CommonGlobalCflags to Bazel.
	// TODO(187086342): handle cflags that are set in VariableFuncs.
	bazelCommonGlobalCflags := append(
		commonGlobalCflags,
		[]string{
			// Default to zero initialization.
			"-ftrivial-auto-var-init=zero",
			"-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang",
			"-Wno-unused-command-line-argument",
		}...)
	exportedVars.ExportStringList("CommonGlobalCflags", bazelCommonGlobalCflags)
	exportedVars.ExportStringList("CommonGlobalCflags", commonGlobalCflags)

	pctx.VariableFunc("CommonGlobalCflags", func(ctx android.PackageVarContext) string {
		flags := commonGlobalCflags