Add "-no-warn-sample-unuse=true" to work around AutoFDO issue

Autofdo generates profile for an instruction even if there is no debug
information associated with it or no debug information associated with
the function. A bogus offset will be produced in the profile. Add the
flag to suppress Clang from generating error for such cases.

Test: build with ETM profile
Bug: 147844018
Bug: 79161490
Change-Id: I37da1ba3a4962072ccdf01f79fbf2c2b4c77b56b
diff --git a/cc/pgo.go b/cc/pgo.go
index 0072355..e341d03 100644
--- a/cc/pgo.go
+++ b/cc/pgo.go
@@ -177,6 +177,10 @@
 		// if profileFile gets updated
 		flags.CFlagsDeps = append(flags.CFlagsDeps, profileFilePath)
 		flags.LdFlagsDeps = append(flags.LdFlagsDeps, profileFilePath)
+
+		if props.isSampling() {
+			flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,-mllvm,-no-warn-sample-unused=true")
+		}
 	}
 	return flags
 }