Make -arch work on MacOSX.

llvm-svn: 235065
This commit is contained in:
Greg Clayton 2015-04-16 01:18:05 +00:00
parent b105564015
commit 2c93b80f78
1 changed files with 11 additions and 3 deletions

View File

@ -75,7 +75,7 @@ endif
# ARCHFLAG is the flag used to tell the compiler which architecture
# to compile for. The default is the flag that clang accepts.
#----------------------------------------------------------------------
ARCHFLAG ?= "-arch "
ARCHFLAG ?= -arch
#----------------------------------------------------------------------
# Change any build/tool options needed
@ -127,11 +127,19 @@ else
endif
CFLAGS ?= -g -O0
CFLAGS += $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) -I$(LLDB_BASE_DIR)include
ifeq "$(OS)" "Darwin"
CFLAGS += $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) -I$(LLDB_BASE_DIR)include
else
CFLAGS += $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) -I$(LLDB_BASE_DIR)include
endif
CFLAGS += -include $(THIS_FILE_DIR)test_common.h
# Use this one if you want to build one part of the result without debug information:
CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS)
ifeq "$(OS)" "Darwin"
CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS)
else
CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS)
endif
CXXFLAGS += -std=c++11
CXXFLAGS += $(CFLAGS)