Skip to content

Commit

Permalink
Update setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
svkeerthy authored and nishant-sachdeva committed Oct 31, 2023
1 parent 9dd5727 commit fa683c3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
with:
package-dir: Manylinux2014_Compliant_Source/pkg
env:
CIBW_ENVIRONMENT: CXXFLAGS='-std=c++17'
CIBW_SKIP: "pp* *-musllinux_*"
CIBW_ARCHS: "x86_64"
CIBW_MANYLINUX_X86_64_IMAGE: "ghcr.io/iith-compilers/manylinux2014-llvm/manylinux2014-llvm:x86-llvm16"
Expand Down
4 changes: 2 additions & 2 deletions Manylinux2014_Compliant_Source/pkg/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
if VERSION and LLVM_LIBS:
break

with (pl.Path(__file__).parent / "IR2Vec" / "README.md").open() as f:
with (pl.Path(__file__).resolve().parents[2] / "README.md").open() as f:
DESCRIPTION = f.read()


Expand All @@ -51,7 +51,7 @@ def get_llvm_files():
include_dirs=["./IR2Vec"],
libraries=["z"],
extra_objects=["/usr/local/lib/libIR2Vec.a"] + get_llvm_files(),
extra_compile_args=["-v -std=c++17"],
extra_compile_args=["-v", "--std=c++17"],
)

setup(
Expand Down
4 changes: 2 additions & 2 deletions Manylinux2014_Compliant_Source/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ AUTHORS : SHIKHAR JAIN (IITH COMPILERS) & ANILAVA KUNDU (IITH COMPILERS)

- This package help users to use exposed ir2vec api in python environment.
- The Source code of packgae is larger than expected . Reason: The source is manylinux 2014 compliant.
- Hence we need to have static linking for every library ex(ir2vec,llvm-12,stdc++ etc.) to be present and linked statically.
- Hence we need to have static linking for every library ex(ir2vec,llvm-16,stdc++ etc.) to be present and linked statically.
- In order to build from source you need to initiate a manylinux 2014 docker image and then use this source dir accordingly.
- While building source it is necessary to have a static library of LLVM that has all other static libs within it.
- These wheel files generated are specific for python abi versions as reflected by their names . But they will work on old/new *nix OSs.
- The package is specific for LLVM-14.0 and current IR2Vec main branch (1.1.0 verion)
- The package is specific for LLVM-16 and current IR2Vec main branch (2.1.0 verion)

- Inorder to use source on a MANYLINUX2014 Docker image and build it , there are several dependencies w.r.t static libs and header files .
- A static lib containing all the static libs of LLVM which can be found in llvm/buid_dir/lib.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Please see [here](https://compilers.cse.iith.ac.in/projects/ir2vec/) for more de

> IR2Vec: LLVM IR Based Scalable Program Embeddings, S. VenkataKeerthy, Rohit Aggarwal, Shalini Jain, Maunendra Sankar Desarkar, Ramakrishna Upadrasta, and Y. N. Srikant
![LLVM](https://img.shields.io/badge/LLVM-v14.0.0-blue)
![PyPI Version](https://img.shields.io/pypi/v/your-package-name)
[![LLVM](https://img.shields.io/badge/LLVM-v14.0.0-blue)](https://github.com/llvm/llvm-project/releases/tag/llvmorg-16.0.1)
[![PyPI Version](https://img.shields.io/pypi/v/your-package-name)](https://pypi.org/project/IR2Vec/)
![Tests](https://github.com/IITH-Compilers/IR2Vec/workflows/Tests/badge.svg)
![Publish](https://github.com/IITH-Compilers/IR2Vec/workflows/Publish/badge.svg)
![pre-commit checks](https://github.com/IITH-Compilers/IR2Vec/workflows/pre-commit%20checks/badge.svg)
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(ir2vec VERSION 2.0.1)
set(IR2VEC_LIB "IR2Vec")
set(IR2VEC_LIB_STATIC "IR2Vec_Static")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -std=c++17")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")


set(LT_LLVM_INSTALL_DIR "" CACHE PATH "LLVM installation directory")
Expand Down

0 comments on commit fa683c3

Please sign in to comment.