Merge "Use no_libcrt property instead of hard coding projects to exclude"

This commit is contained in:
Treehugger Robot 2019-02-13 21:53:26 +00:00 committed by Gerrit Code Review
commit 02e4b568dc
1 changed files with 2 additions and 7 deletions

View File

@ -225,14 +225,9 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
} }
if ctx.toolchain().Bionic() { if ctx.toolchain().Bionic() {
// Allow individual projects to opt out of libcrt,builtins // libclang_rt.builtins, libgcc and libatomic have to be last on the command line
// b/117565638
if !Bool(linker.Properties.No_libcrt) { if !Bool(linker.Properties.No_libcrt) {
// libclang_rt.builtins, libgcc and libatomic have to be last on the command line deps.LateStaticLibs = append(deps.LateStaticLibs, config.BuiltinsRuntimeLibrary(ctx.toolchain()))
// 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, "libatomic") deps.LateStaticLibs = append(deps.LateStaticLibs, "libatomic")