diff options
Diffstat (limited to 'android/sh_binary.go')
| -rw-r--r-- | android/sh_binary.go | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/android/sh_binary.go b/android/sh_binary.go index 2855aa04..ba0c8be7 100644 --- a/android/sh_binary.go +++ b/android/sh_binary.go @@ -133,8 +133,10 @@ func (s *ShBinary) AndroidMkEntries() AndroidMkEntries { Class: "EXECUTABLES", OutputFile: OptionalPathForPath(s.outputFilePath), Include: "$(BUILD_SYSTEM)/soong_cc_prebuilt.mk", - AddCustomEntries: func(name, prefix, moduleDir string, entries *AndroidMkEntries) { - s.customAndroidMkEntries(entries) + ExtraEntries: []AndroidMkExtraEntriesFunc{ + func(entries *AndroidMkEntries) { + s.customAndroidMkEntries(entries) + }, }, } } @@ -156,20 +158,22 @@ func (s *ShTest) AndroidMkEntries() AndroidMkEntries { Class: "NATIVE_TESTS", OutputFile: OptionalPathForPath(s.outputFilePath), Include: "$(BUILD_SYSTEM)/soong_cc_prebuilt.mk", - AddCustomEntries: func(name, prefix, moduleDir string, entries *AndroidMkEntries) { - s.customAndroidMkEntries(entries) - - entries.AddStrings("LOCAL_COMPATIBILITY_SUITE", s.testProperties.Test_suites...) - entries.SetString("LOCAL_TEST_CONFIG", String(s.testProperties.Test_config)) - for _, d := range s.data { - rel := d.Rel() - path := d.String() - if !strings.HasSuffix(path, rel) { - panic(fmt.Errorf("path %q does not end with %q", path, rel)) + ExtraEntries: []AndroidMkExtraEntriesFunc{ + func(entries *AndroidMkEntries) { + s.customAndroidMkEntries(entries) + + entries.AddStrings("LOCAL_COMPATIBILITY_SUITE", s.testProperties.Test_suites...) + entries.SetString("LOCAL_TEST_CONFIG", String(s.testProperties.Test_config)) + for _, d := range s.data { + rel := d.Rel() + path := d.String() + if !strings.HasSuffix(path, rel) { + panic(fmt.Errorf("path %q does not end with %q", path, rel)) + } + path = strings.TrimSuffix(path, rel) + entries.AddStrings("LOCAL_TEST_DATA", path+":"+rel) } - path = strings.TrimSuffix(path, rel) - entries.AddStrings("LOCAL_TEST_DATA", path+":"+rel) - } + }, }, } } |
