Use SystemSharedLibs as StaticLibs for static executables
Shared libraries are ignored for static executables, treat SystemSharedLibs as StaticLibs to avoid every static executable having to list libc as a static dependency. Test: m checkbuild Change-Id: I02442a1a2a8d4164ec3dd389a16da2346e2d8751
This commit is contained in:
@@ -156,6 +156,10 @@ func (binary *binaryDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
||||
}
|
||||
}
|
||||
|
||||
if binary.static() {
|
||||
deps.StaticLibs = append(deps.StaticLibs, deps.SystemSharedLibs...)
|
||||
}
|
||||
|
||||
if ctx.toolchain().Bionic() {
|
||||
if binary.static() {
|
||||
if ctx.selectedStl() == "libc++_static" {
|
||||
|
Reference in New Issue
Block a user