Use Module interface in addRequiredDeps

Previously, addRequiredDeps directly called RequiredModuleNames directly on
ModuleBase. As a result, it failed to correctly track the dependencies
for the modules which are overriding RequiredModuleNames. cc_* were
those.

Fixing this by calling RequiredModuleNames via the Module interface.

Bug: 321626681
Test: go test ./... under filesystem
Change-Id: I79de616606b88277da0b3e86b21316ee83e0ec71
This commit is contained in:
Jiyong Park
2024-04-13 10:44:10 +09:00
parent 62532d7d62
commit de18a3d55a
2 changed files with 22 additions and 12 deletions

View File

@@ -84,12 +84,21 @@ func TestFileSystemDeps(t *testing.T) {
cc_library {
name: "libbar",
required: ["libbaz"],
target: {
platform: {
required: ["lib_platform_only"],
},
},
}
cc_library {
name: "libbaz",
}
cc_library {
name: "lib_platform_only",
}
phony {
name: "phony",
required: [
@@ -120,6 +129,7 @@ func TestFileSystemDeps(t *testing.T) {
"lib64/libbar.so",
"lib64/libbaz.so",
"lib64/libquz.so",
"lib64/lib_platform_only.so",
"etc/bpf/bpf.o",
}
for _, e := range expected {