Skip to content

Commit c252f28

Browse files
committed
Reproducible builds on macOS-arm64
1 parent dc2460b commit c252f28

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

cibw-build-mpi.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ if test "$(uname)" = Linux; then
4141
build_ldflags+=("-Wl,--as-needed")
4242
fi
4343
if test "$(uname)" = Darwin; then
44+
build_ldflags+=("-Wl,-reproducible")
4445
build_ldflags+=("-Wl,-dead_strip_dylibs")
4546
fi
4647

@@ -409,6 +410,21 @@ if test "$(uname)" = Darwin; then
409410
ln -s "$libpmpi" libpmpi.dylib
410411
fi
411412

413+
if test "$(uname)-$(uname -m)" = Darwin-arm64; then
414+
binaries=(
415+
"${DESTDIR}${PREFIX}"/lib/libpmpi.*.dylib
416+
"${DESTDIR}${PREFIX}"/lib/libmpi.*.dylib
417+
"${DESTDIR}${PREFIX}"/bin/hydra*
418+
"${DESTDIR}${PREFIX}"/bin/mpich*
419+
"${DESTDIR}${PREFIX}"/bin/mpirun
420+
"${DESTDIR}${PREFIX}"/bin/mpivars
421+
"${DESTDIR}${PREFIX}"/bin/mpiexec*
422+
)
423+
for bin in "${binaries[@]}"; do
424+
codesign --force --options linker-signed --sign - "$bin"
425+
done
426+
fi
427+
412428
} # fixup-mpi-mpich()
413429

414430
fixup-mpi-openmpi() {

cibw-check-mpi.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ RUN mpicxx -show
8888
RUN mpicxx helloworld.cxx -o helloworld-cxx
8989

9090
RUN command -v mpiexec
91+
RUN mpiexec -help
9192
RUN mpiexec -n 3 ./helloworld-c
9293
RUN mpiexec -n 3 ./helloworld-cxx
9394

0 commit comments

Comments
 (0)