diff options
author | Ryan Prichard <rprichard@google.com> | 2018-02-05 23:45:16 -0800 |
---|---|---|
committer | Ryan Prichard <rprichard@google.com> | 2018-02-06 15:11:38 -0800 |
commit | 3ed1f70414d71819eaafed49fe4237527b0ef824 (patch) | |
tree | bab3d14f6a866fde7c9c247e002522f61e0402a9 /python/python.go | |
parent | 03d383d038c867ca0430460f9341da6eca8d4d2b (diff) |
Enable emutls with -flto for Android sanitize=cfi
-fsanitize=cfi requires LTO. Normally, the Clang driver automatically
enables emutls, but it's broken with -flto, so work around it by passing
-Wl,-plugin-opt=-emulated-tls.
See https://buganizer.corp.google.com/issues/72706604#comment15
Enable the workaround with ctx.Device(), which is the same condition used
in the existing I18acac41aac885fc6635fbd55f96ba7c845eb5e7 workaround.
Bug: b/72706604
Bug: https://github.com/android-ndk/ndk/issues/498
Test: m libaudioflinger (on internal master); \
readelf -sW symbols/system/lib64/libaudioflinger.so | grep tlNBLogWriter
check that __emutls_t.tlNBLogWriter exists
check that no symbols of type TLS exist
Change-Id: I2cf65574c52476843cc017ee176a7d6777e2ce0b
Diffstat (limited to 'python/python.go')
0 files changed, 0 insertions, 0 deletions