[Lldb-commits] [PATCH] D86402: Avoid creating lldb-python-scripts target more than once

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Aug 22 10:38:36 PDT 2020

JDevlieghere requested changes to this revision.
JDevlieghere added a comment.
This revision now requires changes to proceed.

The target should be created for everyone calling the `finish_swig_python` function. Let's say (not so) hypothetically I want to create bindings for Python 2 and Python 3. I'll call `finish_swig_python`, twice, once for each Python version:

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

I want two corresponding targets, `lldb-python-scripts` and `lldb-python2-scripts` and two install targets. So what I proposed in D86235 <https://reviews.llvm.org/D86235> is using `${swig_target}`, which is the first argument to `finish_swig_python` to be part of the target name:

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

This will create `lldb-python-script` and `install lldb-python-script` for the first call, and `lldb-python2-script` and `install lldb-python2-script` for the second call to `finish_swig_python`.

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list