This is an archive of the discontinued LLVM Phabricator instance.

Fix swig scripts install target name
ClosedPublic

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

Details

Summary

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;finish_swig_python_scripts" ...
DESTDIR=... ninja install-distribution

@JDevlieghere finish_swig_python_scripts is a really weird name for a distribution component, any reason it has to be this way? (this was changed here from lldb-python-scripts https://github.com/llvm/llvm-project/commit/9a3dbc972322413045bb5672b0fd3ba8c216c987)

Diff Detail

Event Timeline

aadsm created this revision.Aug 19 2020, 11:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2020, 11:24 AM
aadsm requested review of this revision.Aug 19 2020, 11:24 AM
aadsm edited the summary of this revision. (Show Details)Aug 19 2020, 11:27 AM
JDevlieghere accepted this revision.Aug 19 2020, 11:44 AM

No reason other than consistency by always appending to the given target. I didn't think of the requirement for the install-prefix. LGTM!

This revision is now accepted and ready to land.Aug 19 2020, 11:44 AM
wallace accepted this revision.Aug 19 2020, 11:46 AM
aadsm added a comment.Aug 19 2020, 1:34 PM

@JDevlieghere thanks for the quick review, but on the name I mean the actual finish_swig_python_scripts, this sounds like a step name and not a component distributed by llvm like liblldb ot lldb-server. That was the reason at the time I named it lldb-python-scripts because it was very clear what was being installed.
Would you be fine with me changing swig_scripts_target back to lldb-python-scripts?

@JDevlieghere thanks for the quick review, but on the name I mean the actual finish_swig_python_scripts, this sounds like a step name and not a component distributed by llvm like liblldb ot lldb-server. That was the reason at the time I named it lldb-python-scripts because it was very clear what was being installed.
Would you be fine with me changing swig_scripts_target back to lldb-python-scripts?

No objections at all. IIUC that would mean changing the first argument in CMakeLists.txt:89 to:

finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}")

and then in CMakeLists.txt:166 something like

set(swig_scripts_target "${swig_target}-scripts")
set(swig_scripts_install_target "install-${swig_scripts_target}")

Sounds good to me, I didn't know anybody as explicitly specifying them anywhere, I wouldn't have broken that if I had known. My apologies.

aadsm updated this revision to Diff 287106.Aug 21 2020, 2:24 PM
aadsm edited the summary of this revision. (Show Details)

Updated to use more friendly component name lldb-python-scripts name instead of finish_swig_python_scripts

This revision was landed with ongoing or failed builds.Aug 21 2020, 2:53 PM
This revision was automatically updated to reflect the committed changes.