aboutsummaryrefslogtreecommitdiffstats
path: root/cc/sanitize.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2016-07-29 17:28:03 -0700
committerColin Cross <ccross@android.com>2016-08-05 10:25:09 -0700
commitb916a38233e6862ec74dd840038ae224f6fde1c7 (patch)
treec830af79126bf82b750bad58bd9808a638607da8 /cc/sanitize.go
parent01344df46ee1744dd1ff7815705564deb43ac7cb (diff)
downloadbuild_soong-b916a38233e6862ec74dd840038ae224f6fde1c7.tar.gz
build_soong-b916a38233e6862ec74dd840038ae224f6fde1c7.tar.bz2
build_soong-b916a38233e6862ec74dd840038ae224f6fde1c7.zip
Refactor cc modules to use decorators instead of inheritance
For example , instead of trying to have libraryLinker inherit from baseLinker and libraryCompiler inherit from baseCompiler, create a single decorator object that wraps both baseLinker and baseCompiler. Test: Builds, no unexpected changes to build.ninja Change-Id: I2468adaea8466c203a240259ba5694b8b1df7a52
Diffstat (limited to 'cc/sanitize.go')
-rw-r--r--cc/sanitize.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cc/sanitize.go b/cc/sanitize.go
index e7f021a3..fb7cb371 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -345,7 +345,7 @@ func sanitizerDepsMutator(t sanitizerType) func(android.TopDownMutatorContext) {
func sanitizerMutator(t sanitizerType) func(android.BottomUpMutatorContext) {
return func(mctx android.BottomUpMutatorContext) {
if c, ok := mctx.Module().(*Module); ok && c.sanitize != nil {
- if d, ok := c.linker.(baseLinkerInterface); ok && d.isDependencyRoot() && c.sanitize.Sanitizer(t) {
+ if c.isDependencyRoot() && c.sanitize.Sanitizer(t) {
modules := mctx.CreateVariations(t.String())
modules[0].(*Module).sanitize.SetSanitizer(t, true)
if mctx.AConfig().EmbeddedInMake() && !c.Host() {