Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDPA] fix Windows build #8249

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions S/SDPA/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,28 @@ METIS_packagespec = PackageSpec(; name = "METIS4_jll",
script = raw"""
cd $WORKSPACE/srcdir/sdpa-*

if [[ "${target}" == *-mingw* ]]; then
# This is needed because otherwise we get unusable binaries (error "The specified
# executable is not a valid application for this OS platform"). These come from
# CompilerSupportLibraries_jll.
# xref: https://github.com/JuliaPackaging/Yggdrasil/issues/7904
#
# The remove path pattern matches `lib/gcc/<triple>/<major>/`, where `<triple>` is the
# platform triplet and `<major>` is the GCC major version with which CSL was built
# xref: https://github.com/JuliaPackaging/Yggdrasil/pull/7535
#
# However, before CSL v1.1, these files were located in just `lib/`, thus we clean this
# directory as well.
if test -n "$(find $prefix/lib/gcc/*mingw*/*/libgcc*)"; then
rm $prefix/lib/gcc/*mingw*/*/libgcc* $prefix/lib/gcc/*mingw*/*/libmsvcrt*
elif test -n "$(find $prefix/lib/libgcc*)"; then
rm $prefix/lib/libgcc* $prefix/lib/libmsvcrt*
else
echo "Could not find any libraries to remove :-/"
find $prefix/lib
fi
fi

# Remove misleading libtool files
rm -f ${prefix}/lib/*.la
update_configure_scripts
Expand Down