[compiler-rt] r243802 - [asan] Link tests with ld.gold on Android.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Fri Jul 31 17:01:24 PDT 2015
Author: eugenis
Date: Fri Jul 31 19:01:23 2015
New Revision: 243802
URL: http://llvm.org/viewvc/llvm-project?rev=243802&view=rev
Log:
[asan] Link tests with ld.gold on Android.
ld.bfd fails to find dependencies of asan runtime library w/o an
extra -rpath-link pointing to usr/lib under the sysroot. Gold does
not have this problem.
Modified:
compiler-rt/trunk/test/asan/lit.cfg
Modified: compiler-rt/trunk/test/asan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=243802&r1=243801&r2=243802&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/lit.cfg (original)
+++ compiler-rt/trunk/test/asan/lit.cfg Fri Jul 31 19:01:23 2015
@@ -55,6 +55,11 @@ if config.compiler_id == 'GNU':
else:
extra_linkflags = []
+# BFD linker in 64-bit android toolchains fails to find libm.so, which is a
+# transitive shared library dependency (via asan runtime).
+if config.android:
+ extra_linkflags += ["-fuse-ld=gold"]
+
# Setup default compiler flags used with -fsanitize=address option.
# FIXME: Review the set of required flags and check if it can be reduced.
target_cflags = [get_required_attr(config, "target_cflags")] + extra_linkflags
More information about the llvm-commits
mailing list