[all-commits] [llvm/llvm-project] d4b7b7: [llvm-ir2vec] Place IR2Vec Python bindings in the ...
Nishant Sachdeva via All-commits
all-commits at lists.llvm.org
Wed Apr 29 02:58:47 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d4b7b73724a9fed0cc70a5b3f64b4cd7016abb4d
https://github.com/llvm/llvm-project/commit/d4b7b73724a9fed0cc70a5b3f64b4cd7016abb4d
Author: Nishant Sachdeva <32475507+nishant-sachdeva at users.noreply.github.com>
Date: 2026-04-29 (Wed, 29 Apr 2026)
Changed paths:
M llvm/test/lit.site.cfg.py.in
M llvm/test/tools/llvm-ir2vec/bindings/ir2vec-getBBEmbMap.py
M llvm/test/tools/llvm-ir2vec/bindings/ir2vec-getFuncEmb.py
M llvm/test/tools/llvm-ir2vec/bindings/ir2vec-getFuncEmbMap.py
M llvm/test/tools/llvm-ir2vec/bindings/ir2vec-getFuncNames.py
M llvm/test/tools/llvm-ir2vec/bindings/ir2vec-getInstEmbMap.py
M llvm/test/tools/llvm-ir2vec/bindings/ir2vec-initEmbedding.py
M llvm/test/tools/llvm-ir2vec/bindings/lit.local.cfg
M llvm/tools/llvm-ir2vec/Bindings/CMakeLists.txt
M llvm/utils/gn/secondary/llvm/test/BUILD.gn
Log Message:
-----------
[llvm-ir2vec] Place IR2Vec Python bindings in the tools/llvm-ir2vec/Bindings build directory (#194301)
## Place IR2Vec Python bindings `.so` in the Bindings build directory
Without an explicit output directory, CMake places the nanobind
extension module
in `<build>/lib/`, alongside unrelated LLVM libraries.
- This change adds `set_target_properties` to redirect the output to
`<build>/tools/llvm-ir2vec/Bindings/`, keeping the Python bindings
isolated within its own tool's build tree. This mirrors MLIR's
convention,
where Python extension modules are placed under
`<build>/tools/mlir/python_packages/` rather than the global `lib/`
directory.
- %llvm_lib_dir was pointing to build-llvm/lib but the .so actually
lives at build-llvm/tools/llvm-ir2vec/Bindings/. The tests were silently
passing only because the conda env's site-packages had ir2vec installed,
masking the broken PYTHONPATH entirely.
- Two changes:
- `lit.local.cfg` — replaced `%llvm_lib_dir` substitution with
`%ir2vec_python_dir` pointing to the correct build output path
- All 6 test `.py` files — updated the RUN line from
`PYTHONPATH=%llvm_lib_dir` to `PYTHONPATH=%ir2vec_python_dir`
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list