[llvm-commits] [compiler-rt] r145496 - in /compiler-rt/trunk/lib/asan: Makefile.old asan_allocator.h asan_interceptors.h

Kostya Serebryany kcc at google.com
Wed Nov 30 09:33:13 PST 2011


Author: kcc
Date: Wed Nov 30 11:33:13 2011
New Revision: 145496

URL: http://llvm.org/viewvc/llvm-project?rev=145496&view=rev
Log:
fix asan-rt build on Mac. Patch by glider at google.com

Modified:
    compiler-rt/trunk/lib/asan/Makefile.old
    compiler-rt/trunk/lib/asan/asan_allocator.h
    compiler-rt/trunk/lib/asan/asan_interceptors.h

Modified: compiler-rt/trunk/lib/asan/Makefile.old
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/Makefile.old?rev=145496&r1=145495&r2=145496&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/Makefile.old (original)
+++ compiler-rt/trunk/lib/asan/Makefile.old Wed Nov 30 11:33:13 2011
@@ -194,7 +194,7 @@
 	    $(BIN)/asan_thread_registry$(SUFF).o  \
 	    $(BIN)/sysinfo/sysinfo$(SUFF).o
 
-ifeq ($(OS),Darwin)
+ifeq ($(OS),darwin)
 RTL_HDR=$(RTL_HDR_COMMON) mach_override/mach_override.h asan_mac.h
 LIBASAN_OBJ=$(LIBASAN_OBJ_COMMON) \
 	    $(BIN)/asan_mac$(SUFF).o \
@@ -282,7 +282,7 @@
 		-DASAN_USE_SYSINFO=1 \
 		$(ASAN_FLAGS)
 
-ifeq ($(OS),Darwin)
+ifeq ($(OS),darwin)
 LD_FLAGS=-framework Foundation
 else
 LD_FLAGS=
@@ -307,7 +307,7 @@
 	     $(BIN)/asan_benchmarks_test$(SUFF).o \
 	     $(BIN)/asan_break_optimization$(SUFF).o
 
-ifeq ($(OS),Darwin)
+ifeq ($(OS),darwin)
 TEST_OBJECTS=$(TEST_OBJECTS_COMMON) \
 	     $(BIN)/asan_mac_test$(SUFF).o
 else

Modified: compiler-rt/trunk/lib/asan/asan_allocator.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_allocator.h?rev=145496&r1=145495&r2=145496&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_allocator.h (original)
+++ compiler-rt/trunk/lib/asan/asan_allocator.h Wed Nov 30 11:33:13 2011
@@ -21,7 +21,7 @@
 namespace __asan {
 
 static const size_t kNumberOfSizeClasses = 255;
-class AsanChunk;
+struct AsanChunk;
 
 class AsanChunkFifoList {
  public:

Modified: compiler-rt/trunk/lib/asan/asan_interceptors.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors.h?rev=145496&r1=145495&r2=145496&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.h (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.h Wed Nov 30 11:33:13 2011
@@ -34,7 +34,7 @@
 // in allocateBranchIsland(). This should be ok for real-word
 // application, but slows down our tests which fork too many children.
 #ifdef __APPLE__
-#include "mach_override.h"
+#include "mach_override/mach_override.h"
 #define WRAP(x) wrap_##x
 #define WRAPPER_NAME(x) "wrap_"#x
 #define OVERRIDE_FUNCTION(oldfunc, newfunc)                             \
@@ -55,7 +55,7 @@
 void *WRAP(memcpy)(void *to, const void *from, size_t size);
 void *WRAP(memmove)(void *to, const void *from, size_t size);
 void *WRAP(memset)(void *block, int c, size_t size);
-const char *WRAP(strchr)(const char *string, int c);
+char *WRAP(strchr)(const char *string, int c);
 int WRAP(strcmp)(const char *s1, const char *s2);
 char *WRAP(strcpy)(char *to, const char *from);  // NOLINT
 char *WRAP(strdup)(const char *s);





More information about the llvm-commits mailing list