Merge "Add -Wl,--exclude-libs=libclang_rt.builtins to ldflags"

This commit is contained in:
Tom Cherry 2019-08-19 16:39:57 +00:00 committed by Gerrit Code Review
commit 3440835748

View file

@ -383,6 +383,10 @@ func (linker *baseLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags {
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)...)