| Issue |
174141
|
| Summary |
Two stage bootstrap build fails to compile with `-DCLANG_DEFAULT_UNWINDLIB=libunwind`
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
planetmarshall
|
## Summary
A Two Stage bootstrap build as described in [Advanced Build Configurations](https://llvm.org/docs/AdvancedBuilds.html) fails to compile
when the Stage1 compiler is built with `CLANG_DEFAULT_UNWINDLIB=libunwind`
## Expected behaviour
It should be possible to perform a bootstrap build where the resulting Stage2 compiler has no external dependencies on GNU `libgcc_s` or ` libstdc++`
## Actual behaviour
Build fails because intermediate executables built as part of stage2 are run but the correct `RUNPATH` is not set so that it can locate stage1 binaries:
```
stage2-bins/bin/llvm-min-tblgen: error while loading shared libraries: libunwind.so.1: cannot open shared object file: No such file or directory
```
## Steps to reproduce
Use the attached [CMakeUserPresets.json](https://github.com/user-attachments/files/24401291/CMakeUserPresets.json)
```
cp CMakeUserPresets.json llvm/
cd llvm
cmake --preset bootstrap
cmake --build build/bootstrap --target stage2
```
## Related Issues
* #53561
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs