Skip to content

Commit

Permalink
Merge pull request #288 from h-vetinari/19
Browse files Browse the repository at this point in the history
llvmdev v19.1.0
  • Loading branch information
h-vetinari authored Sep 18, 2024
2 parents b6ead7f + 83132cf commit dd9cd75
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '12'
- '13'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
libxml2:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/linux_aarch64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '12'
- '13'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
libxml2:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/linux_ppc64le_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '12'
- '13'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
libxml2:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ channel_targets:
cxx_compiler:
- clang_bootstrap
cxx_compiler_version:
- '16'
- '17'
libxml2:
- '2'
macos_machine:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_arm64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ channel_targets:
cxx_compiler:
- clang_bootstrap
cxx_compiler_version:
- '16'
- '17'
libxml2:
- '2'
macos_machine:
Expand Down
1 change: 0 additions & 1 deletion .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 14 additions & 13 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions build-locally.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ if %ERRORLEVEL% neq 0 exit 1
REM bin\opt -S -vector-library=SVML -mcpu=haswell -O3 %RECIPE_DIR%\numba-3016.ll | bin\FileCheck %RECIPE_DIR%\numba-3016.ll
REM if %ERRORLEVEL% neq 0 exit 1

:: takes ~30min
cd ..\llvm\test
python ..\..\build\bin\llvm-lit.py -vv Transforms ExecutionEngine Analysis CodeGen/X86
if %ERRORLEVEL% neq 0 exit 1
11 changes: 5 additions & 6 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
set -x
#!/bin/bash
set -exuo pipefail

# Make osx work like linux.
sed -i.bak "s/NOT APPLE AND ARG_SONAME/ARG_SONAME/g" llvm/cmake/modules/AddLLVM.cmake
Expand Down Expand Up @@ -67,17 +68,15 @@ else
export TEST_CPU_FLAG=""
fi

# should be [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]],
# but osx builds time out when building & running test suite
if [[ "$target_platform" == "linux-64" ]]; then
if [[ ${CONDA_BUILD_CROSS_COMPILATION:-0} != "1" ]]; then
# bin/opt -S -vector-library=SVML $TEST_CPU_FLAG -O3 $RECIPE_DIR/numba-3016.ll | bin/FileCheck $RECIPE_DIR/numba-3016.ll || exit $?

if [[ "$target_platform" == linux* ]]; then
ln -s $(which $CC) $BUILD_PREFIX/bin/gcc
# check-llvm takes >1.5h to build & run on osx
ninja -j${CPU_COUNT} check-llvm
fi

ninja -j${CPU_COUNT} check-llvm

cd ../llvm/test
python ../../build/bin/llvm-lit -vv Transforms ExecutionEngine Analysis CodeGen/X86
fi
20 changes: 11 additions & 9 deletions recipe/install_llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ IFS='.' read -ra VER_ARR <<< "$PKG_VERSION"
# temporary prefix to be able to install files more granularly
mkdir temp_prefix

MAJOR_EXT="${VER_ARR[0]}"
MAJOR_VER="${VER_ARR[0]}"
MAJOR_EXT="${MAJOR_VER}"
# default SOVER for tagged releases is major.minor version
SOVER_EXT="${VER_ARR[0]}.${VER_ARR[1]}"
# for rc's, both MAJOR_EXT & SOVER_EXT get suffixes
if [[ "${PKG_VERSION}" == *rc* ]]; then
# rc's get "rc" without the number
MAJOR_EXT="${MAJOR_EXT}rc"
SOVER_EXT="${SOVER_EXT}rc"
# rc's get "-rcX" suffix; in this case, PKG_VERSION has 4 parts,
# (e.g. 19.1.0.rc1), so take the last part after splitting on "."
MAJOR_EXT="${MAJOR_EXT}-${VER_ARR[3]}"
SOVER_EXT="${SOVER_EXT}-${VER_ARR[3]}"
elif [[ "${PKG_VERSION}" == *dev0 ]]; then
# otherwise with git suffix
MAJOR_EXT="${MAJOR_EXT}git"
Expand All @@ -30,22 +32,22 @@ elif [[ "${PKG_NAME}" == libllvm* ]]; then
mv ./temp_prefix/lib/libLLVM-${MAJOR_EXT}${SHLIB_EXT} $PREFIX/lib
mv ./temp_prefix/lib/lib*.so.${SOVER_EXT} $PREFIX/lib || true
mv ./temp_prefix/lib/lib*.${SOVER_EXT}.dylib $PREFIX/lib || true
elif [[ "${PKG_NAME}" == "llvm-tools-${MAJOR_EXT}" ]]; then
elif [[ "${PKG_NAME}" == "llvm-tools-${MAJOR_VER}" ]]; then
cmake --install ./build --prefix=./temp_prefix
# install all binaries with a -${MAJOR_EXT}
# install all binaries with a -${MAJOR_VER}
pushd ./temp_prefix
for f in bin/*; do
cp $f $PREFIX/bin/$(basename $f)-${MAJOR_EXT}
cp $f $PREFIX/bin/$(basename $f)-${MAJOR_VER}
done
popd
# except one binary that belongs to llvmdev
rm $PREFIX/bin/llvm-config-${MAJOR_EXT}
rm $PREFIX/bin/llvm-config-${MAJOR_VER}
elif [[ "${PKG_NAME}" == "llvm-tools" ]]; then
cmake --install ./build --prefix=./temp_prefix
# Install a symlink without the major version
pushd ./temp_prefix
for f in bin/*; do
ln -sf $PREFIX/bin/$(basename $f)-${MAJOR_EXT} $PREFIX/bin/$(basename $f)
ln -sf $PREFIX/bin/$(basename $f)-${MAJOR_VER} $PREFIX/bin/$(basename $f)
done
popd
# opt-viewer tool
Expand Down
Loading

0 comments on commit dd9cd75

Please sign in to comment.