[llvm-commits] [compiler-rt] r145649 - /compiler-rt/trunk/make/platform/clang_darwin.mk

Daniel Dunbar daniel at zuster.org
Thu Dec 1 15:35:59 PST 2011


Author: ddunbar
Date: Thu Dec  1 17:35:59 2011
New Revision: 145649

URL: http://llvm.org/viewvc/llvm-project?rev=145649&view=rev
Log:
platform/clang_darwin: Add asan runtime library configuration.

Modified:
    compiler-rt/trunk/make/platform/clang_darwin.mk

Modified: compiler-rt/trunk/make/platform/clang_darwin.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/clang_darwin.mk?rev=145649&r1=145648&r2=145649&view=diff
==============================================================================
--- compiler-rt/trunk/make/platform/clang_darwin.mk (original)
+++ compiler-rt/trunk/make/platform/clang_darwin.mk Thu Dec  1 17:35:59 2011
@@ -60,6 +60,12 @@
 Configs += profile_ios
 UniversalArchs.profile_ios := $(call CheckArches,i386 x86_64 armv6 armv7)
 
+# Configurations which define the ASAN support functions.
+#
+# Note that ASAN doesn't appear to currently support i386.
+Configs += asan_osx
+UniversalArchs.asan_osx := $(call CheckArches,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.
 #
@@ -96,6 +102,14 @@
 
 CFLAGS.eprintf		:= $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
 CFLAGS.10.4		:= $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
+# FIXME: We can't build ASAN with our stub SDK yet.
+CFLAGS.asan_osx         := $(CFLAGS) -mmacosx-version-min=10.4
+CFLAGS.asan_osx         += \
+		-DASAN_USE_SYSINFO=1 \
+		-DASAN_NEEDS_SEGV=1 \
+		-DASAN_HAS_EXCEPTIONS=1 \
+		-DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0 \
+
 CFLAGS.ios.i386		:= $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
 CFLAGS.ios.x86_64	:= $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
 CFLAGS.ios.armv6	:= $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
@@ -132,6 +146,8 @@
 FUNCTIONS.profile_osx := GCDAProfiling
 FUNCTIONS.profile_ios := GCDAProfiling
 
+FUNCTIONS.asan_osx := $(AsanFunctions)
+
 CCKEXT_COMMON_FUNCTIONS := \
 	absvdi2 \
 	absvsi2 \





More information about the llvm-commits mailing list