[Lldb-commits] [PATCH] D69589: [lldb] Refactor all POST_BUILD commands into targets
António Afonso via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Nov 3 15:30:55 PST 2019
aadsm requested changes to this revision.
aadsm added a comment.
This revision now requires changes to proceed.
I'm sorry to reject but this diff breaks `install-distribution` on Darwin. Here's how to repro:
$ mkdir -p ~/Projects/llvm-build/Release && cd ~/Projects/llvm-build/Release
$ cmake -G Ninja \
-C ../../llvm-project/lldb/cmake/caches/Apple-lldb-macOS.cmake \
$ DESTDIR=$PWD/install/usr install-distribution
ninja: error: 'bin/LLDB.framework/LLDB', needed by 'bin/LLDB.framework/Resources/Python/lldb/_lldb.so', missing and no known rule to make it
The reason I found this is because I was having an issue where `_lldb.so` was being generated on the build but it was not being copied to the install directory.
After some mucking around I realized that the `install-liblldb` target installs the python scripts but it's `lldb` that generates the symlink as a `POST_BUILD` command (before this diff). I think in some situations the `install-liblldb` runs before that `POST_BUILD` command has run. At least I'm able to repro this quite consistently and once `ninja install-distribution` is finished `_lldb.so` exists on the build directory but not on the install one (and I can see all files in the python module being copied except that one in the ninja log when running the install step).
I fixed this locally by doing this (this fix doesn't really feel good but not sure what's the best way to do it):
# When building as framework liblldb is responsible to install the python
# scripts. However, we need to make sure that all swig components have been
# properly finished.
# Install the LLDB python module
Then I found this diff that hasn't landed yet and tried it (I think there's a race condition caused by the POST_BUILD command but not sure) out and stumbled upon this.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the lldb-commits