diff options
author | 2020-03-10 22:37:59 +0000 | |
---|---|---|
committer | 2020-03-20 00:16:14 +0000 | |
commit | cd07bce43756d5246e07d079a4a24040981f54ff (patch) | |
tree | 15620ab5d3ed6c9b32f4afe4cb0e17564fb7da0f /sdk/cc_sdk_test.go | |
parent | 0b92ac8e43a43945fb5407989093535eb62c681d (diff) |
Add SDK member support for cc_object.
Test: m nothing
Test: Add
sdk {
name: "runtime-module-sdk",
native_shared_libs: [
"libc",
"libdl",
"libm",
"ld-android",
],
native_objects: [
"crtbegin_dynamic",
"crtbegin_static",
"crtend_android",
],
}
to bionic/apex/Android.bp. Then:
build/soong/scripts/build-aml-prebuilts.sh runtime-module-sdk
Take the generated runtime-module-sdk-current.zip and unzip into a
master-art tree without bionic/, edit the generated Android.bp to
extend cc_prebuilt_* modules with:
nocrt: true,
stl: "none",
system_shared_libs: [],
apex_available: ["//apex_available:anyapex"],
recovery_available: true,
vendor_available: true,
ramdisk_available: true,
Then "m com.android.art.debug". This passes Soong but fails in the
build step because more members are required.
Bug: 148934017
Change-Id: I2ab8f6aadb1440b325697cae4a8ed761c62d15d2
Diffstat (limited to 'sdk/cc_sdk_test.go')
-rw-r--r-- | sdk/cc_sdk_test.go | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/sdk/cc_sdk_test.go b/sdk/cc_sdk_test.go index 6f9dc3c17..6727b4bf0 100644 --- a/sdk/cc_sdk_test.go +++ b/sdk/cc_sdk_test.go @@ -225,6 +225,63 @@ func TestSdkWithCc(t *testing.T) { `) } +func TestSnapshotWithObject(t *testing.T) { + result := testSdkWithCc(t, ` + sdk { + name: "mysdk", + native_objects: ["crtobj"], + } + + cc_object { + name: "crtobj", + stl: "none", + } + `) + + result.CheckSnapshot("mysdk", "", + checkAndroidBpContents(` +// This is auto-generated. DO NOT EDIT. + +cc_prebuilt_object { + name: "mysdk_crtobj@current", + sdk_member_name: "crtobj", + stl: "none", + arch: { + arm64: { + srcs: ["arm64/lib/crtobj.o"], + }, + arm: { + srcs: ["arm/lib/crtobj.o"], + }, + }, +} + +cc_prebuilt_object { + name: "crtobj", + prefer: false, + stl: "none", + arch: { + arm64: { + srcs: ["arm64/lib/crtobj.o"], + }, + arm: { + srcs: ["arm/lib/crtobj.o"], + }, + }, +} + +sdk_snapshot { + name: "mysdk@current", + native_objects: ["mysdk_crtobj@current"], +} +`), + checkAllCopyRules(` +.intermediates/crtobj/android_arm64_armv8-a/crtobj.o -> arm64/lib/crtobj.o +.intermediates/crtobj/android_arm_armv7-a-neon/crtobj.o -> arm/lib/crtobj.o +`), + ) +} + func TestSnapshotWithCcDuplicateHeaders(t *testing.T) { result := testSdkWithCc(t, ` sdk { |