Skip to content

Commit

Permalink
Merge pull request #813 from seibert/m1_support
Browse files Browse the repository at this point in the history
Add m1 support to conda build scripts
  • Loading branch information
esc committed May 19, 2022
1 parent f0365b9 commit a69c32e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
6 changes: 5 additions & 1 deletion conda-recipes/llvmdev/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ set -x
LLVM_TARGETS_TO_BUILD=${LLVM_TARGETS_TO_BUILD:-"host;AArch64;AMDGPU;ARM;BPF;Hexagon;Mips;MSP430;NVPTX;PowerPC;Sparc;SystemZ;X86;XCore;RISCV"}

# This is the clang compiler prefix
DARWIN_TARGET=x86_64-apple-darwin13.4.0
if [[ $build_platform == osx-arm64 ]]; then
DARWIN_TARGET=arm64-apple-darwin20.0.0
else
DARWIN_TARGET=x86_64-apple-darwin13.4.0
fi


declare -a _cmake_config
Expand Down
4 changes: 2 additions & 2 deletions conda-recipes/llvmdev/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% set version = "11.1.0" %}
{% set sha256_llvm = "ce8508e318a01a63d4e8b3090ab2ded3c598a50258cc49e2625b9120d4c03ea5" %}
{% set sha256_lld = "017a788cbe1ecc4a949abf10755870519086d058a2e99f438829aef24f0c66ce" %}
{% set build_number = "4" %}
{% set build_number = "5" %}

package:
name: llvmdev
Expand Down Expand Up @@ -54,7 +54,7 @@ requirements:
host:
# needed for llc at runtime
- zlib # [not win]
- xar # [osx]
- xar # [osx and x86_64]
# llvm-lit testing needs *a* python
- python # [not (armv6l or armv7l or aarch64 or win)]

Expand Down
23 changes: 19 additions & 4 deletions conda-recipes/llvmlite/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
set -x

if [[ $(uname) == Darwin ]]; then
${SYS_PREFIX}/bin/conda create -y -p ${SRC_DIR}/bootstrap clangxx_osx-64=10
if [[ $build_platform == osx-arm64 ]]; then
CLANG_PKG_SELECTOR=clangxx_osx-arm64=12
else
CLANG_PKG_SELECTOR=clangxx_osx-64=10
fi
${SYS_PREFIX}/bin/conda create -y -p ${SRC_DIR}/bootstrap ${CLANG_PKG_SELECTOR}
export PATH=${SRC_DIR}/bootstrap/bin:${PATH}
CONDA_PREFIX=${SRC_DIR}/bootstrap \
. ${SRC_DIR}/bootstrap/etc/conda/activate.d/*
Expand All @@ -19,11 +24,21 @@ if [[ $(uname) == Darwin ]]; then
fi

if [ -n "$MACOSX_DEPLOYMENT_TARGET" ]; then
# OSX needs 10.7 or above with libc++ enabled
export MACOSX_DEPLOYMENT_TARGET=10.10
if [[ $build_platform == osx-arm64 ]]; then
export MACOSX_DEPLOYMENT_TARGET=11.0
else
# OSX needs 10.7 or above with libc++ enabled
export MACOSX_DEPLOYMENT_TARGET=10.10
fi
fi

DARWIN_TARGET=x86_64-apple-darwin13.4.0

# This is the clang compiler prefix
if [[ $build_platform == osx-arm64 ]]; then
DARWIN_TARGET=arm64-apple-darwin20.0.0
else
DARWIN_TARGET=x86_64-apple-darwin13.4.0
fi


export PYTHONNOUSERSITE=1
Expand Down
3 changes: 2 additions & 1 deletion conda-recipes/llvmlite/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ requirements:
host:
- python
# On channel https://anaconda.org/numba/
- llvmdev 11.1.0 *4 # [not win]
- llvmdev 11.1.0 *5 # [(osx and arm64)]
- llvmdev 11.1.0 *4 # [not ((osx and arm64) or win)]
- llvmdev 11.1.0 4 # [win]
- vs2015_runtime # [win]
# llvmdev is built with libz compression support
Expand Down

0 comments on commit a69c32e

Please sign in to comment.