diff options
author | Jiyong Park <jiyong@google.com> | 2019-07-11 11:24:41 +0900 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-07-12 04:09:51 +0000 |
commit | b1d60cb998703fb950e39e4fb10d86476f3f0dce (patch) | |
tree | be3e2d1dcdec1b70931fa8621f016be3e2e2a780 | |
parent | 9f4175c5837a93210850a5fda47f4f99c74c9351 (diff) | |
download | build_soong-b1d60cb998703fb950e39e4fb10d86476f3f0dce.tar.gz build_soong-b1d60cb998703fb950e39e4fb10d86476f3f0dce.tar.bz2 build_soong-b1d60cb998703fb950e39e4fb10d86476f3f0dce.zip |
Don't use APEX prebuilts when asan is on
Some prebuilt APEXes are enabled with scudo, which causes crash on
devices with asan.
Bug: 137216042
Test: build walleye_hwasan and check if apexes are not from prebuilts
Change-Id: Ic436ad06e724af952d99fb8e66358a595450eb84
(cherry picked from commit 3b98a509f19cb25e9734bb62ba0b592663ed8e4e)
-rw-r--r-- | apex/apex.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apex/apex.go b/apex/apex.go index 3726684c..04b667f8 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1327,10 +1327,16 @@ func (p *Prebuilt) installable() bool { } func (p *Prebuilt) DepsMutator(ctx android.BottomUpMutatorContext) { - if ctx.Config().FlattenApex() && !ctx.Config().UnbundledBuild() && p.prebuilt.SourceExists() { - // If the device is configured to use flattened APEX, don't set - // p.properties.Source so that the prebuilt module (which is - // a non-flattened APEX) is not used. + // If the device is configured to use flattened APEX, don't set + // p.properties.Source so that the prebuilt module (which is + // a non-flattened APEX) is not used. + forceDisable := ctx.Config().FlattenApex() && !ctx.Config().UnbundledBuild() + + // b/137216042 don't use prebuilts when address sanitizer is on + forceDisable = forceDisable || android.InList("address", ctx.Config().SanitizeDevice()) || + android.InList("hwaddress", ctx.Config().SanitizeDevice()) + + if forceDisable && p.prebuilt.SourceExists() { p.properties.ForceDisable = true return } |