When building file without debug info, include the architecture

setting in the cflags on Darwin systems.

llvm-svn: 369584
This commit is contained in:
Jason Molenda 2019-08-21 21:34:17 +00:00
parent fff01c8ec2
commit f79f594bd2
1 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,11 @@
LEVEL = ../../../make
OBJCXX_SOURCES := main.mm myobject.mm
include $(LEVEL)/Makefile.rules
CFLAGS_NO_DEBUG =
ifeq "$(OS)" "Darwin"
CFLAGS_NO_DEBUG += -arch $(ARCH)
endif
# myobject.o needs to be built without debug info
myobject.o: myobject.mm
$(CXX) -c -o $@ $<
$(CXX) $(CFLAGS_NO_DEBUG) -c -o $@ $<