Merge "Apply system_shared_libs to all variants" am: 2e4c0eb90e

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1765126

Change-Id: I424b82244e59b467056ecf7c10850013d545fc1f
This commit is contained in:
Treehugger Robot
2021-07-22 18:28:57 +00:00
committed by Automerger Merge Worker

View File

@@ -15,9 +15,10 @@
package cc
import (
"fmt"
"android/soong/android"
"android/soong/cc/config"
"fmt"
"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
@@ -244,8 +245,7 @@ func (linker *baseLinker) overrideDefaultSharedLibraries(ctx BaseModuleContext)
if linker.Properties.System_shared_libs != nil && linker.Properties.Default_shared_libs != nil {
ctx.PropertyErrorf("system_shared_libs", "cannot be specified if default_shared_libs is also specified")
}
if ctx.toolchain().Bionic() && linker.Properties.System_shared_libs != nil {
// system_shared_libs is only honored when building against bionic.
if linker.Properties.System_shared_libs != nil {
return linker.Properties.System_shared_libs
}
return linker.Properties.Default_shared_libs