Loading cc/sanitize.go +12 −5 Original line number Diff line number Diff line Loading @@ -1000,11 +1000,6 @@ func sanitizerMutator(t sanitizerType) func(android.BottomUpMutatorContext) { modules[0].(*Module).sanitize.SetSanitizer(t, true) } else if c.sanitize.isSanitizerEnabled(t) || c.sanitize.Properties.SanitizeDep { isSanitizerEnabled := c.sanitize.isSanitizerEnabled(t) if mctx.Device() && t.incompatibleWithCfi() { // TODO: Make sure that cfi mutator runs "after" any of the sanitizers that // are incompatible with cfi c.sanitize.SetSanitizer(cfi, false) } if c.static() || c.header() || t == asan || t == fuzzer { // Static and header libs are split into non-sanitized and sanitized variants. // Shared libs are not split. However, for asan and fuzzer, we split even for shared Loading @@ -1026,6 +1021,12 @@ func sanitizerMutator(t sanitizerType) func(android.BottomUpMutatorContext) { modules[0].(*Module).sanitize.Properties.SanitizeDep = false modules[1].(*Module).sanitize.Properties.SanitizeDep = false if mctx.Device() && t.incompatibleWithCfi() { // TODO: Make sure that cfi mutator runs "after" any of the sanitizers that // are incompatible with cfi modules[1].(*Module).sanitize.SetSanitizer(cfi, false) } // For cfi/scs/hwasan, we can export both sanitized and un-sanitized variants // to Make, because the sanitized version has a different suffix in name. // For other types of sanitizers, suppress the variation that is disabled. Loading Loading @@ -1063,6 +1064,12 @@ func sanitizerMutator(t sanitizerType) func(android.BottomUpMutatorContext) { if mctx.Device() && t == asan && isSanitizerEnabled { modules[0].(*Module).sanitize.Properties.InSanitizerDir = true } if mctx.Device() && t.incompatibleWithCfi() { // TODO: Make sure that cfi mutator runs "after" any of the sanitizers that // are incompatible with cfi modules[0].(*Module).sanitize.SetSanitizer(cfi, false) } } } c.sanitize.Properties.SanitizeDep = false Loading Loading
cc/sanitize.go +12 −5 Original line number Diff line number Diff line Loading @@ -1000,11 +1000,6 @@ func sanitizerMutator(t sanitizerType) func(android.BottomUpMutatorContext) { modules[0].(*Module).sanitize.SetSanitizer(t, true) } else if c.sanitize.isSanitizerEnabled(t) || c.sanitize.Properties.SanitizeDep { isSanitizerEnabled := c.sanitize.isSanitizerEnabled(t) if mctx.Device() && t.incompatibleWithCfi() { // TODO: Make sure that cfi mutator runs "after" any of the sanitizers that // are incompatible with cfi c.sanitize.SetSanitizer(cfi, false) } if c.static() || c.header() || t == asan || t == fuzzer { // Static and header libs are split into non-sanitized and sanitized variants. // Shared libs are not split. However, for asan and fuzzer, we split even for shared Loading @@ -1026,6 +1021,12 @@ func sanitizerMutator(t sanitizerType) func(android.BottomUpMutatorContext) { modules[0].(*Module).sanitize.Properties.SanitizeDep = false modules[1].(*Module).sanitize.Properties.SanitizeDep = false if mctx.Device() && t.incompatibleWithCfi() { // TODO: Make sure that cfi mutator runs "after" any of the sanitizers that // are incompatible with cfi modules[1].(*Module).sanitize.SetSanitizer(cfi, false) } // For cfi/scs/hwasan, we can export both sanitized and un-sanitized variants // to Make, because the sanitized version has a different suffix in name. // For other types of sanitizers, suppress the variation that is disabled. Loading Loading @@ -1063,6 +1064,12 @@ func sanitizerMutator(t sanitizerType) func(android.BottomUpMutatorContext) { if mctx.Device() && t == asan && isSanitizerEnabled { modules[0].(*Module).sanitize.Properties.InSanitizerDir = true } if mctx.Device() && t.incompatibleWithCfi() { // TODO: Make sure that cfi mutator runs "after" any of the sanitizers that // are incompatible with cfi modules[0].(*Module).sanitize.SetSanitizer(cfi, false) } } } c.sanitize.Properties.SanitizeDep = false Loading