Merge "Support use_version_lib in cc_binary." am: d683fc45a3
am: fcb1eeb60e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2036969 Change-Id: I6213bf9a3798e26f0446743ac54dd0c60bb0c04f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
06253ff2b4
4 changed files with 14 additions and 6 deletions
|
@ -130,6 +130,7 @@ func TestBasicCcBinary(t *testing.T) {
|
|||
},
|
||||
sdk_version: "current",
|
||||
min_sdk_version: "29",
|
||||
use_version_lib: true,
|
||||
}
|
||||
`,
|
||||
targets: []testBazelTarget{
|
||||
|
@ -153,8 +154,9 @@ func TestBasicCcBinary(t *testing.T) {
|
|||
"keep_symbols_list": ["symbol"],
|
||||
"none": True,
|
||||
}`,
|
||||
"sdk_version": `"current"`,
|
||||
"min_sdk_version": `"29"`,
|
||||
"sdk_version": `"current"`,
|
||||
"min_sdk_version": `"29"`,
|
||||
"use_version_lib": `True`,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -117,6 +117,7 @@ cc_library {
|
|||
include_build_directory: false,
|
||||
sdk_version: "current",
|
||||
min_sdk_version: "29",
|
||||
use_version_lib: true,
|
||||
}
|
||||
`,
|
||||
expectedBazelTargets: makeCcLibraryTargets("foo-lib", attrNameToString{
|
||||
|
@ -142,8 +143,9 @@ cc_library {
|
|||
"//build/bazel/platforms/os:linux_bionic": ["bionic.cpp"],
|
||||
"//conditions:default": [],
|
||||
})`,
|
||||
"sdk_version": `"current"`,
|
||||
"min_sdk_version": `"29"`,
|
||||
"sdk_version": `"current"`,
|
||||
"min_sdk_version": `"29"`,
|
||||
"use_version_lib": `True`,
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
|
|
@ -615,6 +615,7 @@ func binaryBp2build(ctx android.TopDownMutatorContext, m *Module, typ string) {
|
|||
Linkopts: baseAttrs.linkopts,
|
||||
Link_crt: baseAttrs.linkCrt,
|
||||
Use_libcrt: baseAttrs.useLibcrt,
|
||||
Use_version_lib: baseAttrs.useVersionLib,
|
||||
Rtti: baseAttrs.rtti,
|
||||
Stl: baseAttrs.stl,
|
||||
Cpp_std: baseAttrs.cppStd,
|
||||
|
@ -665,8 +666,9 @@ type binaryAttributes struct {
|
|||
Linkopts bazel.StringListAttribute
|
||||
Additional_linker_inputs bazel.LabelListAttribute
|
||||
|
||||
Link_crt bazel.BoolAttribute
|
||||
Use_libcrt bazel.BoolAttribute
|
||||
Link_crt bazel.BoolAttribute
|
||||
Use_libcrt bazel.BoolAttribute
|
||||
Use_version_lib bazel.BoolAttribute
|
||||
|
||||
Rtti bazel.BoolAttribute
|
||||
Stl *string
|
||||
|
|
|
@ -352,6 +352,7 @@ func libraryBp2Build(ctx android.TopDownMutatorContext, m *Module) {
|
|||
Stl: compilerAttrs.stl,
|
||||
Cpp_std: compilerAttrs.cppStd,
|
||||
C_std: compilerAttrs.cStd,
|
||||
Use_version_lib: linkerAttrs.useVersionLib,
|
||||
|
||||
Features: linkerAttrs.features,
|
||||
}
|
||||
|
@ -374,6 +375,7 @@ func libraryBp2Build(ctx android.TopDownMutatorContext, m *Module) {
|
|||
Stl: compilerAttrs.stl,
|
||||
Cpp_std: compilerAttrs.cppStd,
|
||||
C_std: compilerAttrs.cStd,
|
||||
Use_version_lib: linkerAttrs.useVersionLib,
|
||||
|
||||
Additional_linker_inputs: linkerAttrs.additionalLinkerInputs,
|
||||
|
||||
|
|
Loading…
Reference in a new issue