[Lldb-commits] [lldb] [lldb][test] Fix TestHiddenIvars rebuild failures in hidden-ivars Makefile (PR #205114)

via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 22 07:35:01 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Yao Qi (qiyao)

<details>
<summary>Changes</summary>

Two rebuild-state bugs surfaced when running `./bin/lldb-dotest -p
TestHiddenIvars.py`:

```
FAILED (errors=6, skipped=7, expected failures=2)
```

1. `mkdir: stripped: File exists`, mkdir failed on the second build
   because the directory already existed.  Switch to `mkdir -p`.

2. `cp -r a.out.dSYM stripped/a.out.dSYM` recurses *into* the existing
   destination on rebuild, producing a nested `stripped/a.out.dSYM/
   a.out.dSYM/`.  The outer dSYM keeps its stale UUID, so lldb cannot
   match it to the freshly relinked stripped binary (which gets a new
   UUID per link via -Wl,-random_uuid), causing source breakpoints to
   fail to resolve.  Remove the destination before copying.


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


1 Files Affected:

- (modified) lldb/test/API/lang/objc/hidden-ivars/Makefile (+2-1) 


``````````diff
diff --git a/lldb/test/API/lang/objc/hidden-ivars/Makefile b/lldb/test/API/lang/objc/hidden-ivars/Makefile
index c94c0dee1b9ce..49b88651b115f 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 stripped
+	mkdir -p stripped
 	$(STRIP) -Sx a.out -o stripped/a.out
 	$(STRIP) -Sx libInternalDefiner.dylib -o stripped/libInternalDefiner.dylib
 ifneq "$(CODESIGN)" ""
@@ -23,5 +23,6 @@ ifneq "$(CODESIGN)" ""
 	$(CODESIGN) -fs - stripped/libInternalDefiner.dylib
 endif
 ifeq "$(MAKE_DSYM)" "YES"
+	rm -rf stripped/a.out.dSYM
 	cp -r a.out.dSYM stripped/a.out.dSYM
 endif

``````````

</details>


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


More information about the lldb-commits mailing list