[Lldb-commits] [lldb] r235065 - Make -arch work on MacOSX.
Greg Clayton
gclayton at apple.com
Wed Apr 15 18:18:06 PDT 2015
Author: gclayton
Date: Wed Apr 15 20:18:05 2015
New Revision: 235065
URL: http://llvm.org/viewvc/llvm-project?rev=235065&view=rev
Log:
Make -arch work on MacOSX.
Modified:
lldb/trunk/test/make/Makefile.rules
Modified: lldb/trunk/test/make/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=235065&r1=235064&r2=235065&view=diff
==============================================================================
--- lldb/trunk/test/make/Makefile.rules (original)
+++ lldb/trunk/test/make/Makefile.rules Wed Apr 15 20:18:05 2015
@@ -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)
More information about the lldb-commits
mailing list