From 4a4ef702597471bff5e249b8ec9d94d265007895 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 13 Nov 2012 23:55:06 +0000 Subject: Support for building the ubsan runtime when using the autoconf build system on Darwin. Patch by Jean-Daniel Dupas, tweaked by Jonathan Sauer, simplified somewhat by me. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167889 91177308-0d34-0410-b5e6-96231b3b80d8 --- make/platform/clang_darwin.mk | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'make') diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk index 5bc0e1062..399edee03 100644 --- a/make/platform/clang_darwin.mk +++ b/make/platform/clang_darwin.mk @@ -76,6 +76,9 @@ UniversalArchs.asan_osx := $(call CheckArches,i386 x86_64,asan_osx) Configs += asan_osx_dynamic UniversalArchs.asan_osx_dynamic := $(call CheckArches,i386 x86_64,asan_osx_dynamic) +Configs += ubsan_osx +UniversalArchs.ubsan_osx := $(call CheckArches,i386 x86_64,ubsan_osx) + # Darwin 10.6 has a bug in cctools that makes it unable to use ranlib on our ARM # object files. If we are on that platform, strip out all ARM archs. We still # build the libraries themselves so that Clang can find them where it expects @@ -131,6 +134,8 @@ CFLAGS.asan_osx_dynamic := \ $(CFLAGS) -mmacosx-version-min=10.5 -fno-builtin \ -DMAC_INTERPOSE_FUNCTIONS=1 +CFLAGS.ubsan_osx := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) + CFLAGS.ios.i386 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS) CFLAGS.ios.x86_64 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS) CFLAGS.ios.armv7 := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS) @@ -183,6 +188,8 @@ FUNCTIONS.asan_osx_dynamic := $(AsanFunctions) $(InterceptionFunctions) \ $(SanitizerCommonFunctions) \ $(AsanDynamicFunctions) +FUNCTIONS.ubsan_osx := $(UbsanFunctions) + CCKEXT_COMMON_FUNCTIONS := \ absvdi2 \ absvsi2 \ -- cgit v1.2.3