build/asan: Fix ASAN build for i386, for reasons I don't really understand we
get the DARWIN_UNIX03 definition on x86_64 but not on i386.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145657 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/asan_rtl.cc b/lib/asan/asan_rtl.cc
index 7fb3b92..e7dc047 100644
--- a/lib/asan/asan_rtl.cc
+++ b/lib/asan/asan_rtl.cc
@@ -250,10 +250,10 @@
*sp = ucontext->uc_mcontext->__ss.__rsp;
*ax = ucontext->uc_mcontext->__ss.__rax;
# else
- *pc = ucontext->uc_mcontext->__ss.__eip;
- *bp = ucontext->uc_mcontext->__ss.__ebp;
- *sp = ucontext->uc_mcontext->__ss.__esp;
- *ax = ucontext->uc_mcontext->__ss.__eax;
+ *pc = ucontext->uc_mcontext->ss.eip;
+ *bp = ucontext->uc_mcontext->ss.ebp;
+ *sp = ucontext->uc_mcontext->ss.esp;
+ *ax = ucontext->uc_mcontext->ss.eax;
# endif // __WORDSIZE
#else // assume linux
# if defined(__arm__)
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk
index 05014b9..cea3fa4 100644
--- a/make/platform/clang_darwin.mk
+++ b/make/platform/clang_darwin.mk
@@ -64,7 +64,7 @@
#
# Note that ASAN doesn't appear to currently support i386.
Configs += asan_osx
-UniversalArchs.asan_osx := $(call CheckArches,x86_64)
+UniversalArchs.asan_osx := $(call CheckArches,i386 x86_64)
# If RC_SUPPORTED_ARCHS is defined, treat it as a list of the architectures we
# are intended to support and limit what we try to build to that.