[Lldb-commits] [PATCH] D11202: Remove shell-specific code from TestLoadUnload Makefile.

Chaoren Lin chaorenl at google.com
Tue Jul 14 14:56:05 PDT 2015


chaoren created this revision.
chaoren added reviewers: clayborg, sivachandra.
chaoren added a subscriber: lldb-commits.

http://reviews.llvm.org/D11202

Files:
  test/functionalities/load_unload/Makefile

Index: test/functionalities/load_unload/Makefile
===================================================================
--- test/functionalities/load_unload/Makefile
+++ test/functionalities/load_unload/Makefile
@@ -14,7 +14,6 @@
 
 ifeq "$(OS)" "Darwin"
 	CFLAGS += -arch $(ARCH)
-	DS := dsymutil
 	LD_FLAGS := -dynamiclib
 	LIB_A := $(LIB_PREFIX)a.dylib
 	LIB_B := $(LIB_PREFIX)b.dylib
@@ -25,6 +24,8 @@
 	EXEC_PATH_B := -install_name $(EXEC_PATH)/$(LIB_B)
 	EXEC_PATH_C := -install_name $(EXEC_PATH)/$(LIB_C)
 	EXEC_PATH_D := -install_name $(CWD)/$(LIB_D)
+
+	DS_IF_DARWIN = dsymutil -o $@.dSYM $@
 else
 	CFLAGS += -fPIC
 	LD_FLAGS := -shared
@@ -45,32 +46,32 @@
 
 hidden/$(LIB_D): dh.o
 	$(CC) $(CFLAGS) $(LD_FLAGS) -o hidden/$(LIB_D) dh.o
-	if [ "$(OS)" = "Darwin" ]; then dsymutil -o hidden/$(LIB_D).dSYM hidden/$(LIB_D); fi
+	$(DS_IF_DARWIN)
 
 $(LIB_A): a.o $(LIB_B)
 	$(CC) $(CFLAGS) $(LD_FLAGS) $(EXEC_PATH_A) -o $(LIB_A) a.o -L. -lloadunload_b
-	if [ "$(OS)" = "Darwin" ]; then dsymutil $(LIB_A); fi
+	$(DS_IF_DARWIN)
 
 a.o: a.c
 	$(CC) $(CFLAGS) -c a.c
 
 $(LIB_B): b.o
 	$(CC) $(CFLAGS) $(LD_FLAGS) $(EXEC_PATH_B) -o $(LIB_B) b.o
-	if [ "$(OS)" = "Darwin" ]; then dsymutil $(LIB_B); fi
+	$(DS_IF_DARWIN)
 
 b.o: b.c
 	$(CC) $(CFLAGS) -c b.c
 
 $(LIB_C): c.o
 	$(CC) $(CFLAGS) $(LD_FLAGS) $(EXEC_PATH_C) -o $(LIB_C) c.o
-	if [ "$(OS)" = "Darwin" ]; then dsymutil $(LIB_C); fi
+	$(DS_IF_DARWIN)
 
 c.o: c.c
 	$(CC) $(CFLAGS) -c c.c
 
 $(LIB_D): d.o
 	$(CC) $(CFLAGS) $(LD_FLAGS) $(EXEC_PATH_D) -o $(LIB_D) d.o
-	if [ "$(OS)" = "Darwin" ]; then dsymutil $(LIB_D); fi
+	$(DS_IF_DARWIN)
 
 d.o: d.c
 	$(CC) $(CFLAGS) -c d.c


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11202.29718.patch
Type: text/x-patch
Size: 1632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150714/1b15fb1c/attachment.bin>


More information about the lldb-commits mailing list