fix asan-rt build on Mac. Patch by glider@google.com

llvm-svn: 145496
This commit is contained in:
Kostya Serebryany 2011-11-30 17:33:13 +00:00
parent 92297f9dcc
commit 9d1eee9e2a
3 changed files with 6 additions and 6 deletions

View File

@ -194,7 +194,7 @@ LIBASAN_OBJ_COMMON=$(BIN)/asan_rtl$(SUFF).o \
$(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 @@ $(BIN)/%$(SUFF).o: %.c $(RTL_HDR) $(MAKEFILE)
-DASAN_USE_SYSINFO=1 \
$(ASAN_FLAGS)
ifeq ($(OS),Darwin)
ifeq ($(OS),darwin)
LD_FLAGS=-framework Foundation
else
LD_FLAGS=
@ -307,7 +307,7 @@ BENCHMARK_OBJECTS=\
$(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

View File

@ -21,7 +21,7 @@
namespace __asan {
static const size_t kNumberOfSizeClasses = 255;
class AsanChunk;
struct AsanChunk;
class AsanChunkFifoList {
public:

View File

@ -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);