Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
# based on
set -x
# allow setting the targets to build as an environment variable
# This is the clang compiler prefix
declare -a _cmake_config
# The bootstrap clang I use was built with a static libLLVMObject.a and I trying to get the same here
# _cmake_config+=(-DBUILD_SHARED_LIBS:BOOL=ON)
# Don't really require libxml2. Turn it off explicitly to avoid accidentally linking to system libs
# Urgh, llvm *really* wants to link to ncurses / terminfo and we *really* do not want it to.
# Sometimes these are reported as unused. Whatever.
_cmake_config+=(-DLLVM_INCLUDE_UTILS=ON) # for llvm-lit
# TODO :: It would be nice if we had a cross-ecosystem 'BUILD_TIME_LIMITED' env var we could use to
# disable these unnecessary but useful things.
if [[ ${CONDA_FORGE} == yes ]]; then
# Only valid when using the Ninja Generator AFAICT
# What about cross-compiling targetting Darwin here? Are any of these needed?
if [[ $(uname) == Darwin ]]; then
_cmake_config+=(-DCMAKE_LIBTOOL=$(which ${DARWIN_TARGET}-libtool))
_cmake_config+=(-DLD64_EXECUTABLE=$(which ${DARWIN_TARGET}-ld))
_cmake_config+=(-DCMAKE_INSTALL_NAME_TOOL=$(which ${DARWIN_TARGET}-install_name_tool))
# Once we are using our libc++ (not until llvm_build_final), it will be single-arch only and not setting
# this causes link failures building the santizers since they respect DARWIN_osx_ARCHS. We may as well
# save some compilation time by setting this for all of our llvm builds.
elif [[ $(uname) == Linux ]]; then
# _cmake_config+=(-DLLVM_BINUTILS_INCDIR=${PREFIX}/lib/gcc/${cpu_arch}-${vendor}-linux-gnu/${compiler_ver}/plugin/include)
# For when the going gets tough:
# _cmake_config+=(-Wdev)
# _cmake_config+=(--debug-output)
# _cmake_config+=(--trace-expand)
mkdir build
cd build
cmake -G'Unix Makefiles' \
"${_cmake_config[@]}" \
ARCH=`uname -m`
if [ $ARCH == 'armv7l' ]; then # RPi need thread count throttling
make -j2 VERBOSE=1
# From:
make install || exit $?
# SVML tests on x86_64 arch only
if [[ $ARCH == 'x86_64' ]]; then
bin/opt -S -vector-library=SVML -mcpu=haswell -O3 $RECIPE_DIR/numba-3016.ll | bin/FileCheck $RECIPE_DIR/numba-3016.ll || exit $?
cd ../test
../build/bin/llvm-lit -vv Transforms ExecutionEngine Analysis CodeGen/X86