summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tomasz Wasilczyk <twasilczyk@google.com> 2024-06-27 10:47:40 -0700
committer Tomasz Wasilczyk <twasilczyk@google.com> 2024-07-08 10:22:24 -0700
commitbd83c744852031cf32de7a790a526804b39528e6 (patch)
tree185203f063f117a86f9f726ba291edb672964e55
parentb48f55eed5750837062518d599e1df3a9902bb7d (diff)
cc_cmake_snapshot: drop Modules field
Use Modules_host, Modules_system or Modules_vendor instead Also, fix test by adding libc++demangle to the ignored list. Bug: 285204695 Test: m binder_sdk Test: cd build/soong/cc && go test Change-Id: I6c3eda83584bc910f8b73ffa0f36c3d7fce5f10b
-rw-r--r--cc/cmake_snapshot.go5
-rw-r--r--cc/cmake_snapshot_test.go8
2 files changed, 6 insertions, 7 deletions
diff --git a/cc/cmake_snapshot.go b/cc/cmake_snapshot.go
index b79776453..fb2924a07 100644
--- a/cc/cmake_snapshot.go
+++ b/cc/cmake_snapshot.go
@@ -69,6 +69,7 @@ var ignoredSystemLibs []string = []string{
"libc",
"libc++",
"libc++_static",
+ "libc++demangle",
"libc_musl",
"libc_musl_crtbegin_so",
"libc_musl_crtbegin_static",
@@ -96,9 +97,6 @@ type LibraryMappingProperty struct {
}
type CmakeSnapshotProperties struct {
- // TODO: remove
- Modules []string
-
// Host modules to add to the snapshot package. Their dependencies are pulled in automatically.
Modules_host []string
@@ -289,7 +287,6 @@ func (m *CmakeSnapshot) DepsMutator(ctx android.BottomUpMutatorContext) {
deviceVendorVariations := append(deviceVariations, blueprint.Variation{"image", "vendor"})
hostVariations := ctx.Config().BuildOSTarget.Variations()
- ctx.AddVariationDependencies(hostVariations, cmakeSnapshotModuleTag, m.Properties.Modules...)
ctx.AddVariationDependencies(hostVariations, cmakeSnapshotModuleTag, m.Properties.Modules_host...)
ctx.AddVariationDependencies(deviceSystemVariations, cmakeSnapshotModuleTag, m.Properties.Modules_system...)
ctx.AddVariationDependencies(deviceVendorVariations, cmakeSnapshotModuleTag, m.Properties.Modules_vendor...)
diff --git a/cc/cmake_snapshot_test.go b/cc/cmake_snapshot_test.go
index 8fca6c18f..b6f4369b0 100644
--- a/cc/cmake_snapshot_test.go
+++ b/cc/cmake_snapshot_test.go
@@ -38,7 +38,9 @@ func TestEmptyCmakeSnapshot(t *testing.T) {
result := PrepareForIntegrationTestWithCc.RunTestWithBp(t, `
cc_cmake_snapshot {
name: "foo",
- modules: [],
+ modules_host: [],
+ modules_system: [],
+ modules_vendor: [],
prebuilts: ["libc++"],
include_sources: true,
}`)
@@ -65,7 +67,7 @@ func TestCmakeSnapshotWithBinary(t *testing.T) {
result := android.GroupFixturePreparers(PrepareForIntegrationTestWithCc, xtra).RunTestWithBp(t, `
cc_cmake_snapshot {
name: "foo",
- modules: [
+ modules_system: [
"foo_binary",
],
include_sources: true,
@@ -99,7 +101,7 @@ func TestCmakeSnapshotAsTestData(t *testing.T) {
cc_cmake_snapshot {
name: "foo",
- modules: [],
+ modules_system: [],
prebuilts: ["libc++"],
include_sources: true,
}`)