Merge "Use no_libcrt property instead of hard coding projects to exclude" am: 02e4b568dc

am: 908b3fa509

Change-Id: Ib53b66b742c47ec595ac641bc788c83d8044375d
This commit is contained in:
Yi Kong
2019-02-13 15:31:08 -08:00
committed by android-build-merger

View File

@@ -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")