Skip to content

Commit

Permalink
install tbb from source in mac, for universal builds
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLapous authored Jan 14, 2024
1 parent 511a35c commit 1160955
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
export CFLAGS="-fno-aligned-new" # Macos workaround
## should compile for both architecture
export MACOSX_DEPLOYMENT_TARGET="11.7"
# export _PYTHON_HOST_PLATFORM="macosx-11.7-universal2"
export _PYTHON_HOST_PLATFORM="macosx-11.7-universal2"
## Latest fix
# export CXXFLAGS=$(echo $CXXFLAGS | sed 's/-march=core2//g')
# export CXXFLAGS=$(echo $CXXFLAGS | sed 's/-mtune=haswell//g')
Expand All @@ -58,8 +58,17 @@ jobs:
# python setup.py build_ext -j2 --inplace # Parallel compilation, compatible with macos
# pip wheel . --wheel-dir dist
### Installs TBB in the conda env for both archs
export ARCHFLAGS="-arch arm64 -arch x86_64"
python setup.py build_ext -j2 --inplace --force # Parallel compilation, compatible with macos
git clone --depth 1 https://github.com/oneapi-src/oneTBB.git
cd oneTBB
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DTBB_TEST=OFF ..
cmake --build . -j4
cmake --install .
####
python setup.py build_ext -j4 --inplace --force # Parallel compilation, compatible with macos
pip wheel . --wheel-dir dist
fi
if [[ ${{ matrix.os }} == "ubuntu-latest" ]]; then
Expand Down

0 comments on commit 1160955

Please sign in to comment.