[Lldb-commits] [lldb] [LLDB] Simplify Makefile (PR #225890)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 23 11:52:13 PDT 2026


https://github.com/adrian-prantl created https://github.com/llvm/llvm-project/pull/225890

None

>From d84811020a10525d9f4a5f523149ac05f6cbc2ea Mon Sep 17 00:00:00 2001
From: Adrian Prantl <aprantl at apple.com>
Date: Wed, 23 Sep 2026 11:47:14 -0700
Subject: [PATCH] [LLDB] Simplify Makefile

---
 lldb/test/API/macosx/branch-islands/Makefile | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/lldb/test/API/macosx/branch-islands/Makefile b/lldb/test/API/macosx/branch-islands/Makefile
index d7bfb33da00730..8c663634318529 100644
--- a/lldb/test/API/macosx/branch-islands/Makefile
+++ b/lldb/test/API/macosx/branch-islands/Makefile
@@ -1,16 +1,14 @@
-C_SOURCES := main.c foo.c
+C_SOURCES := main.c
 CFLAGS_EXTRAS := -std=c99
+# Link foo.o after the padding so that main's call to foo needs a branch island.
+LD_EXTRAS := padding1.o padding2.o padding3.o padding4.o foo.o
 
 include Makefile.rules
 
-a.out: main.o padding1.o padding2.o padding3.o padding4.o foo.o
-	${CC} ${LDFLAGS} foo.o padding1.o padding2.o padding3.o padding4.o main.o -o a.out
+a.out: $(LD_EXTRAS)
 
-%.o: $(SRCDIR)/%.s
-	${CC} ${CFLAGS} -c $<
+foo.o: foo.c
+	$(CC) $(CFLAGS) -c -o $@ $<
 
-#padding1.o: padding1.s
-#	${CC} -c $(SRCDIR)/padding1.s
-
-#padding2.o: padding2.s
-#	${CC} -c $(SRCDIR)/padding2.s
+%.o: %.s
+	$(CC) $(CFLAGS) -c -o $@ $<



More information about the lldb-commits mailing list