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

Commit 7319cff8 authored by Florian Mayer's avatar Florian Mayer
Browse files

Respect THINLTO_USE_MLGO for ML inliner

Test: m statsd with toolchain that doesn't support MLGO

Change-Id: Ibbe2de7ac41a17288d666111a49de34d437d7ead
parent 8017cca9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -695,8 +695,10 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps

	if ctx.optimizeForSize() {
		flags.Local.CFlags = append(flags.Local.CFlags, "-Oz")
		if !ctx.Config().IsEnvFalse("THINLTO_USE_MLGO") {
			flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,-mllvm,-enable-ml-inliner=release")
		}
	}

	// Exclude directories from manual binder interface allowed list.
	//TODO(b/145621474): Move this check into IInterface.h when clang-tidy no longer uses absolute paths.