Author: Yao Qi
Date: 2026-06-23T10:51:28-07:00
New Revision: 05f4625e7282294d556653ca11fc4ccb8f2aedca

URL: 
https://github.com/llvm/llvm-project/commit/05f4625e7282294d556653ca11fc4ccb8f2aedca
DIFF: 
https://github.com/llvm/llvm-project/commit/05f4625e7282294d556653ca11fc4ccb8f2aedca.diff

LOG: [lldb][test] Fix TestHiddenIvars rebuild failures in hidden-ivars Makefile 
(#205114)

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.

Added: 
    

Modified: 
    lldb/test/API/lang/objc/hidden-ivars/Makefile

Removed: 
    


################################################################################
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


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to