Use Config/DeviceConfig functions to access ProductVariables
An upcoming change will stop exporting ProductVariables from Config, so switch to using existing accessor functions, and add more when they're missing. Bug: 76168832 Test: out/soong/build.ninja is identical Change-Id: Ie0135bdbd2df3258ef3ddb53e5f8fc00aa9b97f7
This commit is contained in:
@@ -89,11 +89,7 @@ func makeVarsProvider(ctx android.MakeVarsContext) {
|
||||
ctx.Strict("GLOBAL_CLANG_CPPFLAGS_NO_OVERRIDE", "")
|
||||
ctx.Strict("NDK_PREBUILT_SHARED_LIBRARIES", strings.Join(ndkPrebuiltSharedLibs, " "))
|
||||
|
||||
if ctx.Config().ProductVariables.DeviceVndkVersion != nil {
|
||||
ctx.Strict("BOARD_VNDK_VERSION", *ctx.Config().ProductVariables.DeviceVndkVersion)
|
||||
} else {
|
||||
ctx.Strict("BOARD_VNDK_VERSION", "")
|
||||
}
|
||||
ctx.Strict("BOARD_VNDK_VERSION", ctx.DeviceConfig().VndkVersion())
|
||||
|
||||
ctx.Strict("VNDK_CORE_LIBRARIES", strings.Join(vndkCoreLibraries, " "))
|
||||
ctx.Strict("VNDK_SAMEPROCESS_LIBRARIES", strings.Join(vndkSpLibraries, " "))
|
||||
@@ -211,7 +207,7 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string,
|
||||
hod = "Device"
|
||||
}
|
||||
|
||||
if target.Os.Class == android.Host && Bool(ctx.Config().ProductVariables.HostStaticBinaries) {
|
||||
if target.Os.Class == android.Host && ctx.Config().HostStaticBinaries() {
|
||||
productExtraLdflags += "-static"
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user