From 1034786c379dcdc930c641ccbe8bd04936cce1f1 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Mon, 18 Jul 2016 15:54:54 -0700 Subject: [PATCH] Revert "Revert "Switch libcompiler_rt-extras to LateStaticLibs."" This reverts commit 15e4554049181d0dee583f3659dc6fd263c21435. Change-Id: Iff62dd9fd45746847440f50240c25d32747367df --- cc/builder.go | 4 ++-- cc/cc.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cc/builder.go b/cc/builder.go index 4efcc2779..49f887106 100644 --- a/cc/builder.go +++ b/cc/builder.go @@ -369,11 +369,11 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext, libFlagsList = append(libFlagsList, staticLibs.Strings()...) - if groupLate && len(lateStaticLibs) > 0 { + if groupLate && !ctx.Darwin() && len(lateStaticLibs) > 0 { libFlagsList = append(libFlagsList, "-Wl,--start-group") } libFlagsList = append(libFlagsList, lateStaticLibs.Strings()...) - if groupLate && len(lateStaticLibs) > 0 { + if groupLate && !ctx.Darwin() && len(lateStaticLibs) > 0 { libFlagsList = append(libFlagsList, "-Wl,--end-group") } diff --git a/cc/cc.go b/cc/cc.go index f8723bb13..89f40b347 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -1337,7 +1337,7 @@ func (linker *baseLinker) deps(ctx BaseModuleContext, deps Deps) Deps { deps.ReexportSharedLibHeaders = append(deps.ReexportSharedLibHeaders, linker.Properties.Export_shared_lib_headers...) if !ctx.sdk() && ctx.ModuleName() != "libcompiler_rt-extras" { - deps.StaticLibs = append(deps.StaticLibs, "libcompiler_rt-extras") + deps.LateStaticLibs = append(deps.LateStaticLibs, "libcompiler_rt-extras") } if ctx.Device() {