From: Alexey Samsonov <samsonov@google.com>
Date: Wed, 3 Oct 2012 07:23:03 +0000 (+0000)
Subject: Make sure 32-bit ASan runtime is available on 64-bit Linux platforms
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2985cbc3c08f4da6602679ff6df11b6abe3f11e0;p=clang

Make sure 32-bit ASan runtime is available on 64-bit Linux platforms

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165097 91177308-0d34-0410-b5e6-96231b3b80d8
---

diff --git a/runtime/compiler-rt/Makefile b/runtime/compiler-rt/Makefile
index 2815f1783a..58cb7fdaaf 100644
--- a/runtime/compiler-rt/Makefile
+++ b/runtime/compiler-rt/Makefile
@@ -92,6 +92,10 @@ endif
 ifeq ($(ARCH),x86_64)
 RuntimeLibrary.linux.Configs += \
 	full-x86_64.a profile-x86_64.a asan-x86_64.a tsan-x86_64.a
+# We assume that 32-bit ASan library can be built by Clang on 64-bit platform,
+# and add it to the list of runtime libraries so that
+# "clang -faddress-sanitizer -m32" would work.
+RuntimeLibrary.linux.Configs += asan-i386.a
 endif
 
 endif