Merge changes from topic "aidl_interface_hdrs" into main am: 7db882793b
am: b3b682c911
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2734380 Change-Id: I25bcbf8f89cdfe7d8e0e41ab05312e7ac1c4cb6e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -35,7 +35,7 @@ func TestConvertAndroidLibrary(t *testing.T) {
|
|||||||
"res/res.png": "",
|
"res/res.png": "",
|
||||||
"manifest/AndroidManifest.xml": "",
|
"manifest/AndroidManifest.xml": "",
|
||||||
},
|
},
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("android_library", "static_lib_dep") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("android_library", "static_lib_dep") + `
|
||||||
android_library {
|
android_library {
|
||||||
name: "TestLib",
|
name: "TestLib",
|
||||||
srcs: ["lib.java"],
|
srcs: ["lib.java"],
|
||||||
@@ -82,7 +82,7 @@ func TestConvertAndroidLibraryWithNoSources(t *testing.T) {
|
|||||||
"res/res.png": "",
|
"res/res.png": "",
|
||||||
"AndroidManifest.xml": "",
|
"AndroidManifest.xml": "",
|
||||||
},
|
},
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("android_library", "lib_dep") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("android_library", "lib_dep") + `
|
||||||
android_library {
|
android_library {
|
||||||
name: "TestLib",
|
name: "TestLib",
|
||||||
srcs: [],
|
srcs: [],
|
||||||
@@ -113,8 +113,8 @@ func TestConvertAndroidLibraryImport(t *testing.T) {
|
|||||||
// Bazel's aar_import can only export *_import targets, so we expect
|
// Bazel's aar_import can only export *_import targets, so we expect
|
||||||
// only "static_import_dep" in exports, but both "static_lib_dep" and
|
// only "static_import_dep" in exports, but both "static_lib_dep" and
|
||||||
// "static_import_dep" in deps
|
// "static_import_dep" in deps
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("android_library", "static_lib_dep") +
|
Blueprint: SimpleModuleDoNotConvertBp2build("android_library", "static_lib_dep") +
|
||||||
simpleModuleDoNotConvertBp2build("android_library_import", "static_import_dep") + `
|
SimpleModuleDoNotConvertBp2build("android_library_import", "static_import_dep") + `
|
||||||
android_library_import {
|
android_library_import {
|
||||||
name: "TestImport",
|
name: "TestImport",
|
||||||
aars: ["import.aar"],
|
aars: ["import.aar"],
|
||||||
|
@@ -78,7 +78,7 @@ func TestAndroidAppAllSupportedFields(t *testing.T) {
|
|||||||
"manifest/AndroidManifest.xml": "",
|
"manifest/AndroidManifest.xml": "",
|
||||||
"assets_/asset.png": "",
|
"assets_/asset.png": "",
|
||||||
},
|
},
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("android_app", "static_lib_dep") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("android_app", "static_lib_dep") + `
|
||||||
android_app {
|
android_app {
|
||||||
name: "TestApp",
|
name: "TestApp",
|
||||||
srcs: ["app.java"],
|
srcs: ["app.java"],
|
||||||
@@ -177,7 +177,7 @@ func TestAndroidAppCertIsModule(t *testing.T) {
|
|||||||
ModuleTypeUnderTest: "android_app",
|
ModuleTypeUnderTest: "android_app",
|
||||||
ModuleTypeUnderTestFactory: java.AndroidAppFactory,
|
ModuleTypeUnderTestFactory: java.AndroidAppFactory,
|
||||||
Filesystem: map[string]string{},
|
Filesystem: map[string]string{},
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("filegroup", "foocert") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("filegroup", "foocert") + `
|
||||||
android_app {
|
android_app {
|
||||||
name: "TestApp",
|
name: "TestApp",
|
||||||
certificate: ":foocert",
|
certificate: ":foocert",
|
||||||
@@ -262,7 +262,7 @@ func TestAndroidAppLibs(t *testing.T) {
|
|||||||
ModuleTypeUnderTest: "android_app",
|
ModuleTypeUnderTest: "android_app",
|
||||||
ModuleTypeUnderTestFactory: java.AndroidAppFactory,
|
ModuleTypeUnderTestFactory: java.AndroidAppFactory,
|
||||||
Filesystem: map[string]string{},
|
Filesystem: map[string]string{},
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("java_library", "barLib") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("java_library", "barLib") + `
|
||||||
android_app {
|
android_app {
|
||||||
name: "foo",
|
name: "foo",
|
||||||
libs: ["barLib"],
|
libs: ["barLib"],
|
||||||
@@ -291,8 +291,8 @@ func TestAndroidAppKotlinSrcs(t *testing.T) {
|
|||||||
Filesystem: map[string]string{
|
Filesystem: map[string]string{
|
||||||
"res/res.png": "",
|
"res/res.png": "",
|
||||||
},
|
},
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("filegroup", "foocert") +
|
Blueprint: SimpleModuleDoNotConvertBp2build("filegroup", "foocert") +
|
||||||
simpleModuleDoNotConvertBp2build("java_library", "barLib") + `
|
SimpleModuleDoNotConvertBp2build("java_library", "barLib") + `
|
||||||
android_app {
|
android_app {
|
||||||
name: "foo",
|
name: "foo",
|
||||||
srcs: ["a.java", "b.kt"],
|
srcs: ["a.java", "b.kt"],
|
||||||
|
@@ -1263,7 +1263,7 @@ apex {
|
|||||||
file_contexts: ":com.android.apogee-file_contexts",
|
file_contexts: ":com.android.apogee-file_contexts",
|
||||||
certificate: ":com.android.apogee.certificate",
|
certificate: ":com.android.apogee.certificate",
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("filegroup", "com.android.apogee-file_contexts"),
|
` + SimpleModuleDoNotConvertBp2build("filegroup", "com.android.apogee-file_contexts"),
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
|
MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
|
||||||
"certificate": `":com.android.apogee.certificate"`,
|
"certificate": `":com.android.apogee.certificate"`,
|
||||||
@@ -1299,7 +1299,7 @@ apex {
|
|||||||
binaries: ["bar"],
|
binaries: ["bar"],
|
||||||
native_shared_libs: ["foo"],
|
native_shared_libs: ["foo"],
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("filegroup", "myapex-file_contexts"),
|
` + SimpleModuleDoNotConvertBp2build("filegroup", "myapex-file_contexts"),
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
MakeBazelTarget("cc_binary", "bar", AttrNameToString{
|
MakeBazelTarget("cc_binary", "bar", AttrNameToString{
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
@@ -1356,7 +1356,7 @@ apex {
|
|||||||
file_contexts: ":com.android.apogee-file_contexts",
|
file_contexts: ":com.android.apogee-file_contexts",
|
||||||
certificate: "com.android.apogee.certificate",
|
certificate: "com.android.apogee.certificate",
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("filegroup", "com.android.apogee-file_contexts"),
|
` + SimpleModuleDoNotConvertBp2build("filegroup", "com.android.apogee-file_contexts"),
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
|
MakeBazelTarget("apex", "com.android.apogee", AttrNameToString{
|
||||||
"certificate_name": `"com.android.apogee.certificate"`,
|
"certificate_name": `"com.android.apogee.certificate"`,
|
||||||
|
@@ -89,8 +89,8 @@ apex_key {
|
|||||||
public_key: ":com.android.apogee.avbpubkey",
|
public_key: ":com.android.apogee.avbpubkey",
|
||||||
private_key: ":com.android.apogee.pem",
|
private_key: ":com.android.apogee.pem",
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("filegroup", "com.android.apogee.avbpubkey") +
|
` + SimpleModuleDoNotConvertBp2build("filegroup", "com.android.apogee.avbpubkey") +
|
||||||
simpleModuleDoNotConvertBp2build("filegroup", "com.android.apogee.pem"),
|
SimpleModuleDoNotConvertBp2build("filegroup", "com.android.apogee.pem"),
|
||||||
ExpectedBazelTargets: []string{MakeBazelTargetNoRestrictions("apex_key", "com.android.apogee.key", AttrNameToString{
|
ExpectedBazelTargets: []string{MakeBazelTargetNoRestrictions("apex_key", "com.android.apogee.key", AttrNameToString{
|
||||||
"private_key": `":com.android.apogee.pem"`,
|
"private_key": `":com.android.apogee.pem"`,
|
||||||
"public_key": `":com.android.apogee.avbpubkey"`,
|
"public_key": `":com.android.apogee.avbpubkey"`,
|
||||||
|
@@ -1743,7 +1743,7 @@ func TestCommonBp2BuildModuleAttrs(t *testing.T) {
|
|||||||
Description: "Required into data test",
|
Description: "Required into data test",
|
||||||
ModuleTypeUnderTest: "filegroup",
|
ModuleTypeUnderTest: "filegroup",
|
||||||
ModuleTypeUnderTestFactory: android.FileGroupFactory,
|
ModuleTypeUnderTestFactory: android.FileGroupFactory,
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("filegroup", "reqd") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("filegroup", "reqd") + `
|
||||||
filegroup {
|
filegroup {
|
||||||
name: "fg_foo",
|
name: "fg_foo",
|
||||||
required: ["reqd"],
|
required: ["reqd"],
|
||||||
@@ -1759,7 +1759,7 @@ filegroup {
|
|||||||
Description: "Required into data test, cyclic self reference is filtered out",
|
Description: "Required into data test, cyclic self reference is filtered out",
|
||||||
ModuleTypeUnderTest: "filegroup",
|
ModuleTypeUnderTest: "filegroup",
|
||||||
ModuleTypeUnderTestFactory: android.FileGroupFactory,
|
ModuleTypeUnderTestFactory: android.FileGroupFactory,
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("filegroup", "reqd") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("filegroup", "reqd") + `
|
||||||
filegroup {
|
filegroup {
|
||||||
name: "fg_foo",
|
name: "fg_foo",
|
||||||
required: ["reqd", "fg_foo"],
|
required: ["reqd", "fg_foo"],
|
||||||
@@ -1775,8 +1775,8 @@ filegroup {
|
|||||||
Description: "Required via arch into data test",
|
Description: "Required via arch into data test",
|
||||||
ModuleTypeUnderTest: "python_library",
|
ModuleTypeUnderTest: "python_library",
|
||||||
ModuleTypeUnderTestFactory: python.PythonLibraryFactory,
|
ModuleTypeUnderTestFactory: python.PythonLibraryFactory,
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("python_library", "reqdx86") +
|
Blueprint: SimpleModuleDoNotConvertBp2build("python_library", "reqdx86") +
|
||||||
simpleModuleDoNotConvertBp2build("python_library", "reqdarm") + `
|
SimpleModuleDoNotConvertBp2build("python_library", "reqdarm") + `
|
||||||
python_library {
|
python_library {
|
||||||
name: "fg_foo",
|
name: "fg_foo",
|
||||||
arch: {
|
arch: {
|
||||||
@@ -1809,7 +1809,7 @@ python_library {
|
|||||||
"data.bin": "",
|
"data.bin": "",
|
||||||
"src.py": "",
|
"src.py": "",
|
||||||
},
|
},
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("python_library", "reqd") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("python_library", "reqd") + `
|
||||||
python_library {
|
python_library {
|
||||||
name: "fg_foo",
|
name: "fg_foo",
|
||||||
data: ["data.bin"],
|
data: ["data.bin"],
|
||||||
@@ -1831,7 +1831,7 @@ python_library {
|
|||||||
Description: "All props-to-attrs at once together test",
|
Description: "All props-to-attrs at once together test",
|
||||||
ModuleTypeUnderTest: "filegroup",
|
ModuleTypeUnderTest: "filegroup",
|
||||||
ModuleTypeUnderTestFactory: android.FileGroupFactory,
|
ModuleTypeUnderTestFactory: android.FileGroupFactory,
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("filegroup", "reqd") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("filegroup", "reqd") + `
|
||||||
filegroup {
|
filegroup {
|
||||||
name: "fg_foo",
|
name: "fg_foo",
|
||||||
required: ["reqd"],
|
required: ["reqd"],
|
||||||
|
@@ -276,7 +276,7 @@ func TestCcBinarySplitSrcsByLang(t *testing.T) {
|
|||||||
],
|
],
|
||||||
include_build_directory: false,
|
include_build_directory: false,
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("filegroup", "fg_foo"),
|
` + SimpleModuleDoNotConvertBp2build("filegroup", "fg_foo"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_binary", "foo", AttrNameToString{
|
{"cc_binary", "foo", AttrNameToString{
|
||||||
"srcs": `[
|
"srcs": `[
|
||||||
@@ -326,12 +326,12 @@ genrule {
|
|||||||
export_generated_headers: ["export_generated_hdr"],
|
export_generated_headers: ["export_generated_hdr"],
|
||||||
}
|
}
|
||||||
` +
|
` +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "static_dep") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "static_dep") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "implementation_static_dep") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "implementation_static_dep") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "whole_static_dep") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "whole_static_dep") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "not_explicitly_exported_whole_static_dep") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "not_explicitly_exported_whole_static_dep") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "shared_dep") +
|
SimpleModuleDoNotConvertBp2build("cc_library", "shared_dep") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "implementation_shared_dep"),
|
SimpleModuleDoNotConvertBp2build("cc_library", "implementation_shared_dep"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_binary", "foo", AttrNameToString{
|
{"cc_binary", "foo", AttrNameToString{
|
||||||
"deps": `[
|
"deps": `[
|
||||||
@@ -1226,7 +1226,7 @@ func TestCcBinaryStatic_SystemSharedLibUsedAsDep(t *testing.T) {
|
|||||||
runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
|
runCcBinaryTestCase(t, ccBinaryBp2buildTestCase{
|
||||||
description: "cc_library_static system_shared_lib empty for linux_bionic variant",
|
description: "cc_library_static system_shared_lib empty for linux_bionic variant",
|
||||||
blueprint: soongCcLibraryStaticPreamble +
|
blueprint: soongCcLibraryStaticPreamble +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "libc") + `
|
SimpleModuleDoNotConvertBp2build("cc_library", "libc") + `
|
||||||
|
|
||||||
cc_library {
|
cc_library {
|
||||||
name: "libm",
|
name: "libm",
|
||||||
|
@@ -94,7 +94,7 @@ func TestCcLibrarySimple(t *testing.T) {
|
|||||||
"foo-dir/a.h": "",
|
"foo-dir/a.h": "",
|
||||||
},
|
},
|
||||||
Blueprint: soongCcLibraryPreamble +
|
Blueprint: soongCcLibraryPreamble +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_headers", "some-headers") + `
|
SimpleModuleDoNotConvertBp2build("cc_library_headers", "some-headers") + `
|
||||||
cc_library {
|
cc_library {
|
||||||
name: "foo-lib",
|
name: "foo-lib",
|
||||||
srcs: ["impl.cpp"],
|
srcs: ["impl.cpp"],
|
||||||
@@ -176,7 +176,7 @@ func TestCcLibraryTrimmedLdAndroid(t *testing.T) {
|
|||||||
"linker_cfi.h": "",
|
"linker_cfi.h": "",
|
||||||
},
|
},
|
||||||
Blueprint: soongCcLibraryPreamble +
|
Blueprint: soongCcLibraryPreamble +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_headers", "libc_headers") + `
|
SimpleModuleDoNotConvertBp2build("cc_library_headers", "libc_headers") + `
|
||||||
cc_library {
|
cc_library {
|
||||||
name: "fake-ld-android",
|
name: "fake-ld-android",
|
||||||
srcs: ["ld_android.cpp"],
|
srcs: ["ld_android.cpp"],
|
||||||
@@ -457,24 +457,24 @@ cc_library {
|
|||||||
},
|
},
|
||||||
include_build_directory: false,
|
include_build_directory: false,
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_static", "static_dep_for_shared") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library_static", "static_dep_for_shared") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "implementation_static_dep_for_shared") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "implementation_static_dep_for_shared") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "static_dep_for_static") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "static_dep_for_static") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "implementation_static_dep_for_static") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "implementation_static_dep_for_static") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "static_dep_for_both") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "static_dep_for_both") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "implementation_static_dep_for_both") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "implementation_static_dep_for_both") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "whole_static_dep_for_shared") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "whole_static_dep_for_shared") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "not_explicitly_exported_whole_static_dep_for_shared") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "not_explicitly_exported_whole_static_dep_for_shared") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "whole_static_dep_for_static") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "whole_static_dep_for_static") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "not_explicitly_exported_whole_static_dep_for_static") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "not_explicitly_exported_whole_static_dep_for_static") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "whole_static_dep_for_both") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "whole_static_dep_for_both") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "not_explicitly_exported_whole_static_dep_for_both") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "not_explicitly_exported_whole_static_dep_for_both") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "shared_dep_for_shared") +
|
SimpleModuleDoNotConvertBp2build("cc_library", "shared_dep_for_shared") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "implementation_shared_dep_for_shared") +
|
SimpleModuleDoNotConvertBp2build("cc_library", "implementation_shared_dep_for_shared") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "shared_dep_for_static") +
|
SimpleModuleDoNotConvertBp2build("cc_library", "shared_dep_for_static") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "implementation_shared_dep_for_static") +
|
SimpleModuleDoNotConvertBp2build("cc_library", "implementation_shared_dep_for_static") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "shared_dep_for_both") +
|
SimpleModuleDoNotConvertBp2build("cc_library", "shared_dep_for_both") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "implementation_shared_dep_for_both"),
|
SimpleModuleDoNotConvertBp2build("cc_library", "implementation_shared_dep_for_both"),
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
MakeBazelTarget("cc_library_static", "a_bp2build_cc_library_static", AttrNameToString{
|
MakeBazelTarget("cc_library_static", "a_bp2build_cc_library_static", AttrNameToString{
|
||||||
"copts": `[
|
"copts": `[
|
||||||
@@ -2549,10 +2549,10 @@ func TestCcLibraryProtoFilegroups(t *testing.T) {
|
|||||||
ModuleTypeUnderTest: "cc_library",
|
ModuleTypeUnderTest: "cc_library",
|
||||||
ModuleTypeUnderTestFactory: cc.LibraryFactory,
|
ModuleTypeUnderTestFactory: cc.LibraryFactory,
|
||||||
Blueprint: soongCcProtoPreamble +
|
Blueprint: soongCcProtoPreamble +
|
||||||
simpleModuleDoNotConvertBp2build("filegroup", "a_fg_proto") +
|
SimpleModuleDoNotConvertBp2build("filegroup", "a_fg_proto") +
|
||||||
simpleModuleDoNotConvertBp2build("filegroup", "b_protos") +
|
SimpleModuleDoNotConvertBp2build("filegroup", "b_protos") +
|
||||||
simpleModuleDoNotConvertBp2build("filegroup", "c-proto-srcs") +
|
SimpleModuleDoNotConvertBp2build("filegroup", "c-proto-srcs") +
|
||||||
simpleModuleDoNotConvertBp2build("filegroup", "proto-srcs-d") + `
|
SimpleModuleDoNotConvertBp2build("filegroup", "proto-srcs-d") + `
|
||||||
cc_library {
|
cc_library {
|
||||||
name: "a",
|
name: "a",
|
||||||
srcs: [":a_fg_proto"],
|
srcs: [":a_fg_proto"],
|
||||||
@@ -2882,7 +2882,7 @@ func TestCcLibraryExcludesLibsHost(t *testing.T) {
|
|||||||
Filesystem: map[string]string{
|
Filesystem: map[string]string{
|
||||||
"bar.map.txt": "",
|
"bar.map.txt": "",
|
||||||
},
|
},
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("cc_library", "bazlib") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("cc_library", "bazlib") + `
|
||||||
cc_library {
|
cc_library {
|
||||||
name: "quxlib",
|
name: "quxlib",
|
||||||
stubs: { symbol_file: "bar.map.txt", versions: ["current"] },
|
stubs: { symbol_file: "bar.map.txt", versions: ["current"] },
|
||||||
@@ -3537,10 +3537,10 @@ cc_library_static {
|
|||||||
"baz-shared",
|
"baz-shared",
|
||||||
],
|
],
|
||||||
}` +
|
}` +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "bar-static") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "bar-static") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "baz-static") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "baz-static") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "bar-shared") +
|
SimpleModuleDoNotConvertBp2build("cc_library", "bar-shared") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "baz-shared"),
|
SimpleModuleDoNotConvertBp2build("cc_library", "baz-shared"),
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
MakeBazelTarget("aidl_library", "foo_aidl_library", AttrNameToString{
|
MakeBazelTarget("aidl_library", "foo_aidl_library", AttrNameToString{
|
||||||
"srcs": `["Foo.aidl"]`,
|
"srcs": `["Foo.aidl"]`,
|
||||||
@@ -4744,7 +4744,7 @@ cc_library_static {
|
|||||||
canonical_path_from_root: true,
|
canonical_path_from_root: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite"),
|
` + SimpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite"),
|
||||||
Filesystem: map[string]string{
|
Filesystem: map[string]string{
|
||||||
"bar/Android.bp": "",
|
"bar/Android.bp": "",
|
||||||
"baz/subbaz/Android.bp": "",
|
"baz/subbaz/Android.bp": "",
|
||||||
@@ -4812,7 +4812,7 @@ cc_library_static {
|
|||||||
canonical_path_from_root: false,
|
canonical_path_from_root: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite"),
|
` + SimpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite"),
|
||||||
Filesystem: map[string]string{
|
Filesystem: map[string]string{
|
||||||
"bar/Android.bp": "",
|
"bar/Android.bp": "",
|
||||||
"baz/subbaz/Android.bp": "",
|
"baz/subbaz/Android.bp": "",
|
||||||
@@ -4882,7 +4882,7 @@ cc_library_static {
|
|||||||
include_dirs: ["bar"],
|
include_dirs: ["bar"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite"),
|
` + SimpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite"),
|
||||||
Filesystem: map[string]string{
|
Filesystem: map[string]string{
|
||||||
"bar/Android.bp": "",
|
"bar/Android.bp": "",
|
||||||
"bar/bar.proto": "",
|
"bar/bar.proto": "",
|
||||||
@@ -4953,7 +4953,7 @@ cc_library_static {
|
|||||||
include_dirs: ["baz"],
|
include_dirs: ["baz"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite"),
|
` + SimpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite"),
|
||||||
Filesystem: map[string]string{
|
Filesystem: map[string]string{
|
||||||
"bar/Android.bp": "", // package boundary
|
"bar/Android.bp": "", // package boundary
|
||||||
"baz/Android.bp": "",
|
"baz/Android.bp": "",
|
||||||
@@ -4988,7 +4988,7 @@ func TestProtoLocalIncludeDirs(t *testing.T) {
|
|||||||
Description: "cc_library depends on .proto files using proto.local_include_dirs",
|
Description: "cc_library depends on .proto files using proto.local_include_dirs",
|
||||||
ModuleTypeUnderTest: "cc_library",
|
ModuleTypeUnderTest: "cc_library",
|
||||||
ModuleTypeUnderTestFactory: cc.LibraryFactory,
|
ModuleTypeUnderTestFactory: cc.LibraryFactory,
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite"),
|
Blueprint: SimpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite"),
|
||||||
Filesystem: map[string]string{
|
Filesystem: map[string]string{
|
||||||
"foo/Android.bp": `cc_library_static {
|
"foo/Android.bp": `cc_library_static {
|
||||||
name: "foo",
|
name: "foo",
|
||||||
@@ -5045,7 +5045,7 @@ func TestProtoLibraryForIncludeDirsIsOsAgnostic(t *testing.T) {
|
|||||||
Description: "proto_library generated for proto.include_dirs is compatible for all axes",
|
Description: "proto_library generated for proto.include_dirs is compatible for all axes",
|
||||||
ModuleTypeUnderTest: "cc_library",
|
ModuleTypeUnderTest: "cc_library",
|
||||||
ModuleTypeUnderTestFactory: cc.LibraryFactory,
|
ModuleTypeUnderTestFactory: cc.LibraryFactory,
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite") + `
|
||||||
cc_library {
|
cc_library {
|
||||||
name: "foo_device",
|
name: "foo_device",
|
||||||
device_supported: true, // this is the default behavior, but added explicitly here for illustration
|
device_supported: true, // this is the default behavior, but added explicitly here for illustration
|
||||||
|
@@ -340,7 +340,7 @@ cc_library_headers {
|
|||||||
static_libs: ["foo_export", "foo_no_reexport"],
|
static_libs: ["foo_export", "foo_no_reexport"],
|
||||||
bazel_module: { bp2build_available: true },
|
bazel_module: { bp2build_available: true },
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_headers", "foo_export"),
|
` + SimpleModuleDoNotConvertBp2build("cc_library_headers", "foo_export"),
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
|
MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
|
||||||
"deps": `[":foo_export"]`,
|
"deps": `[":foo_export"]`,
|
||||||
@@ -362,7 +362,7 @@ cc_library_headers {
|
|||||||
shared_libs: ["foo_export", "foo_no_reexport"],
|
shared_libs: ["foo_export", "foo_no_reexport"],
|
||||||
bazel_module: { bp2build_available: true },
|
bazel_module: { bp2build_available: true },
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_headers", "foo_export"),
|
` + SimpleModuleDoNotConvertBp2build("cc_library_headers", "foo_export"),
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
|
MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
|
||||||
"deps": `[":foo_export"]`,
|
"deps": `[":foo_export"]`,
|
||||||
@@ -384,7 +384,7 @@ cc_library_headers {
|
|||||||
header_libs: ["foo_export", "foo_no_reexport"],
|
header_libs: ["foo_export", "foo_no_reexport"],
|
||||||
bazel_module: { bp2build_available: true },
|
bazel_module: { bp2build_available: true },
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_headers", "foo_export"),
|
` + SimpleModuleDoNotConvertBp2build("cc_library_headers", "foo_export"),
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
|
MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
|
||||||
"deps": `[":foo_export"]`,
|
"deps": `[":foo_export"]`,
|
||||||
@@ -405,7 +405,7 @@ cc_library_headers {
|
|||||||
whole_static_libs: ["foo_export"],
|
whole_static_libs: ["foo_export"],
|
||||||
bazel_module: { bp2build_available: true },
|
bazel_module: { bp2build_available: true },
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_headers", "foo_export"),
|
` + SimpleModuleDoNotConvertBp2build("cc_library_headers", "foo_export"),
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
|
MakeBazelTarget("cc_library_headers", "foo_headers", AttrNameToString{
|
||||||
"deps": `[":foo_export"]`,
|
"deps": `[":foo_export"]`,
|
||||||
|
@@ -1045,17 +1045,17 @@ func TestCcLibraryStaticArchSrcsExcludeSrcsGeneratedFiles(t *testing.T) {
|
|||||||
"for-x86.cpp": "",
|
"for-x86.cpp": "",
|
||||||
"not-for-x86.cpp": "",
|
"not-for-x86.cpp": "",
|
||||||
"not-for-everything.cpp": "",
|
"not-for-everything.cpp": "",
|
||||||
"dep/Android.bp": simpleModuleDoNotConvertBp2build("genrule", "generated_src_other_pkg") +
|
"dep/Android.bp": SimpleModuleDoNotConvertBp2build("genrule", "generated_src_other_pkg") +
|
||||||
simpleModuleDoNotConvertBp2build("genrule", "generated_hdr_other_pkg") +
|
SimpleModuleDoNotConvertBp2build("genrule", "generated_hdr_other_pkg") +
|
||||||
simpleModuleDoNotConvertBp2build("genrule", "generated_src_other_pkg_x86") +
|
SimpleModuleDoNotConvertBp2build("genrule", "generated_src_other_pkg_x86") +
|
||||||
simpleModuleDoNotConvertBp2build("genrule", "generated_hdr_other_pkg_x86") +
|
SimpleModuleDoNotConvertBp2build("genrule", "generated_hdr_other_pkg_x86") +
|
||||||
simpleModuleDoNotConvertBp2build("genrule", "generated_hdr_other_pkg_android"),
|
SimpleModuleDoNotConvertBp2build("genrule", "generated_hdr_other_pkg_android"),
|
||||||
},
|
},
|
||||||
Blueprint: soongCcLibraryStaticPreamble +
|
Blueprint: soongCcLibraryStaticPreamble +
|
||||||
simpleModuleDoNotConvertBp2build("genrule", "generated_src") +
|
SimpleModuleDoNotConvertBp2build("genrule", "generated_src") +
|
||||||
simpleModuleDoNotConvertBp2build("genrule", "generated_src_not_x86") +
|
SimpleModuleDoNotConvertBp2build("genrule", "generated_src_not_x86") +
|
||||||
simpleModuleDoNotConvertBp2build("genrule", "generated_src_android") +
|
SimpleModuleDoNotConvertBp2build("genrule", "generated_src_android") +
|
||||||
simpleModuleDoNotConvertBp2build("genrule", "generated_hdr") + `
|
SimpleModuleDoNotConvertBp2build("genrule", "generated_hdr") + `
|
||||||
cc_library_static {
|
cc_library_static {
|
||||||
name: "foo_static",
|
name: "foo_static",
|
||||||
srcs: ["common.cpp", "not-for-*.cpp"],
|
srcs: ["common.cpp", "not-for-*.cpp"],
|
||||||
@@ -1460,7 +1460,7 @@ func TestStaticLibrary_SystemSharedLibsBionic(t *testing.T) {
|
|||||||
runCcLibraryStaticTestCase(t, Bp2buildTestCase{
|
runCcLibraryStaticTestCase(t, Bp2buildTestCase{
|
||||||
Description: "cc_library_static system_shared_libs set for bionic variant",
|
Description: "cc_library_static system_shared_libs set for bionic variant",
|
||||||
Blueprint: soongCcLibraryStaticPreamble +
|
Blueprint: soongCcLibraryStaticPreamble +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "libc") + `
|
SimpleModuleDoNotConvertBp2build("cc_library", "libc") + `
|
||||||
cc_library {
|
cc_library {
|
||||||
name: "libc_musl",
|
name: "libc_musl",
|
||||||
bazel_module: { bp2build_available: false },
|
bazel_module: { bp2build_available: false },
|
||||||
@@ -1493,8 +1493,8 @@ func TestStaticLibrary_SystemSharedLibsLinuxRootAndLinuxBionic(t *testing.T) {
|
|||||||
runCcLibraryStaticTestCase(t, Bp2buildTestCase{
|
runCcLibraryStaticTestCase(t, Bp2buildTestCase{
|
||||||
Description: "cc_library_static system_shared_libs set for root and linux_bionic variant",
|
Description: "cc_library_static system_shared_libs set for root and linux_bionic variant",
|
||||||
Blueprint: soongCcLibraryStaticPreamble +
|
Blueprint: soongCcLibraryStaticPreamble +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "libc") +
|
SimpleModuleDoNotConvertBp2build("cc_library", "libc") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "libm") + `
|
SimpleModuleDoNotConvertBp2build("cc_library", "libm") + `
|
||||||
cc_library {
|
cc_library {
|
||||||
name: "libc_musl",
|
name: "libc_musl",
|
||||||
bazel_module: { bp2build_available: false },
|
bazel_module: { bp2build_available: false },
|
||||||
@@ -1527,7 +1527,7 @@ func TestCcLibrarystatic_SystemSharedLibUsedAsDep(t *testing.T) {
|
|||||||
runCcLibraryStaticTestCase(t, Bp2buildTestCase{
|
runCcLibraryStaticTestCase(t, Bp2buildTestCase{
|
||||||
Description: "cc_library_static system_shared_lib empty for linux_bionic variant",
|
Description: "cc_library_static system_shared_lib empty for linux_bionic variant",
|
||||||
Blueprint: soongCcLibraryStaticPreamble +
|
Blueprint: soongCcLibraryStaticPreamble +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "libc") + `
|
SimpleModuleDoNotConvertBp2build("cc_library", "libc") + `
|
||||||
|
|
||||||
cc_library {
|
cc_library {
|
||||||
name: "libm",
|
name: "libm",
|
||||||
@@ -2269,7 +2269,7 @@ genrule {
|
|||||||
name: "myprotogen",
|
name: "myprotogen",
|
||||||
out: ["myproto.proto"],
|
out: ["myproto.proto"],
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite"),
|
` + SimpleModuleDoNotConvertBp2build("cc_library", "libprotobuf-cpp-lite"),
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
MakeBazelTarget("cc_library_static", "mylib", AttrNameToString{
|
MakeBazelTarget("cc_library_static", "mylib", AttrNameToString{
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
|
@@ -89,14 +89,14 @@ cc_test_library {
|
|||||||
host_supported: true,
|
host_supported: true,
|
||||||
include_build_directory: false,
|
include_build_directory: false,
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library", "foolib") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library", "foolib") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "hostlib") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "hostlib") +
|
||||||
simpleModuleDoNotConvertBp2build("genrule", "data_mod") +
|
SimpleModuleDoNotConvertBp2build("genrule", "data_mod") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_binary", "cc_bin") +
|
SimpleModuleDoNotConvertBp2build("cc_binary", "cc_bin") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "cc_lib") +
|
SimpleModuleDoNotConvertBp2build("cc_library", "cc_lib") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_test_library", "cc_test_lib2") +
|
SimpleModuleDoNotConvertBp2build("cc_test_library", "cc_test_lib2") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") +
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"),
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_library_shared", "cc_test_lib1", AttrNameToString{}},
|
{"cc_library_shared", "cc_test_lib1", AttrNameToString{}},
|
||||||
{"cc_library_static", "cc_test_lib1_bp2build_cc_library_static", AttrNameToString{}},
|
{"cc_library_static", "cc_test_lib1_bp2build_cc_library_static", AttrNameToString{}},
|
||||||
@@ -196,8 +196,8 @@ cc_test {
|
|||||||
srcs: ["test.cpp"],
|
srcs: ["test.cpp"],
|
||||||
test_options: { tags: ["no-remote"] },
|
test_options: { tags: ["no-remote"] },
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"),
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_test", "mytest", AttrNameToString{
|
{"cc_test", "mytest", AttrNameToString{
|
||||||
"tags": `["no-remote"]`,
|
"tags": `["no-remote"]`,
|
||||||
@@ -236,8 +236,8 @@ cc_test {
|
|||||||
srcs: ["test.cpp"],
|
srcs: ["test.cpp"],
|
||||||
test_config: "test_config.xml",
|
test_config: "test_config.xml",
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"),
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_test", "mytest", AttrNameToString{
|
{"cc_test", "mytest", AttrNameToString{
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
@@ -274,8 +274,8 @@ cc_test {
|
|||||||
name: "mytest",
|
name: "mytest",
|
||||||
srcs: ["test.cpp"],
|
srcs: ["test.cpp"],
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"),
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_test", "mytest", AttrNameToString{
|
{"cc_test", "mytest", AttrNameToString{
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
@@ -315,8 +315,8 @@ cc_test {
|
|||||||
auto_gen_config: true,
|
auto_gen_config: true,
|
||||||
isolated: true,
|
isolated: true,
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "liblog"),
|
SimpleModuleDoNotConvertBp2build("cc_library", "liblog"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_test", "mytest", AttrNameToString{
|
{"cc_test", "mytest", AttrNameToString{
|
||||||
"auto_generate_test_config": "True",
|
"auto_generate_test_config": "True",
|
||||||
@@ -354,8 +354,8 @@ cc_test {
|
|||||||
srcs: ["test.cpp"],
|
srcs: ["test.cpp"],
|
||||||
static_libs: ["libgtest"],
|
static_libs: ["libgtest"],
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"),
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_test", "mytest", AttrNameToString{
|
{"cc_test", "mytest", AttrNameToString{
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
@@ -389,8 +389,8 @@ cc_test {
|
|||||||
srcs: ["test.cpp"],
|
srcs: ["test.cpp"],
|
||||||
isolated: true,
|
isolated: true,
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "liblog"),
|
SimpleModuleDoNotConvertBp2build("cc_library", "liblog"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_test", "mytest", AttrNameToString{
|
{"cc_test", "mytest", AttrNameToString{
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
@@ -425,8 +425,8 @@ cc_test {
|
|||||||
name: "mytest_with_no_gtest",
|
name: "mytest_with_no_gtest",
|
||||||
gtest: false,
|
gtest: false,
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"),
|
SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_test", "mytest_with_gtest", AttrNameToString{
|
{"cc_test", "mytest_with_gtest", AttrNameToString{
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
@@ -477,8 +477,8 @@ cc_test {
|
|||||||
memtag_heap: false,
|
memtag_heap: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "liblog"),
|
SimpleModuleDoNotConvertBp2build("cc_library", "liblog"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_test", "mytest", AttrNameToString{
|
{"cc_test", "mytest", AttrNameToString{
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
@@ -513,8 +513,8 @@ cc_test {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "liblog"),
|
SimpleModuleDoNotConvertBp2build("cc_library", "liblog"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_test", "mytest", AttrNameToString{
|
{"cc_test", "mytest", AttrNameToString{
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
@@ -549,8 +549,8 @@ cc_test {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "liblog"),
|
SimpleModuleDoNotConvertBp2build("cc_library", "liblog"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_test", "mytest", AttrNameToString{
|
{"cc_test", "mytest", AttrNameToString{
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
@@ -594,8 +594,8 @@ cc_test {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") +
|
` + SimpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") +
|
||||||
simpleModuleDoNotConvertBp2build("cc_library", "liblog"),
|
SimpleModuleDoNotConvertBp2build("cc_library", "liblog"),
|
||||||
targets: []testBazelTarget{
|
targets: []testBazelTarget{
|
||||||
{"cc_test", "mytest", AttrNameToString{
|
{"cc_test", "mytest", AttrNameToString{
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
|
@@ -677,7 +677,7 @@ func TestConvertArmNeonVariant(t *testing.T) {
|
|||||||
Description: "Android Library - simple arch feature",
|
Description: "Android Library - simple arch feature",
|
||||||
ModuleTypeUnderTest: "android_library",
|
ModuleTypeUnderTest: "android_library",
|
||||||
ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
|
ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("android_library", "static_lib_dep") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("android_library", "static_lib_dep") + `
|
||||||
android_library {
|
android_library {
|
||||||
name: "TestLib",
|
name: "TestLib",
|
||||||
manifest: "manifest/AndroidManifest.xml",
|
manifest: "manifest/AndroidManifest.xml",
|
||||||
@@ -715,7 +715,7 @@ func TestConvertMultipleArchFeatures(t *testing.T) {
|
|||||||
Description: "Android Library - multiple arch features",
|
Description: "Android Library - multiple arch features",
|
||||||
ModuleTypeUnderTest: "android_library",
|
ModuleTypeUnderTest: "android_library",
|
||||||
ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
|
ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("android_library", "static_lib_dep") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("android_library", "static_lib_dep") + `
|
||||||
android_library {
|
android_library {
|
||||||
name: "TestLib",
|
name: "TestLib",
|
||||||
manifest: "manifest/AndroidManifest.xml",
|
manifest: "manifest/AndroidManifest.xml",
|
||||||
@@ -761,7 +761,7 @@ func TestConvertExcludeSrcsArchFeature(t *testing.T) {
|
|||||||
Description: "Android Library - exclude_srcs with arch feature",
|
Description: "Android Library - exclude_srcs with arch feature",
|
||||||
ModuleTypeUnderTest: "android_library",
|
ModuleTypeUnderTest: "android_library",
|
||||||
ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
|
ModuleTypeUnderTestFactory: java.AndroidLibraryFactory,
|
||||||
Blueprint: simpleModuleDoNotConvertBp2build("android_library", "static_lib_dep") + `
|
Blueprint: SimpleModuleDoNotConvertBp2build("android_library", "static_lib_dep") + `
|
||||||
android_library {
|
android_library {
|
||||||
name: "TestLib",
|
name: "TestLib",
|
||||||
manifest: "manifest/AndroidManifest.xml",
|
manifest: "manifest/AndroidManifest.xml",
|
||||||
|
@@ -298,8 +298,8 @@ python_defaults {
|
|||||||
"r1",
|
"r1",
|
||||||
"r2",
|
"r2",
|
||||||
],
|
],
|
||||||
}` + simpleModuleDoNotConvertBp2build("genrule", "r1") +
|
}` + SimpleModuleDoNotConvertBp2build("genrule", "r1") +
|
||||||
simpleModuleDoNotConvertBp2build("genrule", "r2"),
|
SimpleModuleDoNotConvertBp2build("genrule", "r2"),
|
||||||
|
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
MakeBazelTarget("py_binary", "foo", AttrNameToString{
|
MakeBazelTarget("py_binary", "foo", AttrNameToString{
|
||||||
|
@@ -570,7 +570,7 @@ func registerCustomModuleForBp2buildConversion(ctx *android.TestContext) {
|
|||||||
ctx.RegisterForBazelConversion()
|
ctx.RegisterForBazelConversion()
|
||||||
}
|
}
|
||||||
|
|
||||||
func simpleModuleDoNotConvertBp2build(typ, name string) string {
|
func SimpleModuleDoNotConvertBp2build(typ, name string) string {
|
||||||
return fmt.Sprintf(`
|
return fmt.Sprintf(`
|
||||||
%s {
|
%s {
|
||||||
name: "%s",
|
name: "%s",
|
||||||
|
@@ -1380,10 +1380,10 @@ func (la *linkerAttributes) bp2buildForAxisAndConfig(ctx android.BazelConversion
|
|||||||
// having stubs or not, so Bazel select() statement can be used to choose
|
// having stubs or not, so Bazel select() statement can be used to choose
|
||||||
// source/stub variants of them.
|
// source/stub variants of them.
|
||||||
apexAvailable := module.ApexAvailable()
|
apexAvailable := module.ApexAvailable()
|
||||||
setStubsForDynamicDeps(ctx, axis, config, apexAvailable, sharedDeps.export, &la.dynamicDeps, 0, false)
|
SetStubsForDynamicDeps(ctx, axis, config, apexAvailable, sharedDeps.export, &la.dynamicDeps, 0, false)
|
||||||
setStubsForDynamicDeps(ctx, axis, config, apexAvailable, sharedDeps.implementation, &la.implementationDynamicDeps, 1, false)
|
SetStubsForDynamicDeps(ctx, axis, config, apexAvailable, sharedDeps.implementation, &la.implementationDynamicDeps, 1, false)
|
||||||
if len(systemSharedLibs) > 0 {
|
if len(systemSharedLibs) > 0 {
|
||||||
setStubsForDynamicDeps(ctx, axis, config, apexAvailable, bazelLabelForSharedDeps(ctx, systemSharedLibs), &la.systemDynamicDeps, 2, true)
|
SetStubsForDynamicDeps(ctx, axis, config, apexAvailable, bazelLabelForSharedDeps(ctx, systemSharedLibs), &la.systemDynamicDeps, 2, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1583,7 +1583,7 @@ func useStubOrImplInApexWithName(ssi stubSelectionInfo) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func setStubsForDynamicDeps(ctx android.BazelConversionPathContext, axis bazel.ConfigurationAxis,
|
func SetStubsForDynamicDeps(ctx android.BazelConversionPathContext, axis bazel.ConfigurationAxis,
|
||||||
config string, apexAvailable []string, dynamicLibs bazel.LabelList, dynamicDeps *bazel.LabelListAttribute, ind int, buildNonApexWithStubs bool) {
|
config string, apexAvailable []string, dynamicLibs bazel.LabelList, dynamicDeps *bazel.LabelListAttribute, ind int, buildNonApexWithStubs bool) {
|
||||||
|
|
||||||
// Create a config_setting for each apex_available.
|
// Create a config_setting for each apex_available.
|
||||||
|
Reference in New Issue
Block a user