summaryrefslogtreecommitdiff
path: root/python/python.go
diff options
context:
space:
mode:
author Mitch Phillips <mitchp@google.com> 2019-08-02 16:57:55 -0700
committer Mitch Phillips <mitchp@google.com> 2019-08-02 16:57:55 -0700
commit34b493fec5da05b815b7b444d6625f050a0cf543 (patch)
tree251e32c2c897d5a1b3fba9574f3432bd50a5f1eb /python/python.go
parentd778b93168ddd0d0f7cb70a24b140b4543bd58f7 (diff)
Disable LTO when building with fuzzer support.
Bug: 131771163 LTO is currently broken when building with SANITIZE_TARGET=fuzzer. The compiler bug is currently being addressed upstream (see linked bug), but we have applied a local workaround in the build system to disable LTO when building using the fuzzer config. There is a bug here however. In the sanitizer mutator we explicitly remove -flto and add -fno-lto. The sanitizer mutator runs after the LTO mutator, so (in general) this works just fine. The problem exists when a target specifies an explicit 'lto: { ... }' flag in their Android.bp. In this case, the sanitizer mutator disables LTO, then the flags are parsed from the Android.bp, re-enabling LTO. This patch fixes this issue. If the sanitizer mutator has added the -fsanitize=fuzzer-no-link flags, then the LTO mutator won't add the LTO flags after this fact. Test: Build a target with SANITIZE_TARGET=fuzzer (or a cc_fuzz target), where there is an explitiy 'lto: { ... }' and watch it now succeed in building. Change-Id: I6643909417f666539c23469816926b806e204b06
Diffstat (limited to 'python/python.go')
0 files changed, 0 insertions, 0 deletions