diff options
author | 2024-10-11 00:21:57 +0000 | |
---|---|---|
committer | 2024-10-17 02:23:49 +0000 | |
commit | 0d545b8242b06ad745b6745a83da952093889b88 (patch) | |
tree | 63b710ef5ff6c1800242f7fefe6e0a060c2bdf57 /filesystem/filesystem.go | |
parent | 70c43ec62fd900cdff7aa0fa724dc2318b1acbfd (diff) |
Revert^4 "Set the appropriate deps property for the soong generated fs modules"
This change relands https://r.android.com/3304859.
Test: m nothing --no-skip-soong-tests && ABTD
Bug: 372771060
Change-Id: Ie798fee2a71c14d5e8ac5e2433394bbb090cd595
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r-- | filesystem/filesystem.go | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index 8c59df371..4bdd0a4c7 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -145,6 +145,10 @@ type FilesystemProperties struct { Unchecked_module *bool `blueprint:"mutated"` Erofs ErofsProperties + + // Determines if the module is auto-generated from Soong or not. If the module is + // auto-generated, its deps are exempted from visibility enforcement. + Is_auto_generated *bool } // Additional properties required to generate erofs FS partitions. @@ -179,13 +183,29 @@ func initFilesystemModule(module android.DefaultableModule, filesystemModule *fi android.InitDefaultableModule(module) } -var dependencyTag = struct { +type depTag struct { blueprint.BaseDependencyTag android.PackagingItemAlwaysDepTag -}{} +} + +var dependencyTag = depTag{} + +type depTagWithVisibilityEnforcementBypass struct { + depTag +} + +var _ android.ExcludeFromVisibilityEnforcementTag = (*depTagWithVisibilityEnforcementBypass)(nil) + +func (t depTagWithVisibilityEnforcementBypass) ExcludeFromVisibilityEnforcement() {} + +var dependencyTagWithVisibilityEnforcementBypass = depTagWithVisibilityEnforcementBypass{} func (f *filesystem) DepsMutator(ctx android.BottomUpMutatorContext) { - f.AddDeps(ctx, dependencyTag) + if proptools.Bool(f.properties.Is_auto_generated) { + f.AddDeps(ctx, dependencyTagWithVisibilityEnforcementBypass) + } else { + f.AddDeps(ctx, dependencyTag) + } } type fsType int |