aboutsummaryrefslogtreecommitdiffstats
path: root/phony
diff options
context:
space:
mode:
authorDan Willemsen2019-04-02 19:04:18 -0500
committerDan Willemsen2019-04-02 19:07:10 -0500
commit60294ef8d506a0222ccd914134408d37bb84b43f (patch)
treefb4916b3e0f3ca37f91f5a1f88ab106d5afa920c /phony
parent9a4f3f7ea87d983ddf69831a9e197f6b62d4d873 (diff)
downloadplatform-build-soong-60294ef8d506a0222ccd914134408d37bb84b43f.tar.gz
platform-build-soong-60294ef8d506a0222ccd914134408d37bb84b43f.tar.xz
platform-build-soong-60294ef8d506a0222ccd914134408d37bb84b43f.zip
Support host phony modules
I'm fixing make to differentiate between host and target, so this will be more useful soon. Test: Android-aosp_arm64.mk is the same before/after Test: adding `host_supported: true` to shell_and_utilities_system produces expected Android-aosp_arm64.mk Change-Id: Idf12703be692100336db6d5c0ec05bb96e5e5c27
Diffstat (limited to 'phony')
-rw-r--r--phony/phony.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/phony/phony.go b/phony/phony.go
index e8a6550f..ed6a2fef 100644
--- a/phony/phony.go
+++ b/phony/phony.go
@@ -34,7 +34,7 @@ type phony struct {
34func PhonyFactory() android.Module { 34func PhonyFactory() android.Module {
35 module := &phony{} 35 module := &phony{}
36 36
37 android.InitAndroidModule(module) 37 android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibCommon)
38 return module 38 return module
39} 39}
40 40
@@ -51,6 +51,9 @@ func (p *phony) AndroidMk() android.AndroidMkData {
51 fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)") 51 fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)")
52 fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir) 52 fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir)
53 fmt.Fprintln(w, "LOCAL_MODULE :=", name) 53 fmt.Fprintln(w, "LOCAL_MODULE :=", name)
54 if p.Host() {
55 fmt.Fprintln(w, "LOCAL_IS_HOST_MODULE := true")
56 }
54 fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES := "+strings.Join(p.requiredModuleNames, " ")) 57 fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES := "+strings.Join(p.requiredModuleNames, " "))
55 fmt.Fprintln(w, "include $(BUILD_PHONY_PACKAGE)") 58 fmt.Fprintln(w, "include $(BUILD_PHONY_PACKAGE)")
56 }, 59 },