diff options
author | Colin Cross <ccross@android.com> | 2018-08-29 14:10:52 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2018-08-30 16:31:02 +0000 |
commit | 42d48b7b8b94e301d703656db0b25bc5ee7eb3bc (patch) | |
tree | 377b5bdf4556fbb6a04bb436230fe6abcbe64157 /cc/cc.go | |
parent | b69575b1f697edae9f9b78765d50c8117d21f7d1 (diff) | |
download | build_soong-42d48b7b8b94e301d703656db0b25bc5ee7eb3bc.tar.gz build_soong-42d48b7b8b94e301d703656db0b25bc5ee7eb3bc.tar.bz2 build_soong-42d48b7b8b94e301d703656db0b25bc5ee7eb3bc.zip |
Enforce dependencies have right architecture
ctx.AddDependency will succeed if the named dependency only has a
single variant, even if that variant is the wrong architecture.
Use ctx.AddVariationDependency(nil, ...) instead, which requires
that all variations of the calling module match the dependency.
Bug: 112707915
Test: no change to out/soong/build.ninja
Test: using a device dependency in a host java module is an error
Change-Id: I70b661a57d4412eb63b8c9841febfb756e9e025d
Diffstat (limited to 'cc/cc.go')
-rw-r--r-- | cc/cc.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1043,13 +1043,13 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) { actx.AddDependency(c, depTag, gen) } - actx.AddDependency(c, objDepTag, deps.ObjFiles...) + actx.AddVariationDependencies(nil, objDepTag, deps.ObjFiles...) if deps.CrtBegin != "" { - actx.AddDependency(c, crtBeginDepTag, deps.CrtBegin) + actx.AddVariationDependencies(nil, crtBeginDepTag, deps.CrtBegin) } if deps.CrtEnd != "" { - actx.AddDependency(c, crtEndDepTag, deps.CrtEnd) + actx.AddVariationDependencies(nil, crtEndDepTag, deps.CrtEnd) } if deps.LinkerScript != "" { actx.AddDependency(c, linkerScriptDepTag, deps.LinkerScript) |