Skip to content

Commit

Permalink
Fix build for OpenBLAS on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Jan 31, 2018
1 parent f80151d commit 16ae078
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
34 changes: 28 additions & 6 deletions openblas/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,37 @@ case $PLATFORM in
export TARGET=HASWELL
export NO_AVX2=1
;;
ios-x86_64)
export CC="clang++"
export FC="clang++"
export BINARY=64
ios-arm)
export CC="clang -arch armv7"
export FC="clang -arch armv7"
export NO_LAPACK=1
export NOFORTRAN=1
export BINARY=32
export TARGET=ARMV7
;;
ios-arm64)
export CC="clang++"
export FC="clang++"
export CC="clang -arch arm64"
export FC="clang -arch arm64"
export NO_LAPACK=1
export NOFORTRAN=1
export BINARY=64
export TARGET=ARMV8
;;
ios-x86)
export CC="clang -arch i686"
export FC="clang -arch i686"
export NO_LAPACK=1
export NOFORTRAN=1
export BINARY=32
export TARGET=ATOM
;;
ios-x86_64)
export CC="clang -arch x86_64"
export FC="clang -arch x86_64"
export NO_LAPACK=1
export NOFORTRAN=1
export BINARY=64
export TARGET=ATOM
;;
*)
echo "Error: Platform \"$PLATFORM\" is not supported"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
@Platform(value = "linux-x86", preloadpath = {"/lib32/", "/lib/", "/usr/lib32/", "/usr/lib/", "/opt/intel/lib/ia32/", "/opt/intel/mkl/lib/ia32/"}),
@Platform(value = "linux-x86_64", preloadpath = {"/lib64/", "/lib/", "/usr/lib64/", "/usr/lib/", "/opt/intel/lib/intel64/", "/opt/intel/mkl/lib/intel64/"}),
@Platform(value = "linux-ppc64", preloadpath = {"/usr/lib/powerpc64-linux-gnu/", "/usr/lib/powerpc64le-linux-gnu/"}),
@Platform(value = "ios", define = {"IOS"}, include = {"cblas.h", "clapack.h", "blas_extra.h"},
includepath = {"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/"})
@Platform(value = "ios", include = {"openblas_config.h", "cblas.h", "blas_extra.h" /* no LAPACK */}, preload = "libopenblas")
})
public class openblas implements LoadEnabled, InfoMapper {

Expand Down

0 comments on commit 16ae078

Please sign in to comment.