Merge "Fix libgcc/libatomic link order" into master-soong

This commit is contained in:
Dan Willemsen 2015-07-09 02:04:16 +00:00 committed by Gerrit Code Review
commit 3fde0c220a

View file

@ -302,6 +302,14 @@ func TransformObjToDynamicBinary(ctx common.AndroidModuleContext,
libFlagsList = append(libFlagsList, staticLibs...)
if groupLate && len(lateStaticLibs) > 0 {
libFlagsList = append(libFlagsList, "-Wl,--start-group")
}
libFlagsList = append(libFlagsList, lateStaticLibs...)
if groupLate && len(lateStaticLibs) > 0 {
libFlagsList = append(libFlagsList, "-Wl,--end-group")
}
for _, lib := range sharedLibs {
dir, file := filepath.Split(lib)
if !strings.HasPrefix(file, "lib") {
@ -315,14 +323,6 @@ func TransformObjToDynamicBinary(ctx common.AndroidModuleContext,
ldDirs = append(ldDirs, dir)
}
if groupLate && len(lateStaticLibs) > 0 {
libFlagsList = append(libFlagsList, "-Wl,--start-group")
}
libFlagsList = append(libFlagsList, lateStaticLibs...)
if groupLate && len(lateStaticLibs) > 0 {
libFlagsList = append(libFlagsList, "-Wl,--end-group")
}
deps = append(deps, ldCmd)
deps = append(deps, sharedLibs...)
deps = append(deps, staticLibs...)