Skip to content

Commit

Permalink
Fix libiconv build on Windows (#15095)
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil authored Oct 19, 2024
1 parent 95044dc commit 796a0d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion etc/win-ci/cygwin-build-iconv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ else
export CXXFLAGS="-MT"
enable_shared=no
enable_static=yes
# GNU libiconv appears to define `BUILDING_DLL` unconditionally, so the static
# library contains `/EXPORT` directives that make any executable also export
# the iconv symbols, which we don't want
find . '(' -name '*.h' -or -name '*.h.build.in' ')' -print0 | xargs -0 -i sed -i 's/__declspec(dllexport)//' '{}'
fi
export CPPFLAGS="-D_WIN32_WINNT=_WIN32_WINNT_WIN7 -I$(pwd)/iconv/include"
export CPPFLAGS="-O2 -D_WIN32_WINNT=_WIN32_WINNT_WIN7 -I$(pwd)/iconv/include"
export LDFLAGS="-L$(pwd)/iconv/lib"

./configure --host=x86_64-w64-mingw32 --prefix="$(pwd)/iconv" --enable-shared="${enable_shared}" --enable-static="${enable_static}"
Expand Down

0 comments on commit 796a0d2

Please sign in to comment.