Skip to content

Commit

Permalink
Fix mingw dll issues (HaxeFoundation#1046)
Browse files Browse the repository at this point in the history
* Allow dynamic linking with mingw on linux

* Update copied mingw libraries

Add 64-bit gcc library
Add another winpthread location
  • Loading branch information
tobil4sk authored Dec 21, 2023
1 parent 5b23e36 commit 4f73919
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions toolchain/mingw-toolchain.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,19 @@
<flag value="-m32" unless="HXCPP_M64"/>
<flag value="-m64" if="HXCPP_M64"/>
<flag value="-static" if="no_shared_libs"/>
<flag value="-static-libgcc" if="no_shared_libs" unless="linux_host"/>
<flag value="-static-libstdc++" if="no_shared_libs" unless="linux_host"/>
<flag value="-static-libgcc" if="linux_host"/>
<flag value="-static-libstdc++" if="linux_host"/>
<flag value="-static-libgcc" if="no_shared_libs" />
<flag value="-static-libstdc++" if="no_shared_libs" />
<flag value="-L${MINGW_ROOT}/lib/libs" />
<ext value=".exe"/>
<outflag value="-o "/>
</linker>

<copyFile toolId="exe" name="libgcc_s_dw2-1.dll" from="${MINGW_ROOT}/bin" allowMissing="true" unless="no_shared_libs"/>
<copyFile toolId="exe" name="libgcc_s_dw2-1.dll" from="${MINGW_ROOT}/bin" allowMissing="true" unless="no_shared_libs || HXCPP_M64" />
<copyFile toolId="exe" name="libgcc_s_seh-1.dll" from="${MINGW_ROOT}/bin" allowMissing="true" if="HXCPP_M64" unless="no_shared_libs"/>
<copyFile toolId="exe" name="libstdc++-6.dll" from="${MINGW_ROOT}/bin" allowMissing="true" unless="no_shared_libs"/>
<copyFile toolId="exe" name="libwinpthread-1.dll" from="${MINGW_ROOT}/sys-root/mingw/bin" allowMissing="true" unless="no_shared_libs"/>
<copyFile toolId="exe" name="libwinpthread-1.dll" from="${MINGW_ROOT}/lib" allowMissing="true" unless="no_shared_libs"/>
<copyFile toolId="exe" name="libwinpthread-1.dll" from="${MINGW_ROOT}/bin" allowMissing="true" unless="no_shared_libs"/>

<linker id="static_link" exe="ar" >
<ext value="${LIBEXT}"/>
Expand Down

0 comments on commit 4f73919

Please sign in to comment.