Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions l/llvmlite/build_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,11 @@
},
"v0.45.*": {
"build_script": "llvmlite_v0.45.0_ubi_9_3.sh"
},
"v0.46.*": {
"build_script": [
"llvmlite_v0.45.0_ubi_9.3.sh",
"llvmlite_v0.46.0._ubi_10.1.sh"
]
}
}
91 changes: 91 additions & 0 deletions l/llvmlite/llvmlite_v0.46.0_ubi_10.1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#!/bin/bash -e
# -----------------------------------------------------------------------------
#
# Package : llvmlite
# Version : 0.46.0
# Source repo : https://github.com/numba/llvmlite
# Tested on : UBI:10.1
# Language : Python
# Ci-Check : True
# Script License : Apache License, Version 2 or later
# Maintainer : Shivansh Sharma <shivansh.s1@ibm.com>
#
# Disclaimer : This script has been tested in root mode on given
# platform using the mentioned version of the package.
# It may not work as expected with newer versions of the
# package and/or distribution. In such case, please
# contact the "Maintainer" of this script.
#
# -----------------------------------------------------------------------------

# Variables
PACKAGE_NAME=llvmlite
PACKAGE_VERSION=${1:-v0.46.0}
PACKAGE_URL="https://github.com/numba/llvmlite.git"

LLVM_PROJECT_GIT_URL="https://github.com/llvm/llvm-project.git"
LLVM_PROJECT_GIT_TAG="llvmorg-20.1.8"

WORKING_DIR="$(pwd)"
LLVM_SRC_DIR=$WORKING_DIR/llvm-project
LLVM_INSTALL_DIR=$WORKING_DIR/llvm-install

# Install system dependencies
yum install -y git wget cmake ninja-build make \
openssl-devel bzip2-devel libffi-devel zlib-devel \
python3.12 python3.12-devel python3.12-pip
yum install -y gcc-toolset-15
source /usr/lib/gcc-toolset/15-env.source

# Ensure pip is up-to-date
python3.12 -m pip install -U pip
python3.12 -m pip install "setuptools<70" wheel ninja

# Clone llvm-project
if [ ! -d "$LLVM_SRC_DIR" ]; then
git clone $LLVM_PROJECT_GIT_URL $LLVM_SRC_DIR
fi
cd $LLVM_SRC_DIR
git fetch --all --tags
git checkout $LLVM_PROJECT_GIT_TAG

# Build & install LLVM
cmake -S llvm -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$LLVM_INSTALL_DIR \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_TARGETS_TO_BUILD="PowerPC"

cmake --build build --target install -j$(nproc)

# Clone llvmlite
cd $WORKING_DIR
if [ ! -d "$PACKAGE_NAME" ]; then
git clone $PACKAGE_URL
fi
cd $PACKAGE_NAME
git checkout $PACKAGE_VERSION

# Build & install llvmlite
export CMAKE_PREFIX_PATH=$LLVM_INSTALL_DIR/lib/cmake/llvm
export CXXFLAGS="-fPIC"

if ! (python3.12 -m pip install --no-build-isolation .) ; then
echo "------------------$PACKAGE_NAME:Install_fails-------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails"
exit 1
fi

# Run tests
if ! python3.12 -m llvmlite.tests ; then
echo "------------------$PACKAGE_NAME:Install_success_but_test_fails---------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_success_but_test_Fails"
exit 2
else
echo "------------------$PACKAGE_NAME:Install_&_test_both_success-------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_and_Test_Success"
exit 0
fi
Loading