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)
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits