Fix swig scripts install target name

Authored by aadsm on Aug 19 2020, 11:21 AM.


Fix swig scripts install target name

LLVM install component targets needs to be in the form of: install-{target}[-stripped]

I tested with:

cmake ... -DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_DISTRIBUTION_COMPONENTS="lldb;liblldb;lldb-python-scripts;" ...
DESTDIR=... ninja install-distribution

@JDevlieghere finish_swig_python_scripts is a really weird name for a distribution component, any reason that it has to be this way?

Differential Revision: https://reviews.llvm.org/D86235


aadsmAug 21 2020, 2:41 PM
Differential Revision
D86235: Fix swig scripts install target name
rG196e6f9f1893: Replace TableGen range piece punctuator with '...'

Event Timeline

JDevlieghere added inline comments.Aug 21 2020, 11:09 PM

This needs to be parametrized in based off ${python_scripts_target}. Now CMake complains about a duplicate target lldb-python-scripts when the function is called twice (which is what we do downstream and the reason I made it a function in the first place).

aadsm added inline comments.Aug 22 2020, 10:26 AM

oops, really sorry about this! I'm guessing that you need to call this twice to set up both python 2.7 and python 3 (at least last time I checked it seems Xcode shipped with both).
in this case I prefer to still have a single lldb-python-scripts distribution target, I don't see any benefit in having too (also it could creating confusion to have dynamically generated distribution components). I'll put a diff up.

JDevlieghere added inline comments.Aug 22 2020, 10:41 AM

No worries, thanks for putting up a diff. We definitely need the target to be there twice, with two Python versions we have two Python resources directories, and both need to have the LLDB scripts.