Port GLOBAL[_CLANG]_CFLAGS_NO_OVERRIDE from make

Change-Id: I4f0f8ec7620e4477f60bf9cf1ae0c005470c89d4
diff --git a/cc/builder.go b/cc/builder.go
index 98f66d9..bcfbb6e 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -149,6 +149,14 @@
 	cppflags := flags.globalFlags + " " + flags.cFlags + " " + flags.cppFlags
 	asflags := flags.globalFlags + " " + flags.asFlags
 
+	if flags.clang {
+		cflags += " ${noOverrideClangGlobalCflags}"
+		cppflags += " ${noOverrideClangGlobalCflags}"
+	} else {
+		cflags += " ${noOverrideGlobalCflags}"
+		cppflags += " ${noOverrideGlobalCflags}"
+	}
+
 	for i, srcFile := range srcFiles {
 		objFile := common.ObjPathWithExt(ctx, srcFile, subdir, "o")