From 7a7cf9759748deaa83ce87023e2100ad00519812 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 5 Dec 2016 18:47:39 -0800 Subject: [PATCH] Fix mac build Darwin doesn't support --start-group/--end-group, and groups libraries anyways. Test: m -j Change-Id: I0fdbe24973cad3cd84164cdfeced2507a4c6ee91 --- cc/builder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cc/builder.go b/cc/builder.go index d0b21edaf..c9a6722b1 100644 --- a/cc/builder.go +++ b/cc/builder.go @@ -466,11 +466,11 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext, } } - if flags.groupStaticLibs && len(staticLibs) > 0 { + if flags.groupStaticLibs && !ctx.Darwin() && len(staticLibs) > 0 { libFlagsList = append(libFlagsList, "-Wl,--start-group") } libFlagsList = append(libFlagsList, staticLibs.Strings()...) - if flags.groupStaticLibs && len(staticLibs) > 0 { + if flags.groupStaticLibs && !ctx.Darwin() && len(staticLibs) > 0 { libFlagsList = append(libFlagsList, "-Wl,--end-group") }