From 19408a3aaa4e37de92a1e4e7e7205cd3e0c81e71 Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Tue, 12 Feb 2019 09:41:18 -0800 Subject: [PATCH] Use no_libcrt property instead of hard coding projects to exclude Test: m checkbuild Change-Id: Id4d3605a5cd45dd43b752a9d270df0a20024dbd0 --- cc/linker.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cc/linker.go b/cc/linker.go index dbdcd578e..649185a15 100644 --- a/cc/linker.go +++ b/cc/linker.go @@ -225,14 +225,9 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { } if ctx.toolchain().Bionic() { - // Allow individual projects to opt out of libcrt,builtins - // b/117565638 + // libclang_rt.builtins, libgcc and libatomic have to be last on the command line if !Bool(linker.Properties.No_libcrt) { - // libclang_rt.builtins, libgcc and libatomic have to be last on the command line - // TODO: Also enable for libc and libm - if ctx.ModuleName() != "libc" && ctx.ModuleName() != "libm" { - deps.LateStaticLibs = append(deps.LateStaticLibs, config.BuiltinsRuntimeLibrary(ctx.toolchain())) - } + deps.LateStaticLibs = append(deps.LateStaticLibs, config.BuiltinsRuntimeLibrary(ctx.toolchain())) } deps.LateStaticLibs = append(deps.LateStaticLibs, "libatomic")