-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
53 lines (38 loc) · 1.28 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
set dotenv-load
LLVM-CONFIG := env('LLVM_CONFIG', "llvm-config")
install:
pip install --no-build-isolation -v .
test: install
python -m pytest
build-wheels:
python -m build
ipython: install
ipython
install-dev-requirements:
pip install -r ./requirements.txt
build-docs:
cd ./docs && make html
run-all-examples:
#!/usr/bin/env bash
set -euo pipefail
for file in ./example/*.py; do
python $file > /dev/null || echo $file failed
done
echo done!
opendoc:
xdg-open ./docs/build/html/index.html
# Example: just find-components ./build/cp312-abi3-linux_x86_64/ LLVMCloneModule
# build_dir is the pip(scikit-build-core) output directory, where the cmake cache
# file contains the used LLVM library path
# Find which llvm archive file contains the desired symbol
find-components build_dir symbol:
#!/usr/bin/env bash
LLVM_LIBRARY_DIRS=$(cmake -L '{{build_dir}}' | grep LLVM_LIBRARY_DIRS | cut -d '=' -f 2)
for lib in "$LLVM_LIBRARY_DIRS"/*.a; do
nm -gC "$lib" | grep '{{symbol}}' && echo "Found in $lib"
done
echo Done!
list-llvm-components:
'{{LLVM-CONFIG}}' --components | tr " " "\n" | less
search-components component:
@llvm-config --components | tr ' ' '\n' | grep '{{component}}' | paste -sd ' ' -