EXPERIMENTAL: Add libcompiler-rt-extras.a to device builds.
Change-Id: I463217aef573a28069469514ad94cd85a7f38bea
diff --git a/core/llvm_config.mk b/core/llvm_config.mk
index 4145028..33cf6d1 100644
--- a/core/llvm_config.mk
+++ b/core/llvm_config.mk
@@ -71,3 +71,9 @@
ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS := -Wl,-u,__asan_preinit
ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES := libdl libasan_preload
ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES := libasan
+
+# This allows us to use the superset of functionality that compiler-rt
+# provides to Clang (for supporting features like -ftrapv).
+ifneq ($(TARGET_ARCH),mips)
+COMPILER_RT_CONFIG_EXTRA_STATIC_LIBRARIES := libcompiler-rt-extras
+endif