Merge "Add -Wl,--exclude-libs=libclang_rt.builtins to ldflags"
diff --git a/cc/linker.go b/cc/linker.go
index 962fcce..563ad04 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -383,6 +383,10 @@
 		flags.LdFlags = append(flags.LdFlags, "-lfdio", "-lzircon")
 	}
 
+	if ctx.toolchain().LibclangRuntimeLibraryArch() != "" {
+		flags.LdFlags = append(flags.LdFlags, "-Wl,--exclude-libs="+config.BuiltinsRuntimeLibrary(ctx.toolchain())+".a")
+	}
+
 	CheckBadLinkerFlags(ctx, "ldflags", linker.Properties.Ldflags)
 
 	flags.LdFlags = append(flags.LdFlags, proptools.NinjaAndShellEscapeList(linker.Properties.Ldflags)...)