Skip to content

Commit f8eea3f

Browse files
authored
[libsharp2] Enable OpenMP on macOS (#6029)
* [libsharp2] Enable OpenMP on macOS * [libsharp2] Move `-DMULTIARCH` back to `CFLAGS`?
1 parent ddee828 commit f8eea3f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

L/libsharp2/build_tarballs.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ if [[ "${target}" == x86_64-* ]] && [[ "${target}" != *-apple-* ]] && [[ "${targ
2525
# For Windows, see https://github.com/ziotom78/Libsharp.jl/issues/3
2626
export CFLAGS="-DMULTIARCH"
2727
fi
28-
export CFLAGS="${CFLAGS} -O3"
29-
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target}
28+
export CFLAGS="${CFLAGS} -std=c99 -O3"
29+
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} --enable-openmp
3030
make -j${nproc}
3131
make install
3232
"""
3333

3434
# These are the platforms we will build for by default, unless further
3535
# platforms are passed in on the command line
36-
platforms = supported_platforms(; experimental=true)
36+
platforms = supported_platforms()
3737

3838
# The products that we will ensure are always built
3939
products = [
@@ -42,7 +42,10 @@ products = [
4242

4343
# Dependencies that must be installed before this package can be built
4444
dependencies = [
45-
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae")),
45+
# For OpenMP we use libomp from `LLVMOpenMP_jll` where we use LLVM as compiler (BSD
46+
# systems), and libgomp from `CompilerSupportLibraries_jll` everywhere else.
47+
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae"); platforms=filter(!Sys.isbsd, platforms)),
48+
Dependency(PackageSpec(name="LLVMOpenMP_jll", uuid="1d63c593-3942-5779-bab2-d838dc0a180e"); platforms=filter(Sys.isbsd, platforms)),
4649
]
4750

4851
# Build the tarballs, and possibly a `build.jl` as well.

0 commit comments

Comments
 (0)