Revert "Revert "Switch libcompiler_rt-extras to LateStaticLibs.""

This reverts commit 15e4554049181d0dee583f3659dc6fd263c21435.

Change-Id: Iff62dd9fd45746847440f50240c25d32747367df
diff --git a/cc/builder.go b/cc/builder.go
index 4efcc27..49f8871 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -369,11 +369,11 @@
 
 	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 f8723bb..89f40b3 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1337,7 +1337,7 @@
 	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() {