[Lldb-commits] [lldb] [lldb][test] Use MKDIR_P in more API test Makefiles (PR #226157)

via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 24 06:18:56 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

Replace `mkdir -p` with `$(call MKDIR_P,...)` in a few API test Makefiles so they work with the Windows shell.

---
Full diff: https://github.com/llvm/llvm-project/pull/226157.diff


5 Files Affected:

- (modified) lldb/test/API/functionalities/duplicate-archive-members/Makefile (+1-1) 
- (modified) lldb/test/API/lang/objc/conflicting-definition/Makefile (+2-2) 
- (modified) lldb/test/API/lang/objc/hidden-ivars/Makefile (+1-1) 
- (modified) lldb/test/API/macosx/find-dsym/bundle-with-dot-in-filename/Makefile (+1-1) 
- (modified) lldb/test/API/macosx/find-dsym/deep-bundle/Makefile (+2-2) 


``````````diff
diff --git a/lldb/test/API/functionalities/duplicate-archive-members/Makefile b/lldb/test/API/functionalities/duplicate-archive-members/Makefile
index b880d9e722bf1f..4adf5b2f39fe22 100644
--- a/lldb/test/API/functionalities/duplicate-archive-members/Makefile
+++ b/lldb/test/API/functionalities/duplicate-archive-members/Makefile
@@ -5,7 +5,7 @@ C_SOURCES := main.c
 # can be controlled without confusing Make.
 libfoo.a: a.c sub1/a.c
 	$(CC) $(CFLAGS) -c $(<D)/a.c -o a.o
-	mkdir -p sub1
+	$(call MKDIR_P,sub1)
 	$(CC) $(CFLAGS) -c $(<D)/sub1/a.c -o sub1/a.o
 	touch -t '198001010000.00' a.o
 	touch -t '198001010000.01' sub1/a.o
diff --git a/lldb/test/API/lang/objc/conflicting-definition/Makefile b/lldb/test/API/lang/objc/conflicting-definition/Makefile
index cba79c94d46baa..8a9e06b20b8914 100644
--- a/lldb/test/API/lang/objc/conflicting-definition/Makefile
+++ b/lldb/test/API/lang/objc/conflicting-definition/Makefile
@@ -8,14 +8,14 @@ a.out: libTest.dylib libTestExt.dylib
 include Makefile.rules
 
 libTest.dylib:	Test/Test.m
-	mkdir -p Test
+	$(call MKDIR_P,Test)
 	"$(MAKE)" MAKE_DSYM=YES -f $(MAKEFILE_RULES) \
 		DYLIB_ONLY=YES DYLIB_NAME=Test DYLIB_OBJC_SOURCES=Test/Test.m \
 		LD_EXTRAS="-lobjc -framework Foundation" \
 		CFLAGS_EXTRAS=-I$(SRCDIR)
 
 libTestExt.dylib: TestExt/TestExt.m
-	mkdir -p TestExt
+	$(call MKDIR_P,TestExt)
 	"$(MAKE)" MAKE_DSYM=YES -f $(MAKEFILE_RULES) \
 		DYLIB_ONLY=YES DYLIB_NAME=TestExt DYLIB_OBJC_SOURCES=TestExt/TestExt.m \
 		LD_EXTRAS="-lobjc -framework Foundation -lTest -L." \
diff --git a/lldb/test/API/lang/objc/hidden-ivars/Makefile b/lldb/test/API/lang/objc/hidden-ivars/Makefile
index 49b88651b115ff..7f83097d54da72 100644
--- a/lldb/test/API/lang/objc/hidden-ivars/Makefile
+++ b/lldb/test/API/lang/objc/hidden-ivars/Makefile
@@ -13,7 +13,7 @@ stripped: a.out.dSYM
 endif
 
 stripped: a.out libInternalDefiner.dylib
-	mkdir -p stripped
+	$(call MKDIR_P,stripped)
 	$(STRIP) -Sx a.out -o stripped/a.out
 	$(STRIP) -Sx libInternalDefiner.dylib -o stripped/libInternalDefiner.dylib
 ifneq "$(CODESIGN)" ""
diff --git a/lldb/test/API/macosx/find-dsym/bundle-with-dot-in-filename/Makefile b/lldb/test/API/macosx/find-dsym/bundle-with-dot-in-filename/Makefile
index f13584041fb517..08b584949f0b50 100644
--- a/lldb/test/API/macosx/find-dsym/bundle-with-dot-in-filename/Makefile
+++ b/lldb/test/API/macosx/find-dsym/bundle-with-dot-in-filename/Makefile
@@ -8,7 +8,7 @@ $(EXE):
 	$(CC) $(ASAN_LDFLAGS) $(CFLAGS) -dynamiclib -o com.apple.sbd $(SRCDIR)/bundle.c
 	mkdir com.apple.sbd.xpc
 	mv com.apple.sbd com.apple.sbd.xpc/
-	mkdir -p com.apple.sbd.xpc.dSYM/Contents/Resources/DWARF
+	$(call MKDIR_P,com.apple.sbd.xpc.dSYM/Contents/Resources/DWARF)
 	mv com.apple.sbd.dSYM/Contents/Resources/DWARF/com.apple.sbd com.apple.sbd.xpc.dSYM/Contents/Resources/DWARF/
 	rm -rf com.apple.sbd.dSYM
 	mkdir hide.app
diff --git a/lldb/test/API/macosx/find-dsym/deep-bundle/Makefile b/lldb/test/API/macosx/find-dsym/deep-bundle/Makefile
index 2aed2482081299..09fd3cfa81902f 100644
--- a/lldb/test/API/macosx/find-dsym/deep-bundle/Makefile
+++ b/lldb/test/API/macosx/find-dsym/deep-bundle/Makefile
@@ -9,8 +9,8 @@ main.o: hide.app
 
 hide.app: myframework.c MyFramework.h Info.plist
 	$(CC) $(ASAN_LDFLAGS) $(CFLAGS) -install_name $(shell pwd)/MyFramework.framework/Versions/A/MyFramework -dynamiclib -o MyFramework $<
-	mkdir -p MyFramework.framework/Versions/A/Headers
-	mkdir -p MyFramework.framework/Versions/A/Resources
+	$(call MKDIR_P,MyFramework.framework/Versions/A/Headers)
+	$(call MKDIR_P,MyFramework.framework/Versions/A/Resources)
 	cp MyFramework MyFramework.framework/Versions/A
 	cp $(SRCDIR)/MyFramework.h MyFramework.framework/Versions/A/Headers
 	cp $(SRCDIR)/Info.plist MyFramework.framework/Versions/A/Resources

``````````

</details>


https://github.com/llvm/llvm-project/pull/226157


More information about the lldb-commits mailing list